From 7f171203634ede6cb859f049678b6fbcd2bb4e7b Mon Sep 17 00:00:00 2001 From: fershad <27988517+fershad@users.noreply.github.com> Date: Sat, 6 Dec 2025 00:00:16 +0800 Subject: [PATCH 01/22] a good start --- eleventy.config.js | 56 +++ package.json | 2 +- src/_data/currently.js | 34 -- src/_data/film.js | 12 +- src/_data/projects.js | 10 + src/_data/readwise.js | 84 ---- src/_data/talks.js | 108 +++-- src/_data/years.js | 10 + src/_includes/css/font.css | 4 +- src/_includes/css/glitch.css | 420 -------------------- src/_includes/css/home.css | 169 ++------ src/_includes/css/index.css | 336 +--------------- src/_includes/css/listPage.css | 141 +------ src/_includes/layouts/base.liquid | 9 +- src/_includes/partials/filmstrip.liquid | 14 + src/_includes/partials/footer.liquid | 17 +- src/_includes/partials/writingList.liquid | 37 ++ src/_includes/partials/yearlySection.liquid | 12 + src/css/glitch.liquid | 6 - src/index.liquid | 266 +++++++------ src/talks.liquid | 64 --- 21 files changed, 385 insertions(+), 1426 deletions(-) delete mode 100644 src/_data/currently.js delete mode 100644 src/_data/readwise.js create mode 100644 src/_data/years.js delete mode 100644 src/_includes/css/glitch.css create mode 100644 src/_includes/partials/filmstrip.liquid create mode 100644 src/_includes/partials/writingList.liquid create mode 100644 src/_includes/partials/yearlySection.liquid delete mode 100644 src/css/glitch.liquid diff --git a/eleventy.config.js b/eleventy.config.js index dbae1b0..3e08b09 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -462,6 +462,62 @@ export default function (eleventyConfig) { return arr.slice(0, limit); }); + eleventyConfig.addFilter("currentYearWriting", function (array, currentYear) { + // Filter any items that don't have a data.published value + array = array.filter((item) => { + return "published" in item.data; + }); + + // The data.published value is a string in the format "YYYY/MM/DD" + return array.filter((post) => { + const publishedDate = new Date(post.data.published); + return publishedDate.getFullYear() === currentYear; + }); + }); + + eleventyConfig.addFilter("groupWritingByMonth", function (array) { + const grouped = array.reduce((acc, post) => { + const publishedDate = new Date(post.data.published); + const month = publishedDate.toLocaleString("default", { month: "long" }); + if (!acc[month]) { + acc[month] = []; + } + acc[month].push(post); + return acc; + }, {}); + return grouped; + }); + + eleventyConfig.addFilter( + "currentYearProjects", + function (array, currentYear) { + return array.filter((project) => { + return project.activeYears.includes(currentYear); + }); + }, + ); + + eleventyConfig.addFilter("currentYearTalks", function (array, currentYear) { + // Filter any items that don't have a data.published value + array = array.filter((item) => { + return "date" in item; + }); + + // The data.published value is a string in the format "YYYY/MM/DD" + return array.filter((talk) => { + const talkDate = new Date(talk.date); + return talkDate.getFullYear() === currentYear; + }); + }); + + eleventyConfig.addFilter("currentYearImages", function (array, currentYear) { + // The data.published value is a string in the format "YYYY/MM/DD" + return array.filter((image) => { + const imageDate = new Date(image.shortDate); + return imageDate.getFullYear() === currentYear; + }); + }); + eleventyConfig.setLibrary("md", mdLib); return { diff --git a/package.json b/package.json index f22b7fb..3aa26bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fershad.com", - "version": "7.0.0", + "version": "8.0.0", "main": "index.js", "scripts": { "start": "eleventy --serve", diff --git a/src/_data/currently.js b/src/_data/currently.js deleted file mode 100644 index f17e306..0000000 --- a/src/_data/currently.js +++ /dev/null @@ -1,34 +0,0 @@ -import _projects from './projects.js'; - -export const blurb = "Right now I'm coaching Touch at a local high school, and working on a few active projects with the Green Web Foundation." - -const bits = { - "home": { - "status": "🇹🇼 In Taiwan.", - }, - "workTravel": { - "status": "👨💻 Traveling for work.", - }, - "sportTravel": { - "status": "🏉 Traveling for sports.", - }, - "vacation": { - "status": "🏖️ On vacation." - }, -} - -export const key = "home"; - -export const current = bits[key]; - -export const status = current.status; - -const projectsList = [ - "grid-aware-websites", - "co2.js", - "are-my-third-parties-green" -] - -export const projects = projectsList.map(slug => { - return _projects.find(project => project.slug === slug); -}); \ No newline at end of file diff --git a/src/_data/film.js b/src/_data/film.js index deb2bb3..b0cb58d 100644 --- a/src/_data/film.js +++ b/src/_data/film.js @@ -1,18 +1,12 @@ import Fetch from "@11ty/eleventy-fetch"; export default async function () { - let url = "https://film.fershad.com/all.json?v=2.0"; + let url = "https://film.fershad.com/all.json?v=202512052326"; let json = await Fetch(url, { - duration: "90d", // 3 months caching + duration: "30d", // 3 months caching type: "json", // we’ll parse JSON for you }); - // Filter the images that don't have descriptions - json.images = json.images.filter( - (image) => image.description && image.portrait === "true", - ); - const random = json.images[Math.floor(Math.random() * json.images.length)]; - - return random; + return json.images.sort(() => Math.random() - 0.5); } diff --git a/src/_data/projects.js b/src/_data/projects.js index edef794..e8105da 100644 --- a/src/_data/projects.js +++ b/src/_data/projects.js @@ -5,6 +5,7 @@ export default [ slug: "grid-aware-websites-component", title: "Grid-aware websites web component", url: "https://github.com/thegreenwebfoundation/gaw-web-component", + activeYears: [2025], media: `./public/img/grid-aware-websites.jpg`, media_alt: "", shortContent: @@ -25,6 +26,7 @@ export default [ { slug: "grid-aware-websites", title: "Grid-aware websites", + activeYears: [2025, 2024], url: "https://github.com/thegreenwebfoundation/grid-aware-websites", media: `./public/img/grid-aware-websites.jpg`, media_alt: "", @@ -50,6 +52,7 @@ export default [ { slug: "green-web-tracker", title: "Green Web Tracker", + activeYears: [2025], url: "https://tracker.greenweb.org", media_alt: "", shortContent: @@ -74,6 +77,7 @@ export default [ { slug: "co2.js", title: "CO2.js", + activeYears: [2025, 2024, 2023, 2022], url: "https://github.com/thegreenwebfoundation/co2.js", media: `./public/img/co2-js.png`, media_alt: "", @@ -98,6 +102,7 @@ export default [ }, { title: "CO2 estimates in Firefox Profiler", + activeYears: [2023, 2022], media: `./public/img/firefox-profiler.jpg`, media_alt: "", content: "Presenting CO2 estimates in the Firefox DevTools Profiler.", @@ -111,6 +116,7 @@ export default [ { title: "Carbon-aware website", media: `./public/img/carbon-aware-site.jpg`, + activeYears: [2023, 2024], archived: true, media_alt: "", content: @@ -133,6 +139,7 @@ export default [ { title: "Eleventy Plugin: Green Links", media: `./public/img/eleventy-plugin-green-links.png`, + activeYears: [2023], media_alt: "", content: "An Eleventy plugin which checks if links on a website are hosted on verified green hosting providers from The Green Web Foundation's Green Web dataset.", @@ -153,6 +160,7 @@ export default [ }, { title: "ReqCheck", + activeYears: [2022], media: `./public/img/reqcheck.png`, media_alt: "", content: @@ -171,6 +179,7 @@ export default [ { title: "Are my third parties green?", slug: "are-my-third-parties-green", + activeYears: [2025, 2024, 2023, 2022], media: `./public/img/amtpg.jpg`, shortContent: "A tool to show if the third-party resources on a website are hosted on green infrastructure.", @@ -195,6 +204,7 @@ export default [ { title: "Flowty", media: `./public/img/flowty.jpg`, + activeYears: [2022], archived: true, media_alt: "", content: diff --git a/src/_data/readwise.js b/src/_data/readwise.js deleted file mode 100644 index 38b41a3..0000000 --- a/src/_data/readwise.js +++ /dev/null @@ -1,84 +0,0 @@ -import Fetch from "@11ty/eleventy-fetch"; -import fs from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url'; - -const dev = process.env.ELEVENTY_RUN_MODE === "serve" ? true : false; - -const token = process.env.READWISE_TOKEN; -const currentDate = new Date() -const updated = currentDate.toUTCString(); - -currentDate.setDate(currentDate.getDate() - 30); -const isoDate = currentDate.toISOString(); - -const writeArticlesToFile = async (articles) => { - const __dirname = path.dirname(fileURLToPath(import.meta.url)); - const outputDir = path.join(__dirname, '../../functions/api/readwise'); - const outputFile = path.join(outputDir, 'articles.json'); - - // Ensure directory exists - if (!fs.existsSync(outputDir)) { - fs.mkdirSync(outputDir, { recursive: true }); - } - - // Write the file - fs.writeFileSync(outputFile, JSON.stringify(articles, null, 2)); -}; - -export default async function () { - if (dev) { - // Get the content of the articles.json file in ../functions/api/readwise - const __dirname = path.dirname(fileURLToPath(import.meta.url)); - const outputFile = path.join(__dirname, '../../functions/api/readwise/articles.json'); - const articles = JSON.parse(fs.readFileSync(outputFile, 'utf8')); - return { - updated, - reader: articles.slice(0, 5), - list: articles, - blogroll: [] - }; - } - - let url = `https://readwise.io/api/v3/list/?location=archive&updatedAfter=${isoDate}`; - - let json = await Fetch(url, { - duration: "5d", // 1 day caching - type: "json", // we’ll parse JSON for you - fetchOptions: { - headers: { - Authorization: `Token ${token}`, - } - }}); - - // NOTE: The original JSON does include other things like notes & highlights. Maybe some that can be used later? - - const list = json.results.filter(result => !result.parent_id).slice(0, 30); - // Write articles to file - await writeArticlesToFile(list); - // Limit to 5 items - json = json.results.filter(result => !result.parent_id).slice(0, 5); - - const blogroll = [] - - await list.map(async (item) => { - const origin = new URL(item.source_url).origin; - const blogrollIndex = blogroll.findIndex(({url}) => url === origin); - if (blogrollIndex === -1) { - blogroll.push({url: origin, name: item.site_name}); - } - // if (item.source_url && blogroll.findIndex({url: origin, name: item.site_name}) === -1) { - // blogroll.push({url: origin, name: item.site_name}); - // } - }); - - - - - return { - updated, - reader: json, - list, - blogroll - }; -}; \ No newline at end of file diff --git a/src/_data/talks.js b/src/_data/talks.js index aa11947..a74cecd 100644 --- a/src/_data/talks.js +++ b/src/_data/talks.js @@ -1,73 +1,71 @@ - -const upcoming = [ - -] - -const past = [ +export default [ { - event: 'Green IO Conference Singapore', - url: 'https://greenio.tech/conference/2/singapore-2024-greenit-digital-sustainability', - slides: 'https://www.thegreenwebfoundation.org/slides/greenio-singapore-2024', - title: 'The nuance of quantifying digital carbon emissions', - date: '2024-04-18' + event: "Green IO Conference Singapore", + url: "https://greenio.tech/conference/2/singapore-2024-greenit-digital-sustainability", + slides: + "https://www.thegreenwebfoundation.org/slides/greenio-singapore-2024", + title: "The nuance of quantifying digital carbon emissions", + date: "2024-04-18", }, { - event: 'Digital Sustainability Summit, Taipei', - url: 'https://dss.ithome.com.tw/', - slides: 'https://www.thegreenwebfoundation.org/twdss24', - title: 'Thinking differently about digital sustainability', - date: '2024-03-29' + event: "Digital Sustainability Summit, Taipei", + url: "https://dss.ithome.com.tw/", + slides: "https://www.thegreenwebfoundation.org/twdss24", + title: "Thinking differently about digital sustainability", + date: "2024-03-29", }, { - event: 'Digital Ethics Forum', - url: 'https://www.digitalethicsforum.com/def-23/', - title: 'Calculating website emissions in the Italian context', - date: '2023-11-23', - video: 'https://www.thegreenwebfoundation.org/news/estimating-website-emissions-in-the-italian-context-sitigreen-co2-js/' + event: "Digital Ethics Forum", + url: "https://www.digitalethicsforum.com/def-23/", + title: "Calculating website emissions in the Italian context", + date: "2023-11-23", + video: + "https://www.thegreenwebfoundation.org/news/estimating-website-emissions-in-the-italian-context-sitigreen-co2-js/", }, { - event: 'Environment Variables Podcast', - url: 'https://podcasts.bcast.fm/e/vnwrxy28-the-week-in-green-software-open-data-with-fershad-irani', - title: 'The Week in Green Software: Open Data with Fershad Irani', - episode: 'https://podcasts.bcast.fm/e/vnwrxy28-the-week-in-green-software-open-data-with-fershad-irani', - date: '2022-07-19' + event: "Environment Variables Podcast", + url: "https://podcasts.bcast.fm/e/vnwrxy28-the-week-in-green-software-open-data-with-fershad-irani", + title: "The Week in Green Software: Open Data with Fershad Irani", + episode: + "https://podcasts.bcast.fm/e/vnwrxy28-the-week-in-green-software-open-data-with-fershad-irani", + date: "2022-07-19", }, { - event: 'Web Directions Lazy Load', - url: 'https://webdirections.org/lazyload/', - title: 'Web Performance and the Planet', - date: '2022-06-10' + event: "Web Directions Lazy Load", + url: "https://webdirections.org/lazyload/", + title: "Web Performance and the Planet", + date: "2022-06-10", }, { - event: 'Startup Taiwan', - url: 'https://www.youtube.com/channel/UCj6eq6QSnUsrYXktcp0Zp2w', - title: 'Leaving a tech job in Taiwan to be a web performance consultant', - video: 'https://www.youtube.com/watch?v=cXCMq6nBr6A', - date: '2022-03-11' + event: "Startup Taiwan", + url: "https://www.youtube.com/channel/UCj6eq6QSnUsrYXktcp0Zp2w", + title: "Leaving a tech job in Taiwan to be a web performance consultant", + video: "https://www.youtube.com/watch?v=cXCMq6nBr6A", + date: "2022-03-11", }, { - event: 'Green I/O Podcast', - url: 'https://gaelduez.com/blog/2-greenio-1-Fershad-Irani-web-performance-sustainability', - title: 'Episode #1 with Fershad Irani - Using website performance to green the web', - episode: 'https://anchor.fm/greenio/episodes/Fershad-Irani---Using-website-performance-to-green-the-web-e1f6179', - date: '2022-03-03' + event: "Green I/O Podcast", + url: "https://gaelduez.com/blog/2-greenio-1-Fershad-Irani-web-performance-sustainability", + title: + "Episode #1 with Fershad Irani - Using website performance to green the web", + episode: + "https://anchor.fm/greenio/episodes/Fershad-Irani---Using-website-performance-to-green-the-web-e1f6179", + date: "2022-03-03", }, { - event: 'Taiwan Code Camp', - url: 'https://www.eventbrite.com/e/making-websites-run-faster-environmentally-friendly-tickets-232071551257', - video: 'https://www.youtube.com/watch?v=G5UE9LBA8aY', - slides: '/files/tw-code-camp-feb-2022.pdf', - title: 'Making websites run faster & environmentally-friendly', - date: '2022-02-17' + event: "Taiwan Code Camp", + url: "https://www.eventbrite.com/e/making-websites-run-faster-environmentally-friendly-tickets-232071551257", + video: "https://www.youtube.com/watch?v=G5UE9LBA8aY", + slides: "/files/tw-code-camp-feb-2022.pdf", + title: "Making websites run faster & environmentally-friendly", + date: "2022-02-17", }, { - event: 'Toronto Web Perf', - url: 'https://www.meetup.com/Toronto-Web-Performance-Group/events/283332963/', - video: 'https://youtu.be/LD8HiUGdsX0', - slides: '/files/torwebperf_feb_2022.pdf', - title: 'Web Performance and the Planet', - date: '2022-02-07' + event: "Toronto Web Perf", + url: "https://www.meetup.com/Toronto-Web-Performance-Group/events/283332963/", + video: "https://youtu.be/LD8HiUGdsX0", + slides: "/files/torwebperf_feb_2022.pdf", + title: "Web Performance and the Planet", + date: "2022-02-07", }, -] - -export default { upcoming, past } +]; diff --git a/src/_data/years.js b/src/_data/years.js new file mode 100644 index 0000000..8a0895d --- /dev/null +++ b/src/_data/years.js @@ -0,0 +1,10 @@ +export const currentYear = new Date().getFullYear(); +const startYear = 2019; + +const blogYears = []; + +for (let i = startYear; i <= currentYear; i++) { + blogYears.push(i); +} + +export default blogYears; diff --git a/src/_includes/css/font.css b/src/_includes/css/font.css index a5a46d7..8630600 100644 --- a/src/_includes/css/font.css +++ b/src/_includes/css/font.css @@ -1,4 +1,4 @@ -@font-face { +/*@font-face { font-family: "Departure Mono"; font-style: normal; font-weight: 400; @@ -25,4 +25,4 @@ h6, blockquote { font-family: "Departure Mono", var(--font-monospace-slab-serif), monospace; -} +}*/ diff --git a/src/_includes/css/glitch.css b/src/_includes/css/glitch.css deleted file mode 100644 index 2243841..0000000 --- a/src/_includes/css/glitch.css +++ /dev/null @@ -1,420 +0,0 @@ -/* Homepage */ - -#intro picture::before, -#film picture::before { - filter: saturate(2); -} - -#intro picture::after, -#film picture::after { - opacity: 0.5; - z-index: 2; - filter: hue-rotate(160deg); -} - -#intro picture:hover::before, -#intro picture:hover::after, -#intro:hover picture::before, -#intro:hover picture::after, -#intro:has(.glitch-wrapper:hover) picture::before, -#intro:has(.glitch-wrapper:hover) picture::after, -#film picture:hover::before, -#film picture:hover::after { - display: block; -} - -@media (prefers-reduced-motion: reduce) { - .banner.outline::before, - .button.outline::before, - .banner.outline::after, - .button.outline::after, - header::before, - header::after, - footer::before, - footer::after, - a::before, - a::after, - article h2::before, - article h3::before, - article h4::before, - article h2::after, - article h3::after, - article h4::after, - picture::before, - picture::after, - figure::before, - figure::after, - blockquote::before, - blockquote::after, - td::before, - td::after, - th::before, - th::after, - .gh-edit::before, - .gh-edit::after, - .gaw-banner::before, - .gaw-banner::after { - display: none; - animation: none !important; - transition: none !important; - } - - .glitch-wrapper h1 { - animation: none !important; - transition: none !important; - } -} - -/*Keyframes*/ - -@keyframes text-glitch1 { - 0% { - transform: none; - opacity: 1; - } - 7% { - transform: skew(-0.5deg, -0.9deg); - opacity: 0.85; - } - 10% { - transform: none; - opacity: 1; - } - 27% { - transform: none; - opacity: 1; - } - 30% { - transform: skew(0.8deg, -0.1deg); - opacity: 0.85; - } - 35% { - transform: none; - opacity: 1; - } - 52% { - transform: none; - opacity: 1; - } - 55% { - transform: skew(-1deg, 0.2deg); - opacity: 0.85; - } - 50% { - transform: none; - opacity: 1; - } - 72% { - transform: none; - opacity: 1; - } - 75% { - transform: skew(0.4deg, 1deg); - opacity: 0.85; - } - 80% { - transform: none; - opacity: 1; - } - 100% { - transform: none; - opacity: 1; - } -} - -@keyframes text-glitch2 { - 0% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 7% { - transform: translate(-2px, -3px); - opacity: 0.6; - } - 10% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 27% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 30% { - transform: translate(-5px, -2px); - opacity: 0.6; - } - 35% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 52% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 55% { - transform: translate(-5px, -1px); - opacity: 0.6; - } - 50% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 72% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 75% { - transform: translate(-2px, -6px); - opacity: 0.6; - } - 80% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 100% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } -} - -@keyframes text-glitch3 { - 0% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 7% { - transform: translate(2px, 3px); - opacity: 0.6; - } - 10% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 27% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 30% { - transform: translate(5px, 2px); - opacity: 0.6; - } - 35% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 52% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 55% { - transform: translate(5px, 1px); - opacity: 0.6; - } - 50% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 72% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 75% { - transform: translate(2px, 6px); - opacity: 0.6; - } - 80% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 100% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } -} - -@keyframes list-glitch1 { - 0% { - transform: none; - opacity: 1; - } - 7% { - transform: translate(0.5px, 0.9px); - opacity: 0.85; - } - 10% { - transform: none; - opacity: 1; - } - 27% { - transform: none; - opacity: 1; - } - 30% { - transform: translate(0.8px, -0.1px); - opacity: 0.85; - } - 35% { - transform: none; - opacity: 1; - } - 52% { - transform: none; - opacity: 1; - } - 55% { - transform: translate(-1px, 0.2px); - opacity: 0.85; - } - 50% { - transform: none; - opacity: 1; - } - 72% { - transform: none; - opacity: 1; - } - 75% { - transform: translate(0.4px, 1px); - opacity: 0.85; - } - 80% { - transform: none; - opacity: 1; - } - 100% { - transform: none; - opacity: 1; - } -} - -@keyframes list-glitch2 { - 0% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 7% { - transform: translate(-1px, -1.5px); - opacity: 0.6; - } - 10% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 27% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 30% { - transform: translate(-2.5px, -1px); - opacity: 0.6; - } - 35% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 52% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 55% { - transform: translate(-2.5px, -0.5px); - opacity: 0.6; - } - 50% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 72% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 75% { - transform: translate(-1px, -3px); - opacity: 0.6; - } - 80% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } - 100% { - transform: none; - opacity: var(--custom-glitch-opacity, 0.35); - } -} - -@keyframes link-glitch { - 0% { - transform: none; - text-shadow: 2px -2px 3px rgba(103, 243, 218, 0.76), - -2px 2px 3px rgba(241, 111, 111, 1); - opacity: 1; - } - 7% { - transform: skew(-0.5deg, -0.9deg) scale(1.02); - text-shadow: 3px -3px 4px rgba(103, 243, 218, 0.76), - -3px 3px 2px rgba(241, 111, 111, 1); - opacity: 0.85; - } - 10% { - transform: none; - text-shadow: 2px -2px 3px rgba(103, 243, 218, 0.76), - -2px 2px 3px rgba(241, 111, 111, 1); - opacity: 1; - } - 27% { - transform: none; - text-shadow: 2px -2px 3px rgba(103, 243, 218, 0.76), - -2px 2px 3px rgba(241, 111, 111, 1); - opacity: 1; - } - 30% { - transform: skew(0.8deg, -0.1deg) scale(0.98); - text-shadow: 3px -3px 4px rgba(103, 243, 218, 0.76), - -3px 3px 2px rgba(241, 111, 111, 1); - opacity: 0.85; - } - 35% { - transform: none; - text-shadow: 2px -2px 3px rgba(103, 243, 218, 0.76), - -2px 2px 3px rgba(241, 111, 111, 1); - opacity: 1; - } - 52% { - transform: none; - text-shadow: 2px -2px 3px rgba(103, 243, 218, 0.76), - -2px 2px 3px rgba(241, 111, 111, 1); - opacity: 1; - } - 55% { - transform: skew(-1deg, 0.2deg) scale(1.03); - text-shadow: 3px -3px 4px rgba(103, 243, 218, 0.76), - -3px 3px 2px rgba(241, 111, 111, 1); - opacity: 0.85; - } - 50% { - transform: none; - text-shadow: 2px -2px 3px rgba(103, 243, 218, 0.76), - -2px 2px 3px rgba(241, 111, 111, 1); - opacity: 1; - } - 72% { - transform: none; - text-shadow: 2px -2px 3pxrgba (103, 243, 218, 0.76), - -2px 2px 3px rgba(241, 111, 111, 1); - opacity: 1; - } - 75% { - transform: skew(0.4deg, 1deg) scale(0.97); - text-shadow: 3px -3px 4px rgba(103, 243, 218, 0.76), - -3px 3px 2px rgba(241, 111, 111, 1); - opacity: 0.85; - } - 80% { - transform: none; - opacity: 1; - } - 100% { - transform: none; - opacity: 1; - } -} diff --git a/src/_includes/css/home.css b/src/_includes/css/home.css index 7c70a7b..50a31e8 100644 --- a/src/_includes/css/home.css +++ b/src/_includes/css/home.css @@ -19,165 +19,80 @@ max-width: 15rem; } -#film picture { - position: relative; - width: fit-content; -} - -#intro picture::before, -#intro picture::after, -#film picture::before, -#film picture::after { - content: ""; - display: none; - height: 100%; - width: 100%; - position: absolute; - top: 0; - left: 0; - background: var(--glitch-img-src) no-repeat; - z-index: 1; - opacity: 0.5; - background-size: cover; - background-position: center; - object-fit: cover; -} - -#intro:has(.glitch-wrapper:hover) picture::before, -#intro:hover picture::before, -#film picture:hover::before { - animation: text-glitch1 4.5s infinite; -} - -#intro:has(.glitch-wrapper:hover) picture::after, -#intro:hover picture::after, -#film picture:hover::after { - animation: text-glitch2 4.5s infinite; -} - -#intro:hover .outline-box:before, -#intro:hover .outline-box:after { - animation: none; - display: none; -} - #intro { gap: 1.5rem; display: grid; grid-template-columns: 15rem 1fr; justify-content: flex-start; - align-items: flex-start; + align-items: center; flex-wrap: wrap; grid-rows: 1; } -#intro::after, -#current::after { - inline-size: 80%; - block-size: var(--line-thickness); - inset-inline-start: 10%; - inset-block-start: calc(var(--line-offset) * -1); - top: calc(100% + var(--gap) / 2); -} - -#intro::before { - inline-size: var(--line-thickness); - block-size: 80%; - inset-block-start: 10%; - inset-inline-start: calc(var(--line-offset) * -1); - left: calc(100%); -} - -#current::after { -} - -#other { - display: grid; - grid-template-columns: 1fr 1fr 1fr; -} - -#projects, -#writing, -#reading { +.splitview { display: grid; grid-template-columns: 20rem 1fr; gap: 1.5rem; padding: 0; + position: relative; } -#projects > ul > li, -#writing > ul > li, -#reading > ul > li { - max-width: 100%; -} - -#projects > div, -#writing > div, -#reading > div { - padding: 1.5rem; -} - -.last-updated { - display: flex; - flex-direction: column; - gap: 0.75rem; - max-width: 100%; -} - -.lead-box { - padding: 0 3rem 0 0; +@keyframes sticky-highlight { + to { + font-weight: bolder; + } } -#film { - display: grid; - grid-template-columns: 20rem 1fr; - gap: 1.5rem; -} +@keyframes appear { + from { + opacity: 0; + transform: scaleX(0); + } -#film .img-holder { - display: grid; - grid-template-columns: 1fr 1fr; - gap: 1.5rem; + to { + opacity: 1; + transform: scaleX(1); + } } -.img-holder .img-desc, -#words > * { - display: flex; - flex-direction: column; - gap: 1rem; +.splitview > .lead-box { + position: sticky; + top: 2rem; + bottom: 2rem; + align-self: start; + padding-block: 3rem; + padding-inline-end: 3rem; } -#words { +.filmstrip { display: grid; - grid-template-columns: 1fr 1fr; + grid-template-columns: repeat(8, minmax(15rem, 1fr)); gap: 1.5rem; + padding: 0; + position: relative; + grid-template-rows: 1fr; + overflow: scroll; + scroll-snap-type: x mandatory; } -#projects::after, -#words::after { - inline-size: 80%; - block-size: var(--line-thickness); - inset-inline-start: 10%; - inset-block-start: calc(var(--line-offset) * -1); - top: calc(100% + var(--gap) / 2); -} - -#words > * { - padding: 1.5rem; - justify-content: space-between; +.filmstrip > .image-content { + position: relative; + width: 100%; + height: 100%; + overflow: hidden; + scroll-snap-align: center; } -#words div:has(small) + .banner { - margin-top: 1.5rem; +.filmstrip > .image-content img { + width: 100%; + height: 100%; + object-fit: cover; + aspect-ratio: 1; } @media (max-width: 768px) { #intro, - #projects, - #writing, - #reading, - #film, - #film .img-holder { + .splitview { grid-template-columns: 1fr; } diff --git a/src/_includes/css/index.css b/src/_includes/css/index.css index 17f1375..b015ea4 100644 --- a/src/_includes/css/index.css +++ b/src/_includes/css/index.css @@ -394,10 +394,6 @@ body { color-scheme: light dark; } -body.deglitch { - --glitch-off-color: var(--blue-4); -} - .skip-link { position: absolute; top: auto; @@ -446,9 +442,9 @@ main { body { color: light-dark(var(--background), var(--text)); background-color: light-dark(var(--text), var(--background)); + --sticky-background: light-dark(var(--text), var(--background)); --header-background: light-dark(var(--stone-0), var(--stone-10)); --callout-background: light-dark(var(--stone-2), var(--stone-11)); - --glitch-lightest-opacity: light-dark(0.95, 0.85); --inline-code-background: light-dark(var(--blue-12), var(--blue-0)); --inline-code-color: light-dark(var(--stone-0), var(--stone-12)); } @@ -533,13 +529,6 @@ h6, justify-content: center; } -.glitch-wrapper.center-align > [data-glitch]::before, -.glitch-wrapper.center-align > [data-glitch]::after { - text-align: center; - margin-inline: auto; - width: 100%; -} - small .button { padding: 0.25rem; } @@ -560,33 +549,6 @@ small .button { /* animation: flicker-in 1.35s 1; */ } -.banner.outline::before, -.banner.outline::after, -.button.outline::before, -.button.outline::after { - content: ""; - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; -} - -.banner.outline:hover::before, -.button.outline:hover::before { - border-color: var(--glitch-off-color, #f16f6f); - animation: text-glitch1 1.5s infinite; - border: 1px solid; -} - -.banner.outline:hover::after, -.button.button:hover::after { - border-color: var(--glitch-off-color, #67f3da); - animation: text-glitch2 1.5s infinite; - animation-delay: 0.5s; - border: 1px solid; -} - h2 + small, h3 + small, h4 + small { @@ -616,8 +578,7 @@ ul:not([class]) li { padding-left: 2.25rem; } -ul:not([class]) li::before, -ul:not([class]) li::after { +ul:not([class]) li::before { content: ""; position: absolute; left: 1ch; @@ -628,31 +589,6 @@ ul:not([class]) li::after { transition: all 0.2s; } -ul:not([class]) li:hover::before, -ul:not([class]) li:hover::after { - /* animation: none; */ - animation-direction: alternate-reverse; - animation-duration: 0.75s; - height: 100%; - top: 0; - /* --marker-color: var(--blue-4); */ -} - -ul:not([class]) li::before { - /* transition: all 0.2s; */ - --marker-color: var(--glitch-off-color, #f16f6f); - animation: list-glitch1 5.5s infinite; - animation-delay: var(--local-delay, 0); - animation-direction: var(--local-direction, alternate-reverse); -} - -ul:not([class]) li::after { - --marker-color: var(--glitch-off-color, #67f3da); - animation: list-glitch2 5.5s infinite; - animation-delay: var(--local-delay, 0); - animation-direction: var(--local-direction, alternate-reverse); -} - header, footer { --line-color: var(--blue-2); @@ -669,51 +605,6 @@ header { justify-content: space-between; } -header::before, -header::after { - content: ""; - position: absolute; - width: 100%; - height: 100%; - border-bottom: 2px solid; - top: 0; - left: 0; - overflow: hidden; -} - -header::before { - border-color: var(--glitch-off-color, #f16f6f); - animation: list-glitch1 3.5s infinite; -} - -header::after { - border-color: var(--glitch-off-color, #67f3da); - animation: list-glitch2 2.5s infinite; - animation-delay: 0.5s; -} - -footer::before, -footer::after { - content: ""; - position: absolute; - width: 100%; - height: 100%; - border-top: 2px solid; - top: 0; - left: 0; -} - -footer::before { - border-color: var(--glitch-off-color, #f16f6f); - animation: list-glitch1 3.5s infinite; -} - -footer::after { - border-color: var(--glitch-off-color, #67f3da); - animation: list-glitch2 2.5s infinite; - animation-delay: 0.5s; -} - header > div { width: var(--size-lg); display: flex; @@ -733,10 +624,6 @@ footer { justify-content: center; } -footer nav ul li { - /* margin-block-start: 2rem; */ -} - header nav ul, footer nav ul { display: flex; @@ -764,34 +651,6 @@ a { font-weight: 700; } -a::after { - content: attr(data-glitch); - text-transform: capitalize; - position: absolute; - top: 0; - left: 0; - opacity: 0; -} - -a::before { - content: attr(data-glitch); - text-transform: capitalize; - position: absolute; - top: 0; - left: 0; - opacity: 0; -} - -a:hover::before { - animation: text-glitch3 3.5s infinite; - color: var(--glitch-off-color, #f16f6f); -} - -a:hover::after { - animation: text-glitch2 3.5s infinite; - color: var(--glitch-off-color, #67f3da); -} - a:hover { text-decoration: none; } @@ -817,101 +676,6 @@ a:hover { pointer-events: none; } -/* Glitch effect from */ -.glitch-wrapper h1, -.glitch-wrapper p, -.glitch-wrapper small, -article h2, -article h3, -article h4 { - position: relative; -} - -.glitch-wrapper h1 { - --custom-glitch-opacity: 0.15; -} - -article h2::before, -article h3::before, -article h4::before, -article h2::after, -article h3::after, -article h4::after, -.glitch-wrapper small::before, -.glitch-wrapper small::after { - margin-left: 1.35ch; -} - -.glitch-wrapper h1::before, -.glitch-wrapper p:not(.no-glitch)::before, -article h2::before, -article h3::before, -article h4::before, -.glitch-wrapper h1::after, -.glitch-wrapper p:not(.no-glitch)::after, -article h2::after, -article h3::after, -article h4::after, -.glitch-wrapper small::before, -.glitch-wrapper small::after { - content: attr(data-glitch); - position: absolute; - top: 0; - left: 0; - opacity: 0; - /* animation: glitch3 2.5s infinite; */ -} - -.glitch-wrapper:hover > h1, -.glitch-wrapper:hover > p:not(.no-glitch), -article h2:hover, -article h3:hover, -article h4:hover, -.glitch-wrapper:hover > small { - animation: text-glitch1 3.5s infinite alternate; -} - -.glitch-wrapper:hover > h1::before, -.glitch-wrapper:hover > p:not(.no-glitch)::before, -article h2:hover::before, -article h3:hover::before, -article h4:hover::before, -.glitch-wrapper:hover > small::before { - animation: text-glitch2 3.5s infinite alternate; - color: var(--glitch-off-color, #67f3da); -} - -.glitch-wrapper:hover > h1::after, -.glitch-wrapper:hover > p:not(.no-glitch)::after, -article h2:hover::after, -article h3:hover::after, -article h4:hover::after, -.glitch-wrapper:hover > small::after { - color: var(--glitch-off-color, #f16f6f); - animation: text-glitch3 3.5s infinite alternate; -} - -.callout:hover::before, -.callout:hover::after, -.callout:hover .title::before, -.callout:hover .title::after { - animation: none; - display: none; -} - -.callout::before { - border-color: var(--glitch-off-color, #f16f6f); - animation: text-glitch1 1.5s infinite; - border: 1px solid; -} - -.callout::after { - border-color: var(--glitch-off-color, #67f3da); - animation: text-glitch2 1.5s infinite; - animation-delay: 0.5s; - border: 1px solid; -} - .callout p { max-inline-size: 100%; } @@ -945,23 +709,6 @@ article h4:hover::after, border-bottom: 2px solid var(--line-color); } -.gaw-banner::after { - content: ""; - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; - overflow: hidden; -} - -.gaw-banner::after { - border-bottom: 2px solid; - border-color: var(--glitch-off-color, #f16f6f); - animation: list-glitch2 2.5s infinite; - animation-delay: 0.5s; -} - :root { --form-control-color: var(--blue-4); } @@ -995,56 +742,12 @@ input[type="checkbox"] { animation: list-glitch1 2.5s infinite; } -input[type="radio"]::after, -input[type="checkbox"]::after { - content: ""; - width: calc(100% + 0.3em); - height: calc(100% + 0.3em); - top: -0.15em; - position: absolute; - /* border-radius: 50%; */ - /* transform: scale(0); */ - transition: 120ms height ease-in-out; - animation: list-glitch2 2.5s infinite; - border: 0.15em solid var(--glitch-off-color, #f16f6f); - left: -0.15em; -} - -input[type="radio"]::before, -input[type="checkbox"]::before { - content: ""; - width: 0.65em; - height: 0em; - top: 0; - position: absolute; - /* border-radius: 50%; */ - /* transform: scale(0); */ - transition: 120ms height ease-in-out; - box-shadow: inset 1em 1em var(--form-control-color); - animation: text-glitch2 2.5s infinite; -} - input[type="radio"]:checked, input[type="checkbox"]:checked { animation: none; background-color: #fff; } -input[type="radio"]:checked::before, -input[type="checkbox"]:checked::before { - /* transform: scale(1); */ - height: 100%; - animation: none; -} - -input[type="radio"]:checked::after, -input[type="checkbox"]:checked::after { - /* transform: scale(1); */ - /* height: 100%; */ - display: none; - animation: none; -} - #filters, .controls > small:first-of-type, .controls { @@ -1130,41 +833,6 @@ input[type="checkbox"]:checked::after { } } -body.deglitch .banner.outline::before, -body.deglitch .button.outline::before, -body.deglitch .banner.outline::after, -body.deglitch .button.outline::after, -body.deglitch header::before, -body.deglitch header::after, -body.deglitch footer::before, -body.deglitch footer::after, -body.deglitch a::before, -body.deglitch a::after, -body.deglitch article h2::before, -body.deglitch article h3::before, -body.deglitch article h4::before, -body.deglitch article h2::after, -body.deglitch article h3::after, -body.deglitch article h4::after, -body.deglitch picture::before, -body.deglitch picture::after, -body.deglitch figure::before, -body.deglitch figure::after, -body.deglitch blockquote::before, -body.deglitch blockquote::after, -body.deglitch td::before, -body.deglitch td::after, -body.deglitch th::before, -body.deglitch th::after, -body.deglitch .gh-edit::before, -body.deglitch .gh-edit::after, -body.deglitch .gaw-banner::before, -body.deglitch .gaw-banner::after { - display: none; - animation: none !important; - transition: none !important; -} - gaw-info-bar { margin-inline: auto; } diff --git a/src/_includes/css/listPage.css b/src/_includes/css/listPage.css index cf70f19..f23deb8 100644 --- a/src/_includes/css/listPage.css +++ b/src/_includes/css/listPage.css @@ -15,7 +15,7 @@ width: 100%; max-width: 100vw; display: grid; - grid-template-columns: 1fr 20ch; + grid-template-columns: 1fr; grid-gap: 2rem; grid-template-rows: auto; min-height: 10rem; @@ -40,20 +40,15 @@ } .links { - grid-column: 2; - grid-row: span 2; + grid-column: 1; display: flex; - flex-direction: column; + flex-direction: row; justify-content: flex-start; align-items: flex-end; height: 100%; gap: 0.75rem; } -.talk > .links { - grid-row: 1; -} - ul:not([class]) li { max-inline-size: 100%; } @@ -96,37 +91,6 @@ li.note { margin: 0; } -li.note:before { - content: ""; - display: block; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - border: 2px solid var(--blue-4); - animation: list-glitch2 2.5s infinite; - transition: all 0.25s ease; -} - -li.note:after { - content: ""; - display: block; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - border: 2px solid var(--glitch-off-color, #67f3da); - animation: list-glitch3 2.5s infinite; - transition: all 0.25s ease; -} - -li.note:hover:before, -li.note:hover:after { - height: calc(100% + 2px); -} - ul:has(.note) { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); @@ -139,70 +103,7 @@ ul:has(.note) li:not(.note) { ul:has(.note) li.note { grid-column: span 1; -} - -span.count-posts { - position: relative; - display: inline-block; - padding-left: 1rem; -} - -span.count-posts:before { - content: ""; - position: absolute; - position: absolute; - left: 0ch; - top: 0.75ex; - height: 1ex; - width: 1ex; - border: 2px solid var(--marker-color, var(--blue-4)); -} - -span.count-notes { - position: relative; - display: inline-block; - padding-inline: 0.25rem; -} - -span.count-notes:before { - content: ""; - position: absolute; - border-left: 2px solid; - border-bottom: 2px solid; - border-right: 2px solid; - border-top: 2px solid; - left: 0; - width: 100%; - height: 100%; - transition: all 0.25s ease; - border-color: var(--blue-4); -} - -ul.no-marker li:not(:last-of-type) { - position: relative; -} - -ul.no-marker li:not(:last-of-type)::before, -ul.no-marker li:not(:last-of-type)::after { - content: ""; - position: absolute; - width: 100%; - height: 2px; - border-bottom: 2px solid; - top: calc(100% + 1rem); - left: 0; - overflow: hidden; -} - -ul.no-marker li:not(:last-of-type)::before { - border-color: var(--glitch-off-color, #f16f6f); - animation: list-glitch1 3.5s infinite; -} - -ul.no-marker li:not(:last-of-type)::after { - border-color: var(--glitch-off-color, #67f3da); - animation: list-glitch2 2.5s infinite; - animation-delay: 0.5s; + margin-block-end: 0; } .onecol:has(.toggle:only-child) { @@ -244,40 +145,6 @@ ul.no-marker li:not(:last-of-type)::after { padding: 0; } -li.new { - transition: - height 0.5s ease, - color 2.5s ease; - /* transform: translate3d(0, 0, 0); */ - height: 100%; - color: inherit; - @starting-style { - height: 0; - color: transparent; - /* transform: translate3d(-10rem, 0, 0); */ - } -} - -@media (prefers-reduced-motion: reduce) { - li.new { - transition: background-color 0.75s ease; - background-color: transparent; - @starting-style { - transform: none; - background-color: var(--blue-0); - } - } -} - li:has(article) { margin-block-end: 6rem !important; } - -li:has(article)::before, -li:has(article)::after { - top: calc(100% + 3rem) !important; - height: 0.5px !important; - width: 100% !important; - border: 2px solid var(--marker-color, var(--blue-4)) !important; - transition: 0.2s !important; -} diff --git a/src/_includes/layouts/base.liquid b/src/_includes/layouts/base.liquid index e9f87ab..c0a3ce5 100644 --- a/src/_includes/layouts/base.liquid +++ b/src/_includes/layouts/base.liquid @@ -19,10 +19,6 @@ - - {% include 'partials/header.liquid' %} -