From 4eda43f39b2725ad61db35866453717b525c764f Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Sun, 2 Jun 2024 11:15:26 +0200 Subject: [PATCH] Use templates better to remove a ton of code duplication (#254) * Fix broken links in update posts They were using relative links still which became invalid by moving directories. It's better to link stuff absolutely anyway. * Remove unused 'secure' registration and login pages * Remove obsolete parse.py * Use templates better to remove a ton of code duplication Where it made sense I converted HTML pages to Markdown to ease writing and discourage custom styling as much as possible. These pages can still use custom HTML when necessary, and some do, but they are easier to read and understand now. --- 404.html | 148 +-- _includes/active-menu.html | 2 +- _includes/breadcrumbs.html | 36 +- _includes/footer.html | 4 +- _includes/further-help.html | 8 + _includes/head.html | 27 + _includes/header.html | 23 + _includes/image.html | 4 + _includes/menu.html | 52 +- _includes/website-overhaul-notice.html | 11 + _layouts/base.html | 61 + _layouts/community.html | 38 + _layouts/default.html | 63 +- _layouts/funorbgame.html | 4 +- _layouts/guide.html | 104 +- _layouts/newspost.html | 247 ++-- assets/images/android.svg | 3 + assets/images/linux.svg | 3 + assets/images/macos.svg | 3 + assets/images/windows.svg | 3 + index.html | 418 +++---- parse.py | 37 - secure/m=create/index-2.html | 959 --------------- secure/m=create/index.html | 631 ---------- secure/m=weblogin/loginform0d5c.html | 309 ----- secure/m=weblogin/loginform14d4.html | 309 ----- secure/m=weblogin/loginform1def.html | 309 ----- secure/m=weblogin/loginform20bd.html | 309 ----- secure/m=weblogin/loginform4597.html | 309 ----- secure/m=weblogin/loginform53bb.html | 309 ----- secure/m=weblogin/loginform7114.html | 309 ----- secure/m=weblogin/loginform802b.html | 309 ----- secure/m=weblogin/loginform929b.html | 309 ----- secure/m=weblogin/loginforma08a.html | 309 ----- secure/m=weblogin/loginformc089.html | 309 ----- secure/m=weblogin/loginforme7b4.html | 309 ----- services/m=data/drop-table/index.html | 45 +- .../{ => drop-table}/js/DataStructures.js | 0 .../js/components/ItemData.js | 0 .../js/components/ItemSources.js | 0 .../js/components/NPCDrops.js | 0 .../{ => drop-table}/js/components/Navbar.js | 0 .../m=data/{ => drop-table}/js/searchtool.js | 0 services/m=data/rdt.html | 223 +++- services/m=funorb/gamelist.html | 4 +- services/m=funorb/games/index.html | 205 ++-- services/m=funorb/google59c3b1a60dac4e74.html | 1 - services/m=funorb/index.html | 4 +- services/m=funorb/info.html | 6 +- site/archives/archived.html | 291 +---- site/archives/archived_hall_of_fame.html | 1029 ++++++----------- site/candybox/index.html | 4 +- site/classicapplet/playclassic.html | 223 ++-- site/community/community.html | 1 - site/community/contributors.html | 193 ---- site/community/contributors.md | 76 ++ site/community/hall_of_fame.html | 152 +-- site/community/hall_of_fame_x1.html | 270 ----- site/community/hall_of_fame_x1.md | 200 ++++ site/community/hall_of_fame_x10.html | 207 ---- site/community/hall_of_fame_x10.md | 121 ++ site/community/hall_of_fame_x2.5.html | 270 ----- site/community/hall_of_fame_x2.5.md | 200 ++++ site/community/hall_of_fame_x5.html | 270 ----- site/community/hall_of_fame_x5.md | 196 ++++ site/community/index.html | 213 ++-- site/community/jagex_launcher_linux.html | 211 ---- site/community/jagex_launcher_linux.md | 91 ++ site/community/lores/duo-castillo.html | 0 site/community/lores/lores.html | 0 site/community/runescapeVR.html | 249 ---- site/community/runescapeVR.md | 143 +++ site/community/staff.html | 310 ----- site/community/staff.md | 216 ++++ site/css/kbase-6.css | 43 +- site/css/news-2.css | 10 +- site/game_guide/about2009scape.html | 87 -- site/game_guide/about2009scape.md | 38 + site/game_guide/adventurebots.html | 116 -- site/game_guide/adventurebots.md | 28 + site/game_guide/client-plugins.html | 140 --- site/game_guide/client-plugins.md | 89 ++ site/game_guide/controls.html | 81 -- site/game_guide/controls.md | 32 + site/game_guide/credits.html | 168 --- site/game_guide/credits.md | 89 ++ site/game_guide/how_do_i_get_started0.html | 55 - site/game_guide/index.html | 244 ++-- site/game_guide/play.html | 633 +++++----- site/game_guide/singleplayer.html | 197 ---- site/game_guide/singleplayer.md | 102 ++ site/game_guide/skill_cape_perks.html | 323 ++---- site/game_guide/the_commands.html | 219 ---- site/game_guide/the_commands.md | 136 +++ site/game_guide/themed_worlds.html | 142 --- site/game_guide/themed_worlds.md | 71 ++ site/game_guide/ur-tag.html | 92 -- site/game_guide/ur-tag.md | 15 + site/game_guide/zanik.html | 120 -- site/game_guide/zanik.md | 38 + site/help/help_hub.html | 1 - site/help/index.html | 67 +- site/privacy/privacy.html | 73 -- site/privacy/privacy.md | 39 + site/rules/rules.html | 58 - site/rules/rules.md | 39 + site/terms/index.html | 662 +++++++++++ site/terms/terms.html | 697 ----------- updates/_posts/2020-11-29-Candybox.html | 2 +- updates/_posts/2021-03-13-Master-farmers.html | 4 +- .../2021-03-21-Rolling-the-credits.html | 2 +- .../2021-03-23-Our-first-community-event.html | 2 +- .../2021-05-05-The-halt-on-updates.html | 2 +- .../2021-06-27-Adding-to-the-legacy.html | 2 +- .../2021-07-19-Hidden-in-the-stars.html | 2 +- ...021-10-12-Sweeping-it-under-the-vines.html | 4 +- updates/_posts/2021-10-18-Trick-or-Treat.html | 2 +- 117 files changed, 4898 insertions(+), 12289 deletions(-) create mode 100644 _includes/further-help.html create mode 100644 _includes/head.html create mode 100644 _includes/header.html create mode 100644 _includes/image.html create mode 100644 _includes/website-overhaul-notice.html create mode 100644 _layouts/base.html create mode 100644 _layouts/community.html create mode 100644 assets/images/android.svg create mode 100644 assets/images/linux.svg create mode 100644 assets/images/macos.svg create mode 100644 assets/images/windows.svg delete mode 100644 parse.py delete mode 100644 secure/m=create/index-2.html delete mode 100644 secure/m=create/index.html delete mode 100644 secure/m=weblogin/loginform0d5c.html delete mode 100644 secure/m=weblogin/loginform14d4.html delete mode 100644 secure/m=weblogin/loginform1def.html delete mode 100644 secure/m=weblogin/loginform20bd.html delete mode 100644 secure/m=weblogin/loginform4597.html delete mode 100644 secure/m=weblogin/loginform53bb.html delete mode 100644 secure/m=weblogin/loginform7114.html delete mode 100644 secure/m=weblogin/loginform802b.html delete mode 100644 secure/m=weblogin/loginform929b.html delete mode 100644 secure/m=weblogin/loginforma08a.html delete mode 100644 secure/m=weblogin/loginformc089.html delete mode 100644 secure/m=weblogin/loginforme7b4.html rename services/m=data/{ => drop-table}/js/DataStructures.js (100%) rename services/m=data/{ => drop-table}/js/components/ItemData.js (100%) rename services/m=data/{ => drop-table}/js/components/ItemSources.js (100%) rename services/m=data/{ => drop-table}/js/components/NPCDrops.js (100%) rename services/m=data/{ => drop-table}/js/components/Navbar.js (100%) rename services/m=data/{ => drop-table}/js/searchtool.js (100%) delete mode 100644 services/m=funorb/google59c3b1a60dac4e74.html delete mode 100644 site/community/community.html delete mode 100644 site/community/contributors.html create mode 100644 site/community/contributors.md delete mode 100644 site/community/hall_of_fame_x1.html create mode 100644 site/community/hall_of_fame_x1.md delete mode 100644 site/community/hall_of_fame_x10.html create mode 100644 site/community/hall_of_fame_x10.md delete mode 100644 site/community/hall_of_fame_x2.5.html create mode 100644 site/community/hall_of_fame_x2.5.md delete mode 100644 site/community/hall_of_fame_x5.html create mode 100644 site/community/hall_of_fame_x5.md delete mode 100644 site/community/jagex_launcher_linux.html create mode 100644 site/community/jagex_launcher_linux.md delete mode 100644 site/community/lores/duo-castillo.html delete mode 100644 site/community/lores/lores.html delete mode 100644 site/community/runescapeVR.html create mode 100644 site/community/runescapeVR.md delete mode 100644 site/community/staff.html create mode 100644 site/community/staff.md delete mode 100644 site/game_guide/about2009scape.html create mode 100644 site/game_guide/about2009scape.md delete mode 100644 site/game_guide/adventurebots.html create mode 100644 site/game_guide/adventurebots.md delete mode 100644 site/game_guide/client-plugins.html create mode 100644 site/game_guide/client-plugins.md delete mode 100644 site/game_guide/controls.html create mode 100644 site/game_guide/controls.md delete mode 100644 site/game_guide/credits.html create mode 100644 site/game_guide/credits.md delete mode 100644 site/game_guide/how_do_i_get_started0.html delete mode 100644 site/game_guide/singleplayer.html create mode 100644 site/game_guide/singleplayer.md delete mode 100644 site/game_guide/the_commands.html create mode 100644 site/game_guide/the_commands.md delete mode 100644 site/game_guide/themed_worlds.html create mode 100644 site/game_guide/themed_worlds.md delete mode 100644 site/game_guide/ur-tag.html create mode 100644 site/game_guide/ur-tag.md delete mode 100644 site/game_guide/zanik.html create mode 100644 site/game_guide/zanik.md delete mode 100644 site/help/help_hub.html delete mode 100644 site/privacy/privacy.html create mode 100644 site/privacy/privacy.md delete mode 100644 site/rules/rules.html create mode 100644 site/rules/rules.md create mode 100644 site/terms/index.html delete mode 100644 site/terms/terms.html diff --git a/404.html b/404.html index 8aae06860..1ed33ea2d 100644 --- a/404.html +++ b/404.html @@ -3,101 +3,65 @@ layout: guide tag: 404 title: 404 - Page Not Found --- - -
-
-
-
-
-

News

-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
- -   - 404 - Page Not Found -   - - Next - -
-
-

- You've followed a link we didn't code yet! - Head back to the - Main Page. -

-

- One day a developer came along and gave us - this website then disappeared into the - mist. -

+ +
+ +   + 404 - Page Not Found +   + + Next + +
+
+

+ You've followed a link we didn't code yet! + Head back to the + Main Page. +

-

- Another developer came and cleaned it up, - making the website functional and - navigationable for the 2009 emulation's - purposes - but links are missing and - broken all over the place! -

+

+ One day a developer came along and gave us + this website then disappeared into the + mist. +

-

- So where does that leave us (and you?) - - Well, if you're just here to play the - game, head to our main page and hop on! If - you want to help fix our little problem, - read on! -

+

+ Another developer came and cleaned it up, + making the website functional and + navigationable for the 2009 emulation's + purposes - but links are missing and + broken all over the place! +

-

- We actually have all the pages, they just - need their links fixed. If you're a - developer and want to help fix this, clone - our website repository from - GitHub - and open title.html - you'll notice - something a little special, but more - importantly, you'll notice all the links - work ;). We need your help making - index.html link to all the right places! -

+

+ So where does that leave us (and you?) - + Well, if you're just here to play the + game, head to our main page and hop on! If + you want to help fix our little problem, + read on! +

-

- Red Bracket
2009scape Content - Developer
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+

+ We actually have all the pages, they just + need their links fixed. If you're a + developer and want to help fix this, clone + our website repository from + GitHub + and open title.html - you'll notice + something a little special, but more + importantly, you'll notice all the links + work ;). We need your help making + index.html link to all the right places! +

+ +

+ Red Bracket
2009scape Content Developer
+

\ No newline at end of file diff --git a/_includes/active-menu.html b/_includes/active-menu.html index a81ca3fa8..f6d36e0fc 100644 --- a/_includes/active-menu.html +++ b/_includes/active-menu.html @@ -8,7 +8,7 @@ {% elsif include.content == "guide" and crumbs[2] == "game_guide" or crumbs[2] == "rules" %} -{% elsif include.content == "community" and crumbs[2] == "community" or crumbs[2] == "m=hiscore" %} +{% elsif include.content == "community" and crumbs[2] == "community" or crumbs[2] == "m=hiscore" or crumbs[1] == "site" and crumbs[2] == "archives" %} {% elsif include.content == "help" and crumbs[2] == "help" %} diff --git a/_includes/breadcrumbs.html b/_includes/breadcrumbs.html index 286a8c3d2..0c49e5f1a 100644 --- a/_includes/breadcrumbs.html +++ b/_includes/breadcrumbs.html @@ -1,20 +1,20 @@ \ No newline at end of file diff --git a/_includes/footer.html b/_includes/footer.html index 4ab47eec9..d55ebbdec 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -3,8 +3,8 @@
Copyright © 2023 under AGPL. 2009Scape is not affiliated with RuneScape or Jagex Ltd.
- Use of our Game's source code is subject to our Terms & - Conditions and Privacy Policy.
+ Use of our Game's source code is subject to our Terms & + Conditions and Privacy Policy.
2009Scape Logo diff --git a/_includes/further-help.html b/_includes/further-help.html new file mode 100644 index 000000000..2afd68a25 --- /dev/null +++ b/_includes/further-help.html @@ -0,0 +1,8 @@ +

Further Help

+

Need more help? Come chat with us!

+
+ +
\ No newline at end of file diff --git a/_includes/head.html b/_includes/head.html new file mode 100644 index 000000000..929abfb6f --- /dev/null +++ b/_includes/head.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + {{ site.title }} - {{ page.title }} + + \ No newline at end of file diff --git a/_includes/header.html b/_includes/header.html new file mode 100644 index 000000000..e2c1bdd0f --- /dev/null +++ b/_includes/header.html @@ -0,0 +1,23 @@ + \ No newline at end of file diff --git a/_includes/image.html b/_includes/image.html new file mode 100644 index 000000000..959a1c3c9 --- /dev/null +++ b/_includes/image.html @@ -0,0 +1,4 @@ +
+ {{ include.description }} +
{{ include.description }}
+
\ No newline at end of file diff --git a/_includes/menu.html b/_includes/menu.html index 7bd54c247..8375008dc 100644 --- a/_includes/menu.html +++ b/_includes/menu.html @@ -1,18 +1,22 @@
\ No newline at end of file diff --git a/_includes/website-overhaul-notice.html b/_includes/website-overhaul-notice.html new file mode 100644 index 000000000..25e2dd57e --- /dev/null +++ b/_includes/website-overhaul-notice.html @@ -0,0 +1,11 @@ +
+
+
+
+ Important Information +
+ This entire website is getting a massive overhaul and this page will change. + If you need any help at all ask a staff member either on our Discord or if you do not prefer discord check out our Forums! +
+
+
\ No newline at end of file diff --git a/_layouts/base.html b/_layouts/base.html new file mode 100644 index 000000000..3bf614491 --- /dev/null +++ b/_layouts/base.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + {{ site.title }} - {{ page.title }} + + + + + +
+ + {{content}} + + {% include footer.html %} +
+ + + + diff --git a/_layouts/community.html b/_layouts/community.html new file mode 100644 index 000000000..bc8c2e536 --- /dev/null +++ b/_layouts/community.html @@ -0,0 +1,38 @@ + + +{% include head.html %} + + + +
+ {% include header.html %} + + + +
+
+
+
+
+

{{ page.title }}

+
+
+
+
+ {{ content }} +
+
+
+ + {% include footer.html %} +
+ + \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html index 1d86d5713..a89875a29 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,61 +1,26 @@ - + - - - - - - - - - - - - - - - {{ site.title }} - {{ page.title }} - - - +{% include head.html %} -
-