Skip to content

Commit df1e605

Browse files
committed
mobile improvements and ui changes
1 parent 653342f commit df1e605

20 files changed

Lines changed: 655 additions & 317 deletions

.github/workflows/site-checks.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Site checks
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: ruby/setup-ruby@v1
17+
with:
18+
bundler-cache: true
19+
- name: Build site
20+
run: bundle exec jekyll build
21+
- name: Check generated HTML and internal links
22+
run: bundle exec htmlproofer ./_site --disable-external --ignore-urls '/minecraft:/'

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.vs/
2-
_site/
2+
_site/
3+
.jekyll-cache/
4+
.DS_Store

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source "https://rubygems.org"
2+
3+
gem "github-pages", group: :jekyll_plugins
4+
gem "html-proofer", "~> 5.0"

SearchConsoleMonitor.html

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
2-
layout: default
3-
permalink: /scm
2+
layout: none
43
---
54
<!DOCTYPE html>
6-
<html>
5+
<html lang="en">
76
<head>
7+
<meta charset="UTF-8" />
8+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
9+
<meta name="robots" content="noindex, nofollow" />
810
<title>Indexed Pages Monitor</title>
9-
<!-- Load Google APIs base client (needed for gapi.client.setToken if you want) -->
10-
<script src="https://apis.google.com/js/api.js"></script>
1111
<!-- Load Google Identity Services -->
1212
<script src="https://accounts.google.com/gsi/client" async defer onload="gisLoaded()"></script>
1313
</head>
1414
<body>
1515
<h1>Indexed Pages Count</h1>
16-
<button id="authBtn" onclick="authorizeAndFetch()">Authorize & Fetch</button>
16+
<button id="authBtn" type="button">Authorize & Fetch</button>
1717
<pre id="output"></pre>
1818

1919
<script>
@@ -36,6 +36,11 @@ <h1>Indexed Pages Count</h1>
3636

3737
// Trigger authorization
3838
function authorizeAndFetch() {
39+
if (!tokenClient) {
40+
document.getElementById('output').innerText =
41+
'Google authorization is still loading. Please try again.';
42+
return;
43+
}
3944
tokenClient.requestAccessToken();
4045
}
4146

@@ -51,6 +56,10 @@ <h1>Indexed Pages Count</h1>
5156
);
5257
const data = await resp.json();
5358

