From 0adf1cf9a2fc3fb6e270f67166c44a587a477dc5 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Fri, 17 Mar 2023 20:17:52 +0800 Subject: some refactors --- src/_includes/layouts/base.njk | 70 ++++++++++++------------------------------ src/_includes/layouts/page.njk | 35 +++++++++++++++++++++ src/index.md | 6 ++-- src/js/chrisApp.js | 30 +++++++++--------- src/lul.njk | 15 ++++----- 5 files changed, 79 insertions(+), 77 deletions(-) create mode 100644 src/_includes/layouts/page.njk diff --git a/src/_includes/layouts/base.njk b/src/_includes/layouts/base.njk index f23e0b3..8688c95 100644 --- a/src/_includes/layouts/base.njk +++ b/src/_includes/layouts/base.njk @@ -1,53 +1,21 @@ -{% block header %} - - - - - - {{ title }} - - - - - {% endblock %} + + + + + + {{ title }} + + + + + -
-
- {% block content %} - {{ content | safe }} - {% endblock %} -
- {% block footer %} -
- - legalize now! - acab - powered by fedora - let's crush capitalism! -
best viewed with any browser - weezer fan - play with steam - made with vi - pride - imagination -
mozilla is cool - completely free software - graphics by gimp - marijuana mind explorer - javascript free - keep the web free! say no to web3! - tired - hey arnold! - powered by bob - counter-strike player - chris troll -
- {% endblock %} -
+ {{ content | safe }} + {% block footer %} + + {% endblock %} -
- - \ No newline at end of file + diff --git a/src/_includes/layouts/page.njk b/src/_includes/layouts/page.njk new file mode 100644 index 0000000..7eb4218 --- /dev/null +++ b/src/_includes/layouts/page.njk @@ -0,0 +1,35 @@ +--- +layout: "layouts/base.njk" +--- + +
+
+ {{ content | safe }} +
+
+ legalize now! + acab + powered by fedora + let's crush capitalism! +
+ best viewed with any browser + weezer fan + play with steam + made with vi + pride + imagination +
+ mozilla is cool + completely free software + graphics by gimp + marijuana mind explorer + javascript free + keep the web free! say no to web3! + tired + hey arnold! +
+ powered by bob + counter-strike player + chris troll +
+
diff --git a/src/index.md b/src/index.md index 193f881..360a17e 100644 --- a/src/index.md +++ b/src/index.md @@ -1,5 +1,5 @@ --- -layout: layouts/base.njk +layout: layouts/page.njk title: guzzle guzzle description: getchoo's website --- @@ -8,4 +8,6 @@ description: getchoo's website this is under construction. i'm experimenting with lume -![construction](/imgs/construction.png) \ No newline at end of file +![construction](/imgs/construction.png) + +[click here](/lul/) diff --git a/src/js/chrisApp.js b/src/js/chrisApp.js index bf51176..4881b7a 100644 --- a/src/js/chrisApp.js +++ b/src/js/chrisApp.js @@ -1,23 +1,23 @@ const chrisURL = "/imgs/chris/"; function randomChris() { - const files = [ - "chis_very_fried.jpg", - "chris_medium_fried.jpg", - "chris_moshed.jpg", - "fried_publisher.jpg", - "help_me.png", - "nice_chris.png", - "nice_publisher.png", - "bkender_bauob.jpg", - "blurry_chris.jpg", - ]; + const files = [ + "chis_very_fried.jpg", + "chris_medium_fried.jpg", + "chris_moshed.jpg", + "fried_publisher.jpg", + "help_me.png", + "nice_chris.png", + "nice_publisher.png", + "bkender_bauob.jpg", + "blurry_chris.jpg", + ]; - // this chooses a random file from the array - const url = chrisURL + files[Math.floor(Math.random() * files.length)]; + // this chooses a random file from the array + const url = chrisURL + files[Math.floor(Math.random() * files.length)]; - window.location.href = url; + window.location.href = url; } -var chris = document.getElementById("chris_gif"); +const chris = document.getElementById("chris_gif"); chris.addEventListener("click", randomChris); diff --git a/src/lul.njk b/src/lul.njk index db2aa35..d0e249a 100644 --- a/src/lul.njk +++ b/src/lul.njk @@ -1,14 +1,11 @@ --- title: fard description: xd +layout: "layouts/base.njk" --- -{% extends "_includes/layouts/base.njk" %} -{% block body %} -
- -
-{% endblock %} -{% block footer %}{% endblock %} \ No newline at end of file +
+ +
-- cgit v1.2.3