diff --git a/_includes/layouts/header.njk b/_includes/layouts/header.njk index 0e5ff23..1f8eee8 100644 --- a/_includes/layouts/header.njk +++ b/_includes/layouts/header.njk @@ -1,15 +1,21 @@ {% set css %} -{% include "styles/base.css" %} -{% include "styles/font.css" %} -{% include "styles/accessibility.css" %} -{% include "styles/navbar.css" %} -{% include "styles/windows.css" %} -{% include "styles/footer.css" %} -{% include "styles/animations.css" %} -{% include "styles/icons.css" %} -{% include "styles/pages/home.css" %} -{% include "styles/pages/notebook.css" %} -{% include "styles/pages/sneexy.css" %} + {% include "styles/base.css" %} + {% include "styles/font.css" %} + {% include "styles/accessibility.css" %} + {% include "styles/navbar.css" %} + {% include "styles/windows.css" %} + {% include "styles/footer.css" %} + {% include "styles/animations.css" %} + {% include "styles/icons.css" %} + {% include "styles/pages/home.css" %} + {% include "styles/pages/notebook.css" %} + {% include "styles/pages/sneexy.css" %} +{% endset %} + +{% set js %} + {% include "scripts/alt-popup.js" %} + {% include "scripts/button.js" %} + {% include "scripts/settings.js" %} {% endset %} @@ -24,9 +30,7 @@ - - - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/scripts/alt-popup.js b/_includes/scripts/alt-popup.js similarity index 100% rename from scripts/alt-popup.js rename to _includes/scripts/alt-popup.js diff --git a/scripts/button.js b/_includes/scripts/button.js similarity index 100% rename from scripts/button.js rename to _includes/scripts/button.js diff --git a/scripts/settings.js b/_includes/scripts/settings.js similarity index 100% rename from scripts/settings.js rename to _includes/scripts/settings.js diff --git a/assets/sharkey_color.svg b/assets/sharkey_color.svg deleted file mode 100644 index e2725f9..0000000 --- a/assets/sharkey_color.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/sharkey_web.svg b/assets/sharkey_web.svg deleted file mode 100644 index ae49863..0000000 --- a/assets/sharkey_web.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/eleventy.config.js b/eleventy.config.js index 5208624..4b0dd26 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1,6 +1,7 @@ import { feedPlugin } from "@11ty/eleventy-plugin-rss"; -import eleventyNavigationPlugin from "@11ty/eleventy-navigation"; +import { minify } from "terser"; import { transform } from "lightningcss"; +import eleventyNavigationPlugin from "@11ty/eleventy-navigation"; export default function(eleventyConfig) { eleventyConfig.addPassthroughCopy("assets/"); @@ -14,6 +15,11 @@ export default function(eleventyConfig) { return result.code.toString('utf-8') }); + eleventyConfig.addFilter("jsmin", async function (code) { + const minified = await minify(code); + return minified.code; + }); + eleventyConfig.addPlugin(eleventyNavigationPlugin); eleventyConfig.addPlugin(feedPlugin, { diff --git a/package-lock.json b/package-lock.json index bf7ad21..2fa680b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,8 @@ "@11ty/eleventy": "^3.1.0", "@11ty/eleventy-navigation": "^1.0.4", "@11ty/eleventy-plugin-rss": "^2.0.4", - "lightningcss": "^1.30.1" + "lightningcss": "^1.30.1", + "terser": "^5.40.0" } }, "node_modules/@11ty/dependency-tree": { @@ -220,6 +221,64 @@ "node": ">=18" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@sindresorhus/slugify": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@sindresorhus/slugify/-/slugify-2.2.1.tgz", @@ -436,6 +495,12 @@ "node": ">=8" } }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -1712,6 +1777,25 @@ "node": ">=8.0.0" } }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -1748,6 +1832,30 @@ "node": ">=0.10.0" } }, + "node_modules/terser": { + "version": "5.40.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.40.0.tgz", + "integrity": "sha512-cfeKl/jjwSR5ar7d0FGmave9hFGJT8obyo0z+CrQOylLDbk7X81nPU6vq9VORa5jU30SkDnT2FXjLbR8HLP+xA==", + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.14.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "license": "MIT" + }, "node_modules/tinyglobby": { "version": "0.2.14", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", diff --git a/package.json b/package.json index b47457f..30b6084 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@11ty/eleventy": "^3.1.0", "@11ty/eleventy-navigation": "^1.0.4", "@11ty/eleventy-plugin-rss": "^2.0.4", - "lightningcss": "^1.30.1" + "lightningcss": "^1.30.1", + "terser": "^5.40.0" } }