59+
if (!resp.ok) {
60+
throw new Error(data.error?.message || `Request failed (${resp.status})`);
61+
}
62+
5463
if (data.sitemap && data.sitemap.length > 0) {
5564
let output = '';
5665
data.sitemap.forEach((smap) => {
@@ -74,6 +83,10 @@ <h1>Indexed Pages Count</h1>
7483
document.getElementById('output').innerText =
7584
`${label}: ${JSON.stringify(err, null, 2)}`;
7685
}
86+
87+
document
88+
.getElementById('authBtn')
89+
.addEventListener('click', authorizeAndFetch);
7790
</script>
7891
</body>
7992
</html>

_articles/anothertest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
layout: news
3+
published: false
34

45
title: "Test ig?"
56

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
title: PWindows
22
description: Discover PWindows, not just a Minecraft server
33
url: "https://www.pwindows.qzz.io"
4+
exclude:
5+
- SearchConsoleMonitor.html
46
collections:
57
articles:
68
output: true

_includes/header.html

Lines changed: 56 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<!-- Floating particles -->
2-
<div class="particles" id="particles"></div>
2+
<div class="particles" id="particles" aria-hidden="true"></div>
33

44
<!-- Mobile Menu Overlay -->
5-
<div class="menu-overlay" id="mobileMenu">
6-
<nav class="nav-menu">
7-
<a href="/about" class="nav-item btn" onclick="aboutPage()">
5+
<div class="menu-overlay" id="mobileMenu" aria-hidden="true" inert>
6+
<nav class="nav-menu" aria-label="Site menu">
7+
<a href="/about" class="nav-item btn">
88
<img
99
class="nav-item-icon"
1010
src="/assets/mojang/svg/icons/book.png"
@@ -13,16 +13,19 @@
1313
/>
1414
About
1515
</a>
16-
<a href="/articles" class="nav-item btn" onclick="newsPage()">
17-
📰 Newest News
18-
</a>
19-
<a href="#server" class="btn nav-item secondary" onclick="closeMenu()">
20-
🎮 Join Server
16+
<a href="/articles" class="nav-item btn">
17+
<img
18+
class="nav-item-icon"
19+
src="/assets/mojang/svg/icons/magazine.png"
20+
alt="Book icon"
21+
aria-hidden="true"
22+
/>
23+
Newest News
2124
</a>
25+
<a href="/#howtojoin" class="btn nav-item secondary">🎮 Join Server</a>
2226
<a
2327
href="minecraft:?addExternalServer=PWindows|Play.PWindows.qzz.io"
2428
class="btn nav-item primary"
25-
onclick="closeMenu()"
2629
>
2730
🚀 Launch Minecraft
2831
</a>
@@ -31,45 +34,63 @@
3134
<div class="menu-footer">
3235
<p>Connect with PWindows</p>
3336
<div class="social-links">
34-
<a href="#" class="social-link" title="Discord"
35-
><img
36-
onclick="window.location.href = 'https://discord.pwindows.qzz.io/'"
37+
<a
38+
href="https://discord.pwindows.qzz.io/"
39+
class="social-link"
40+
aria-label="PWindows on Discord"
41+
>
42+
<img
3743
class="social-link-img"
38-
src="/assets/mojang/svg/icons/pixel-close.svg"
39-
/></a>
40-
<a href="#" class="social-link" title="YouTube"
41-
><img
42-
onclick="window.location.href = 'https://www.youtube.com/@PWindows'"
44+
src="/assets/mojang/svg/icons/discord.png"
45+
alt=""
46+
/>
47+
</a>
48+
<a
49+
href="https://www.youtube.com/@PWindows"
50+
class="social-link"
51+
aria-label="PWindows on YouTube"
52+
>
53+
<img
4354
class="social-link-img"
4455
src="/assets/mojang/svg/icons/color-youtube.svg"
45-
/></a>
46-
<a href="#" class="social-link" title="Twitter"
47-
><img
48-
onclick="window.location.href = 'https://x.com/pwindowsz'"
56+
alt=""
57+
/>
58+
</a>
59+
<a
60+
href="https://x.com/pwindowsz"
61+
class="social-link"
62+
aria-label="PWindows on X"
63+
>
64+
<img
4965
class="social-link-img"
5066
src="/assets/mojang/svg/icons/color-twitter.svg"
51-
/></a>
67+
alt=""
68+
/>
69+
</a>
5270
</div>
5371
</div>
5472
</div>
5573

5674
<!-- Topbar -->
57-
<nav class="topbar">
58-
<div class="hamburger" id="hamburger">
59-
<div>
75+
<nav class="topbar" aria-label="Primary navigation">
76+
<button
77+
class="hamburger"
78+
id="hamburger"
79+
type="button"
80+
aria-label="Open site menu"
81+
aria-controls="mobileMenu"
82+
aria-expanded="false"
83+
>
84+
<span class="hamburger-lines" aria-hidden="true">
6085
<span></span>
6186
<span></span>
6287
<span></span>
63-
</div>
64-
</div>
88+
</span>
89+
</button>
6590

66-
<div class="logo" id="logo" onclick="goHome()">
67-
<img
68-
src="https://pwindows.qzz.io/assets/PWindows.png"
69-
alt="PWindows Logo"
70-
class="logo-img"
71-
/>
72-
</div>
91+
<a class="logo" id="logo" href="/" aria-label="PWindows home">
92+
<img src="/assets/PWindows.png" alt="PWindows" class="logo-img" />
93+
</a>
7394

7495
<a href="/about" class="about-btn btn">About</a>
7596
</nav>

_includes/schema-org.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"@type": "Organization",
55
"name": "PWindows",
66
"url": "https://www.pwindows.qzz.io",
7-
"logo": "https://www.pwindows.qzz.io/assets/logo.png"
7+
"logo": "{{ '/assets/PWindows.png' | absolute_url }}"
88
}
99
</script>

_layouts/default.html

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,53 @@
11
<!doctype html>
22
<html lang="en">
33
<head>
4+
{% assign page_description = page.summary | default: page.description | default: site.description %}
5+
{% assign page_image = page.banner | default: '/assets/PWindows.png' %}
6+
{% capture page_full_title %}{% if page.url == '/' %}{{ site.title }} — Not just a Minecraft server{% else %}{{ page.title }} | {{ site.title }}{% endif %}{% endcapture %}
47
{% if page.url == "/" %} {% include schema-org.html %} {% endif %}
58
<meta charset="UTF-8" />
69
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>{{ page.title }} | {{ site.title }}</title>
10+
<title>{{ page_full_title | strip }}</title>
811
<link rel="canonical" href="{{ page.url | absolute_url }}" />
9-
<meta name="title" content="{{ page.title }} | {{ site.title }}" />
12+
<meta name="title" content="{{ page_full_title | strip | escape }}" />
1013
<meta name="application-name" content="PWindows" />
1114
<meta property="og:site_name" content="PWindows" />
1215

1316
<meta
1417
name="description"
15-
content="Discover PWindows, not just a Minecraft server"
18+
content="{{ page_description | strip_html | escape }}"
1619
/>
1720
<meta
1821
name="keywords"
1922
content="PWindows, Minecraft, Server, Community, Roblox, Roblox Studio, Studio, Games, MC, PeterMaZep"
2023
/>
21-
<meta name="author" content="PeterMaZep, PWindows" />
24+
<meta name="author" content="{% if page.layout == 'news' %}{{ site.data.staff[page.author].name | escape }}{% else %}PWindows{% endif %}" />
2225

2326
<meta
2427
property="og:title"
25-
content="PWindows - Not just a Minecraft Server"
28+
content="{{ page_full_title | strip | escape }}"
2629
/>
27-
<meta property="og:description" content="Discover PWindows" />
30+
<meta property="og:description" content="{{ page_description | strip_html | escape }}" />
2831
<meta
2932
property="og:image"
30-
content="https://www.pwindows.qzz.io/preview.png"
33+
content="{{ page_image | absolute_url }}"
3134
/>
3235
<meta property="og:url" content="{{ page.url | absolute_url }}" />
33-
<meta property="og:type" content="website" />
36+
<meta property="og:type" content="{% if page.layout == 'news' %}article{% else %}website{% endif %}" />
37+
{% if page.layout == "news" %}
38+
<meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}" />
39+
<meta property="article:author" content="{{ site.data.staff[page.author].name | escape }}" />
40+
{% endif %}
3441

