From cf3149d69bf3180f70473d1102bb3d6532891479 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 11 Aug 2024 17:22:24 +0200 Subject: [PATCH 1/2] refactor: remove legacy js files --- source/code/hippie/config.js | 22 ---------------------- source/code/hippie/main.js | 29 ----------------------------- 2 files changed, 51 deletions(-) delete mode 100644 source/code/hippie/config.js delete mode 100644 source/code/hippie/main.js diff --git a/source/code/hippie/config.js b/source/code/hippie/config.js deleted file mode 100644 index 379a767..0000000 --- a/source/code/hippie/config.js +++ /dev/null @@ -1,22 +0,0 @@ -var hippie = { - brand: "|-| | |^ |^ | [- ", - screen: { - w: Math.max(document.documentElement.offsetWidth, document.documentElement.clientWidth, window.innerWidth, 0), - vh: Math.max(document.documentElement.clientHeight, window.innerHeight, 0), - dh: Math.max(document.documentElement.offsetHeight, document.documentElement.clientHeight, 0), - y: Math.min($(document).scrollTop(), document.documentElement.scrollTop) - // hippie.screen.y: document.documentElement.scrollTop - }, - body: { - w: Math.max(document.body.offsetWidth, document.body.clientWidth, window.innerWidth, 0), - h: Math.max(document.body.offsetHeight, document.body.clientHeight, 0), - } -}; - -var viewHover = true; -var basicEase = 600; - -var onerowAlphabet = "/\\ ]3 ( |) [- /= (_, |-| | _T /< |_ |\\/| |\\| () |^ ()_ /? _\\~ ~|~ |_| \\/ \\/\\/ >< `/ ~/_ "; -var onerowDigits = "\'| ^/_ -} +| ;~ (o \"/ {} \"| (\\) "; - -export { hippie }; \ No newline at end of file diff --git a/source/code/hippie/main.js b/source/code/hippie/main.js deleted file mode 100644 index 6de9686..0000000 --- a/source/code/hippie/main.js +++ /dev/null @@ -1,29 +0,0 @@ -// Setup -// ----------------------------------------------------------------------------- -import { hippie } from './config.js'; - -// This is called everytime -function setup() { - 'use strict'; - - console.group('Document information'); - console.info('\n', config.brand, '\n\n'); - console.info('\n', hippie.brand, '\n\n'); - console.info('HTML:', hippie.screen, '\nBODY:', hippie.body); - console.groupEnd(); - if (debugOn) { - console.group('Debug information'); - console.dir(hippie); - console.groupEnd(); - } - - // WANNABE MODULE Mouse over effect - // With CSS only - if ($('#js_mob').length && viewHover) { - $('#js_mob').addClass('mouse_over'); - } - // if (viewHover) { - // $('body').prepend('
'); - // } - // With JS -} From fa63f026c5beae69b608aff97982de28778807c1 Mon Sep 17 00:00:00 2001 From: sthag Date: Sun, 11 Aug 2024 17:23:31 +0200 Subject: [PATCH 2/2] fix: move demo links to correct templates --- .eleventy.js | 3 ++- source/templates/demo/_default.njk | 1 + source/templates/demo/_main.njk | 3 +++ source/templates/demo/_maintenance.njk | 5 ++--- source/templates/hippie/_default.njk | 1 - source/templates/hippie/_main.njk | 1 - source/templates/hippie/_maintenance.njk | 1 - 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 5218bd8..7e00e33 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -18,7 +18,8 @@ module.exports = function (eleventyConfig) { brand: 'hippie', titlePrefix: '', titlePostfix: ' - HIPPIE', - debugMode: true + debugMode: true, + legacyMode: false }); eleventyConfig.addPassthroughCopy({"source/art/images": "art"}); diff --git a/source/templates/demo/_default.njk b/source/templates/demo/_default.njk index 19f5c0b..3801125 100644 --- a/source/templates/demo/_default.njk +++ b/source/templates/demo/_default.njk @@ -8,6 +8,7 @@ {% block links %} {{ super() }} + {# #} {# #} {% endblock %} diff --git a/source/templates/demo/_main.njk b/source/templates/demo/_main.njk index c80afc1..c0d545d 100644 --- a/source/templates/demo/_main.njk +++ b/source/templates/demo/_main.njk @@ -8,12 +8,15 @@ {% block links %} {{ super() }} +{% if hippie.legacyMode %} +{% endif %} + {% endblock %} diff --git a/source/templates/demo/_maintenance.njk b/source/templates/demo/_maintenance.njk index 0fe1365..539b432 100644 --- a/source/templates/demo/_maintenance.njk +++ b/source/templates/demo/_maintenance.njk @@ -8,6 +8,5 @@ {% block links %} {{ super() }} - {# #} - {# #} -{% endblock %} + +{% endblock %} \ No newline at end of file diff --git a/source/templates/hippie/_default.njk b/source/templates/hippie/_default.njk index bdaf5ed..77a73ff 100644 --- a/source/templates/hippie/_default.njk +++ b/source/templates/hippie/_default.njk @@ -21,7 +21,6 @@ {% block links %} {% include "hippie/partials/_head_links.njk" %} - {% endblock %} {{ log.log('HEAD end :: Links parsed, starting to load.') }} diff --git a/source/templates/hippie/_main.njk b/source/templates/hippie/_main.njk index 20ccda5..a8d409e 100644 --- a/source/templates/hippie/_main.njk +++ b/source/templates/hippie/_main.njk @@ -21,7 +21,6 @@ {% block links %} {% include "hippie/partials/_head_links.njk" %} - {% endblock %} {{ log.log('HEAD end :: Links parsed, starting to load.') }} diff --git a/source/templates/hippie/_maintenance.njk b/source/templates/hippie/_maintenance.njk index 540b310..d8b3087 100644 --- a/source/templates/hippie/_maintenance.njk +++ b/source/templates/hippie/_maintenance.njk @@ -16,7 +16,6 @@ {% block links %} - {% endblock %} {% endblock %}