diff --git a/.eleventy.js b/.eleventy.js index 7e66811..dcfb05c 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,7 +1,7 @@ +import { RenderPlugin, IdAttributePlugin } from "@11ty/eleventy"; import eleventyNavigationPlugin from "@11ty/eleventy-navigation"; import markdownIt from "markdown-it"; import markdownItFootnote from "markdown-it-footnote"; -import markdownItAnchor from "markdown-it-anchor"; import { DateTime } from "luxon"; export default function (eleventyConfig) { @@ -13,18 +13,19 @@ export default function (eleventyConfig) { }; let md = markdownIt(MARKDOWN_OPTIONS) - .use(markdownItFootnote) - .use(markdownItAnchor); + .use(markdownItFootnote); // Libraries eleventyConfig.setLibrary("md", md); // Plugins + eleventyConfig.addPlugin(RenderPlugin); + eleventyConfig.addPlugin(IdAttributePlugin); eleventyConfig.addPlugin(eleventyNavigationPlugin); // Filters eleventyConfig.addFilter("formatDate", (dateObj) => { - return DateTime.fromJSDate(dateObj).toFormat('dd LLL yyyy, HH:mm ZZZZ'); + return DateTime.fromJSDate(dateObj).toFormat("dd LLL yyyy, HH:mm ZZZZ"); }); eleventyConfig.addFilter("mdinline", (content) => { return md.renderInline(content); @@ -34,7 +35,7 @@ export default function (eleventyConfig) { ["src/assets"].forEach((path) => { eleventyConfig.addPassthroughCopy(path); }); - + eleventyConfig.addWatchTarget("./src/assets/css"); return { diff --git a/package-lock.json b/package-lock.json index 6ea7e5a..f8a5e7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,6 @@ "@11ty/eleventy-navigation": "^1.0.4", "luxon": "^3.6.1", "markdown-it": "^14.1.0", - "markdown-it-anchor": "^9.2.0", "markdown-it-footnote": "^4.0.0", "sass": "^1.87.0" }, @@ -653,31 +652,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@types/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", - "license": "MIT", - "peer": true - }, - "node_modules/@types/markdown-it": { - "version": "14.1.2", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", - "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", - "license": "MIT", - "peer": true, - "dependencies": { - "@types/linkify-it": "^5", - "@types/mdurl": "^2" - } - }, - "node_modules/@types/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", - "license": "MIT", - "peer": true - }, "node_modules/a-sync-waterfall": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", @@ -2831,16 +2805,6 @@ "markdown-it": "bin/markdown-it.mjs" } }, - "node_modules/markdown-it-anchor": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-9.2.0.tgz", - "integrity": "sha512-sa2ErMQ6kKOA4l31gLGYliFQrMKkqSO0ZJgGhDHKijPf0pNFM9vghjAh3gn26pS4JDRs7Iwa9S36gxm3vgZTzg==", - "license": "Unlicense", - "peerDependencies": { - "@types/markdown-it": "*", - "markdown-it": "*" - } - }, "node_modules/markdown-it-footnote": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-4.0.0.tgz", diff --git a/package.json b/package.json index 9450701..449c948 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "@11ty/eleventy-navigation": "^1.0.4", "luxon": "^3.6.1", "markdown-it": "^14.1.0", - "markdown-it-anchor": "^9.2.0", "markdown-it-footnote": "^4.0.0", "sass": "^1.87.0" }, @@ -25,5 +24,5 @@ "@11ty/eleventy": "^3.0.0", "npm-run-all": "^4.1.5" }, - "type":"module" + "type": "module" } diff --git a/scss/main.scss b/scss/main.scss index d1c1296..4f4f46c 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -13,6 +13,9 @@ body { a { color: var(--color-link); + &:hover { + text-decoration-thickness: 3px; + } } h1, @@ -54,6 +57,11 @@ hr { border: solid var(--color-normal) 2px; border-bottom-width: 5px; border-radius: 5px; + background-color: var(--color-paper); + padding: 10px; + :first-child { + margin-top: 0; + } } .navbar { @@ -63,11 +71,8 @@ hr { gap: 5px; a { @extend .box; - display: inline; width: 100%; - background-color: var(--color-paper); color: var(--color-accent); - padding: 10px; font-weight: bold; text-decoration: none; &:hover { @@ -84,27 +89,38 @@ hr { .page-footer { @extend .box; - background-color: var(--color-paper); - padding: 10px; margin: 5px 0; - :first-child { - margin-top: 0; - } } .site-footer { - @extend .page-footer; + @extend .box; + gap: 5px; margin: 0 0 50px 0; } .page-container { + display: flex; + flex-direction: column; + gap: 5px; main { @extend .box; width: 100%; - background-color: var(--color-paper); - padding: 10px; - :first-child { - margin-top: 0; + } +} + +.home-container { + display: flex; + flex-direction: column; + gap: 5px; + .widget-updates, + .widget-socials { + @extend .box; + } + @include media.breakpoint(medium) { + display: grid; + grid-template-columns: repeat(2, 1fr); + main { + grid-column: 1 / 4; } } } diff --git a/src/404.md b/src/404.md index 8c3d050..124c628 100644 --- a/src/404.md +++ b/src/404.md @@ -1,6 +1,6 @@ --- title: 'Error 404: Not found' -layout: base.njk +layout: default.njk permalink: '404.html' --- diff --git a/src/_data/socials.json b/src/_data/socials.json new file mode 100644 index 0000000..d57ec00 --- /dev/null +++ b/src/_data/socials.json @@ -0,0 +1,38 @@ +[ + { + "label": "Microblogging", + "link": "https://hol.ogra.ph/@gil", + "handle": "@gil@hol.ogra.ph" + }, + { + "label": "Forgejo", + "link": "https://ide.ogra.ph/gil", + "handle": "ide.ogra.ph/gil" + }, + { + "label": "Matrix", + "link": "https://matrix.to/#/@kalanggam:matrix.org", + "handle": "kalanggam:matrix.org" + }, + { + "label": "Pixelfed", + "link": "https://pixelfed.social/kalanggam", + "handle": "pixelfed.social/kalanggam" + }, + { + "label": "Bookwyrm", + "link": "https://bookwyrm.social/user/kalanggam", + "handle": "bookwyrm.social/user/kalanggam" + }, + { + "label": "Bluesky", + "link": "https://bsky.app/profile/kalanggam.bsky.social", + "handle": "kalanggam.bsky.social" + }, + { + "label": "Newsletter", + "link": "https://gilosophies.ghost.io/", + "handle": "gilosophies.ghost.io", + "note": "(forthcoming)" + } +] diff --git a/src/_includes/footer.njk b/src/_includes/footer.njk index 5610439..be5b30e 100644 --- a/src/_includes/footer.njk +++ b/src/_includes/footer.njk @@ -1,6 +1,5 @@ \ No newline at end of file +
Made by me with Eleventy
+ {% include 'theme-switcher.njk' %} + Jump to top + \ No newline at end of file diff --git a/src/_includes/snippets/socials.njk b/src/_includes/snippets/socials.njk index 02ea208..8e883ac 100644 --- a/src/_includes/snippets/socials.njk +++ b/src/_includes/snippets/socials.njk @@ -1,7 +1,13 @@ -**Microblogging** @gil@hol.ogra.ph -**Forgejo** [ide.ogra.ph/gil](https://ide.ogra.ph/gil) -**Matrix** [@kalanggam:matrix.org](https://matrix.to/#/@kalanggam:matrix.org) -**Pixelfed** [pixelfed.social/kalanggam](https://pixelfed.social/kalanggam) -**Bookwyrm** [bookwyrm.social/user/kalanggam](https://bookwyrm.social/user/kalanggam) -**Bluesky** [@kalanggam.bsky.social](https://bsky.app/profile/kalanggam.bsky.social) -**Newsletter** [gilosophies.ghost.io](https://gilosophies.ghost.io/) (forthcoming) \ No newline at end of file +
+ {% for update in updates %}
+
+ {{ update.content | mdinline | safe }}
+ {% endfor %}
+