3542
<meta name="twitter:card" content="summary_large_image" />
3643
<meta
3744
name="twitter:title"
38-
content="PWindows - Not just a Minecraft Server"
45+
content="{{ page_full_title | strip | escape }}"
3946
/>
40-
<meta name="twitter:description" content="Discover PWindows" />
47+
<meta name="twitter:description" content="{{ page_description | strip_html | escape }}" />
4148
<meta
4249
name="twitter:image"
43-
content="https://www.pwindows.qzz.io/preview.png"
50+
content="{{ page_image | absolute_url }}"
4451
/>
4552

4653
<!-- Favicons -->
@@ -62,11 +69,18 @@
6269
/>
6370

6471
<meta name="theme-color" content="#ffffff" />
72+
<link rel="manifest" href="/manifest.json" />
6573

6674
<link
6775
rel="stylesheet"
6876
href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}"
6977
/>
78+
{% if page.layout == "news" %}
79+
<link
80+
rel="stylesheet"
81+
href="{{ '/assets/css/news.css?v=' | append: site.github.build_revision | relative_url }}"
82+
/>
83+
{% endif %}
7084
{{ content_for_head }}
7185

7286
<!-- Allow pages to add additional CSS -->
@@ -75,9 +89,8 @@
7589
{% endfor %} {% endif %}
7690
</head>
7791
<body>
78-
{% if page.layout != "news" %}
79-
<h1 style="display: none">{{ page.title }} | {{ site.title }}</h1>
80-
{% endif %} {% include header.html %}
92+
{% include header.html %}
93+
<div class="sr-only" id="site-status" role="status" aria-live="polite"></div>
8194
<main>{{ content }}</main>
8295
<script src="{{ '/assets/js/main.js?v=' | append: site.time | relative_url }}"></script>
8396
</body>

_layouts/news.html

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
layout: default
33
---
44

5-
<head>
6-
<link
7-
rel="stylesheet"
8-
href="{{ '/assets/css/news.css?v=' | append: site.github.build_revision | relative_url }}"
9-
/>
10-
</head>
11-
125
<article class="news-item">
136
<div class="news-banner">
147
{% if page.banner %}
@@ -47,8 +40,24 @@
4740

4841
<div class="article">
4942
<h1 class="article-title">{{ page.title }}</h1>
50-
<div class="summary">{{ page.summary }}</div>
43+
<p class="summary">{{ page.summary }}</p>
5144
<div class="content">{{ content }}</div>
5245
</div>
5346
</div>
5447
</article>
48+
49+
<script type="application/ld+json">
50+
{
51+
"@context": "https://schema.org",
52+
"@type": "Article",
53+
"headline": {{ page.title | jsonify }},
54+
"description": {{ page.summary | strip_html | jsonify }},
55+
"datePublished": "{{ page.date | date_to_xmlschema }}",
56+
"author": {
57+
"@type": "Person",
58+
"name": {{ person.name | jsonify }}
59+
},
60+
"image": "{{ page.banner | default: '/assets/PWindows.png' | absolute_url }}",
61+
"mainEntityOfPage": "{{ page.url | absolute_url }}"
62+
}
63+
</script>

0 commit comments

Comments
 (0)