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' %} -
+ diff --git a/src/_includes/partials/filmstrip.liquid b/src/_includes/partials/filmstrip.liquid index 42024c6..96bcfa9 100644 --- a/src/_includes/partials/filmstrip.liquid +++ b/src/_includes/partials/filmstrip.liquid @@ -1,6 +1,11 @@ {% assign offset = filmSection | minus: 1 | times: 8 %} -
+
+ +
+ diff --git a/src/_includes/partials/header.liquid b/src/_includes/partials/header.liquid index 4e54aa5..154d744 100644 --- a/src/_includes/partials/header.liquid +++ b/src/_includes/partials/header.liquid @@ -1,26 +1,44 @@
- {% comment %} {% unless title == "Home" %} {% endcomment %}
-

Fershad Irani

+

Fershad Irani

Digital Sustainability Consultant
- {% comment %} {% endunless %} {% endcomment %} -
+ + + + + +
diff --git a/src/_includes/partials/yearlySection.liquid b/src/_includes/partials/yearlySection.liquid index aec55a4..069ebbc 100644 --- a/src/_includes/partials/yearlySection.liquid +++ b/src/_includes/partials/yearlySection.liquid @@ -1,11 +1,11 @@
-
+

{{ sectionTitle }}

{{ sectionIntro }}

- {{ sectionExtra }}
+ {{ sectionExtra }}
{{ sectionContent }}
diff --git a/src/index.liquid b/src/index.liquid index 7ede78a..13f95f6 100644 --- a/src/index.liquid +++ b/src/index.liquid @@ -28,7 +28,6 @@ css:
-
{% assign currentYear = years.currentYear %} {% assign currentYearPosts = collections.post | sortByPublishedDate | filterOnlyTag: "post", "note"| currentYearWriting: currentYear %} {% assign currentYearNotes = collections.post | sortByPublishedDate | filterOnlyTag: "note"| currentYearWriting: currentYear %} @@ -36,6 +35,27 @@ css: {% assign currentYearTalks = talks | currentYearTalks: currentYear %} {% assign currentYearImages = film | currentYearImages: currentYear %} + +
+ + {% assign sectionId = 'posts' %} {% assign sectionTitle = 'Posts' %} {% assign sectionIntro = 'Ideas, thoughts, and opinions mostly related to digital sustainability and occassionally other topics.' %} @@ -161,73 +181,3 @@ css:
- - - From 1ebb038ff2a9910fd726533e3cbb6b8e3a499224 Mon Sep 17 00:00:00 2001 From: fershad <27988517+fershad@users.noreply.github.com> Date: Wed, 10 Dec 2025 00:17:26 +0800 Subject: [PATCH 03/22] wider, style lead-box --- src/_data/projects.js | 2 +- src/_includes/css/home.css | 35 +++++++++++++++++++++++++++++++---- src/_includes/css/index.css | 5 ++++- src/index.liquid | 4 ++-- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/_data/projects.js b/src/_data/projects.js index e8105da..28a44ce 100644 --- a/src/_data/projects.js +++ b/src/_data/projects.js @@ -192,7 +192,7 @@ export default [ url: "https://fershad.com/writing/building-are-my-third-parties-green/", }, { - text: "Building the Directory", + text: "Directory", url: "https://fershad.com/writing/adding-a-directory-and-api-to-are-my-third-parties-green/", }, { diff --git a/src/_includes/css/home.css b/src/_includes/css/home.css index 863ae94..c3c187c 100644 --- a/src/_includes/css/home.css +++ b/src/_includes/css/home.css @@ -32,11 +32,22 @@ .splitview { display: grid; grid-template-columns: 20rem 1fr; - gap: 1.5rem; + gap: 5rem; padding: 0; position: relative; } +.splitview > .lead-box:after { + content: ""; + position: absolute; + top: 50%; + transform: translateY(-50%); + right: -1rem; + height: 50%; + width: 2px; + background-color: var(--blue-2); +} + @keyframes sticky-highlight { to { font-weight: bolder; @@ -64,6 +75,10 @@ padding-inline-end: 3rem; } +.lead-box + ul { + padding-block: 1.5rem; +} + .filmstrip { display: grid; grid-template-columns: repeat(8, minmax(15rem, 1fr)); @@ -100,7 +115,7 @@ aside:has(.filmstrip):after { position: absolute; left: 0; width: 100%; - height: 8rem; + height: 6rem; border-radius: 20px; background: linear-gradient( 180deg, @@ -110,11 +125,11 @@ aside:has(.filmstrip):after { } aside:has(.filmstrip):before { - top: -8rem; + top: -6rem; } aside:has(.filmstrip):after { - bottom: -8rem; + bottom: -6rem; transform: rotate(180deg); } @@ -133,6 +148,18 @@ aside:has(.filmstrip):after { aspect-ratio: 1; } +#yearly-content { + --flow-gap: 7rem; +} + +#yearly-content > section { + scroll-margin-block-start: 2.75rem; +} + +#yearly-content > * > * { + --flow-gap: 3rem; +} + @media (max-width: 768px) { #intro, .splitview { diff --git a/src/_includes/css/index.css b/src/_includes/css/index.css index 0e739b7..64bb324 100644 --- a/src/_includes/css/index.css +++ b/src/_includes/css/index.css @@ -426,7 +426,7 @@ main { --line-offset: calc(var(--gap) / 2); --line-thickness: 2px; --line-color: var(--blue-2); - max-width: var(--size-lg); + max-width: var(--size-xl); padding: 1rem; margin: 0 auto; } @@ -641,6 +641,9 @@ nav { z-index: 2; background: light-dark(var(--text), var(--background)); text-align: center; + --line-color: var(--blue-2); + border-bottom: 2px solid var(--line-color); + /*border-top: 2px solid var(--line-color);*/ } nav + section { diff --git a/src/index.liquid b/src/index.liquid index 13f95f6..452df4a 100644 --- a/src/index.liquid +++ b/src/index.liquid @@ -69,7 +69,7 @@ css: {{ month | first }} ({{ month | last | size }}) {% endfor %} - Total posts: {{ currentYearPosts | size }} + {% endcapture %} {% capture sectionContent %} @@ -95,7 +95,7 @@ css: {{ month | first }} ({{ month | last | size }}) {% endfor %} - Total notes: {{ currentYearNotes | size }} + {% endcapture %} {% capture sectionContent %} From 47485d755797fddd31693805dceb54c254ad6576 Mon Sep 17 00:00:00 2001 From: fershad <27988517+fershad@users.noreply.github.com> Date: Wed, 10 Dec 2025 20:13:46 +0800 Subject: [PATCH 04/22] collapse images --- src/_includes/css/home.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/_includes/css/home.css b/src/_includes/css/home.css index c3c187c..133d9c9 100644 --- a/src/_includes/css/home.css +++ b/src/_includes/css/home.css @@ -81,7 +81,7 @@ .filmstrip { display: grid; - grid-template-columns: repeat(8, minmax(15rem, 1fr)); + grid-template-columns: 1fr; gap: 1.5rem; padding: 0; position: relative; @@ -90,6 +90,11 @@ scroll-snap-type: x mandatory; padding-inline: 1rem; padding-block: 0.6rem 0.8rem; + transition: grid-template-columns 2s ease-out; +} + +.filmstrip:has(img:hover) { + grid-template-columns: repeat(8, minmax(15rem, 1fr)); } aside:has(.filmstrip) { From c07a86d8f5c339c393689d632fb37670cf1f71c5 Mon Sep 17 00:00:00 2001 From: fershad <27988517+fershad@users.noreply.github.com> Date: Wed, 10 Dec 2025 20:58:17 +0800 Subject: [PATCH 05/22] can't animate grid-columns --- src/_includes/css/home.css | 32 +++++++++++++++++++++++++++----- src/_includes/css/index.css | 5 +++-- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/src/_includes/css/home.css b/src/_includes/css/home.css index 133d9c9..4cc668b 100644 --- a/src/_includes/css/home.css +++ b/src/_includes/css/home.css @@ -81,22 +81,44 @@ .filmstrip { display: grid; - grid-template-columns: 1fr; + grid-template-columns: repeat(8, minmax(15rem, 1fr)); gap: 1.5rem; padding: 0; position: relative; grid-template-rows: 1fr; - overflow: scroll; + overflow: auto; scroll-snap-type: x mandatory; padding-inline: 1rem; padding-block: 0.6rem 0.8rem; - transition: grid-template-columns 2s ease-out; + /*transition: all 2s ease-out; + justify-items: center;*/ +} + +/*.filmstrip .image-content:nth-child(odd) { + grid-row: 1; + grid-column: 4; } -.filmstrip:has(img:hover) { +.filmstrip .image-content:nth-child(even) { + grid-row: 1; + grid-column: 5; +} + +.filmstrip:has(.image-content:hover) { grid-template-columns: repeat(8, minmax(15rem, 1fr)); + justify-content: flex-start; } +.filmstrip:has(.image-content:hover) .image-content:nth-child(odd) { + grid-row: initial; + grid-column: initial; +} + +.filmstrip:has(.image-content:hover) .image-content:nth-child(even) { + grid-row: initial; + grid-column: initial; +}*/ + aside:has(.filmstrip) { position: relative; /*max-width: 100vw;*/ @@ -119,7 +141,7 @@ aside:has(.filmstrip):after { display: block; position: absolute; left: 0; - width: 100%; + width: 100vw; height: 6rem; border-radius: 20px; background: linear-gradient( diff --git a/src/_includes/css/index.css b/src/_includes/css/index.css index 64bb324..8225880 100644 --- a/src/_includes/css/index.css +++ b/src/_includes/css/index.css @@ -381,8 +381,9 @@ main:not(:has(article)) { } html { - background: var(--background); - color: var(--text); + color: light-dark(var(--background), var(--text)); + background-color: light-dark(var(--text), var(--background)); + color-scheme: light dark; } body:not(.rainbow) a:not([class]) { From 15dc4f1f42ab73f03d9f7e7abe12558411932e7f Mon Sep 17 00:00:00 2001 From: fershad <27988517+fershad@users.noreply.github.com> Date: Thu, 11 Dec 2025 14:08:08 +0800 Subject: [PATCH 06/22] yearly pages --- src/_data/years.js | 4 +- src/_includes/layouts/yearly.liquid | 164 +++++++++++++++++++++++ src/index.liquid | 196 +++------------------------- src/yearly/index.liquid | 10 ++ src/yearly/yearly.json | 6 + 5 files changed, 201 insertions(+), 179 deletions(-) create mode 100644 src/_includes/layouts/yearly.liquid create mode 100644 src/yearly/index.liquid create mode 100644 src/yearly/yearly.json diff --git a/src/_data/years.js b/src/_data/years.js index 8a0895d..a6f04a2 100644 --- a/src/_data/years.js +++ b/src/_data/years.js @@ -1,10 +1,8 @@ export const currentYear = new Date().getFullYear(); const startYear = 2019; -const blogYears = []; +export const blogYears = []; for (let i = startYear; i <= currentYear; i++) { blogYears.push(i); } - -export default blogYears; diff --git a/src/_includes/layouts/yearly.liquid b/src/_includes/layouts/yearly.liquid new file mode 100644 index 0000000..233de20 --- /dev/null +++ b/src/_includes/layouts/yearly.liquid @@ -0,0 +1,164 @@ +--- +layout: layouts/base.liquid +css: +- /css/home.css +- /css/listPage.css +--- + +
+ + {{ content }} + + {% assign blogYears = years.blogYears %} + {% assign currentYearPosts = collections.post | sortByPublishedDate | filterOnlyTag: "post", "note"| currentYearWriting: currentYear %} + {% assign currentYearNotes = collections.post | sortByPublishedDate | filterOnlyTag: "note"| currentYearWriting: currentYear %} + {% assign currentYearProjects = projects | currentYearProjects: currentYear %} + {% assign currentYearTalks = talks | currentYearTalks: currentYear %} + {% assign currentYearImages = film | currentYearImages: currentYear %} + + +
+ + + {% assign sectionId = 'posts' %} + {% assign sectionTitle = 'Posts' %} + {% assign sectionIntro = 'Ideas, thoughts, and opinions mostly related to digital sustainability and occassionally other topics.' %} + {% assign sectionExtra = '' %} + + {% capture sectionExtra %} +
+ {% assign monthlyCount = currentYearPosts | groupWritingByMonth %} +
+ {% for month in monthlyCount %} + {{ month | first }} ({{ month | last | size }}) + {% endfor %} +
+ +
+ {% endcapture %} + {% capture sectionContent %} +
    + {% assign postslist = currentYearPosts %} + {% include 'partials/writingList.liquid' %} +
+ {% endcapture %} + {% include 'partials/yearlySection.liquid' %} + + +{% include 'partials/filmstrip.liquid', filmSection: 1 %} + + {% assign sectionId = 'notes' %} + {% assign sectionTitle = 'Notes' %} + {% assign sectionIntro = 'Short(ish) thoughts and reflections on a variety of topics.' %} + {% assign sectionExtra = '' %} + {% capture sectionExtra %} +
+ {% assign monthlyCount = currentYearNotes | groupWritingByMonth %} +
+ {% for month in monthlyCount %} + {{ month | first }} ({{ month | last | size }}) + {% endfor %} +
+ +
+ {% endcapture %} + {% capture sectionContent %} +
    + {% assign postslist = currentYearNotes %} + {% include 'partials/writingList.liquid' %} +
+ {% endcapture %} + + {% include 'partials/yearlySection.liquid' %} + + {% include 'partials/filmstrip.liquid', filmSection: 2 %} + + {% assign sectionId = "projects" %} + {% assign sectionTitle = "Active projects" %} + {% assign sectionIntro = "Projects that I've worked on at one time or another through the year." %} + {% assign sectionExtra = '' %} + {% capture sectionContent %} +
    + {% for project in currentYearProjects %} +
  • + {% if project.archived %} +
    +

    {{ project.title }}

    + + Archived + +
    + {% else %} +

    {{ project.title }}

    + {% endif %} +

    {{ project.shortContent }}

    + +
  • + {% endfor %} +
+ {% endcapture %} + {% include 'partials/yearlySection.liquid' %} + + {% include 'partials/filmstrip.liquid', filmSection: 3 %} + + {% if currentYearTalks.size > 0 %} + {% assign sectionId = "talks" %} + {% assign sectionTitle = "Talks" %} + {% assign sectionIntro = "Presentations and talks mostly on the topic of digital sustainability." %} + {% assign sectionExtra = '' %} + {% capture sectionContent %} +
    + {% for item in currentYearTalks %} +
  • +
    +

    {{ item.title }}

    + {{ item.date | date_to_string }} @ {{ item.event }} +
    +

    + +
  • + {% endfor %} +
+ {% endcapture %} + {% include 'partials/yearlySection.liquid' %} + {% endif %} + + + +
+
diff --git a/src/index.liquid b/src/index.liquid index 452df4a..68503ae 100644 --- a/src/index.liquid +++ b/src/index.liquid @@ -1,183 +1,27 @@ --- -layout: layouts/base.liquid +layout: layouts/yearly.liquid title: Home description: "Hey, I'm Fershad. I am a digital sustainability consultant working with the Green Web Foundation towards a fossil free internet by 2030." -css: -- /css/home.css -- /css/listPage.css --- -
-
- Black and white image of a man in a bucket hat and large glasses, his head slightly tilted up with a skeptical look on his face. He appears casual, with sunglasses hanging on the shirt around his neck. -
-
-

Hey, I'm Fershad

-

- A digital sustainability consultant based in 🇹🇼 Taipei, Taiwan. I work with the Green Web Foundation towards - a fossil free internet by 2030. -

-
+
+ Black and white image of a man in a bucket hat and large glasses, his head slightly tilted up with a skeptical look on his face. He appears casual, with sunglasses hanging on the shirt around his neck. +
+
+

Hey, I'm Fershad

+

+ A digital sustainability consultant based in 🇹🇼 Taipei, Taiwan. I work with the Green Web Foundation towards + a fossil free internet by 2030. +

-
+
+
- {% assign currentYear = years.currentYear %} - {% assign currentYearPosts = collections.post | sortByPublishedDate | filterOnlyTag: "post", "note"| currentYearWriting: currentYear %} - {% assign currentYearNotes = collections.post | sortByPublishedDate | filterOnlyTag: "note"| currentYearWriting: currentYear %} - {% assign currentYearProjects = projects | currentYearProjects: currentYear %} - {% assign currentYearTalks = talks | currentYearTalks: currentYear %} - {% assign currentYearImages = film | currentYearImages: currentYear %} - - -
- - - {% assign sectionId = 'posts' %} - {% assign sectionTitle = 'Posts' %} - {% assign sectionIntro = 'Ideas, thoughts, and opinions mostly related to digital sustainability and occassionally other topics.' %} - {% assign sectionExtra = '' %} - - {% capture sectionExtra %} -
- {% assign monthlyCount = currentYearPosts | groupWritingByMonth %} -
- {% for month in monthlyCount %} - {{ month | first }} ({{ month | last | size }}) - {% endfor %} -
- -
- {% endcapture %} - {% capture sectionContent %} -
    - {% assign postslist = currentYearPosts %} - {% include 'partials/writingList.liquid' %} -
- {% endcapture %} - {% include 'partials/yearlySection.liquid' %} - - -{% include 'partials/filmstrip.liquid', filmSection: 1 %} - - {% assign sectionId = 'notes' %} - {% assign sectionTitle = 'Notes' %} - {% assign sectionIntro = 'Short(ish) thoughts and reflections on a variety of topics.' %} - {% assign sectionExtra = '' %} - {% capture sectionExtra %} -
- {% assign monthlyCount = currentYearNotes | groupWritingByMonth %} -
- {% for month in monthlyCount %} - {{ month | first }} ({{ month | last | size }}) - {% endfor %} -
- -
- {% endcapture %} - {% capture sectionContent %} -
    - {% assign postslist = currentYearNotes %} - {% include 'partials/writingList.liquid' %} -
- {% endcapture %} - - {% include 'partials/yearlySection.liquid' %} - - {% include 'partials/filmstrip.liquid', filmSection: 2 %} - - {% assign sectionId = "projects" %} - {% assign sectionTitle = "Active projects" %} - {% assign sectionIntro = "Projects that I've worked on at one time or another through the year." %} - {% assign sectionExtra = '' %} - {% capture sectionContent %} -
    - {% for project in currentYearProjects %} -
  • - {% if project.archived %} -
    -

    {{ project.title }}

    - - Archived - -
    - {% else %} -

    {{ project.title }}

    - {% endif %} -

    {{ project.shortContent }}

    - -
  • - {% endfor %} -
- {% endcapture %} - {% include 'partials/yearlySection.liquid' %} - - {% include 'partials/filmstrip.liquid', filmSection: 3 %} - - {% if currentYearTalks.size > 0 %} - {% assign sectionId = "talks" %} - {% assign sectionTitle = "Talks" %} - {% assign sectionIntro = "Presentations and talks mostly on the topic of digital sustainability." %} - {% assign sectionExtra = '' %} - {% capture sectionContent %} -
    - {% for item in currentYearTalks %} -
  • -
    -

    {{ item.title }}

    - {{ item.date | date_to_string }} @ {{ item.event }} -
    -

    - -
  • - {% endfor %} -
- {% endcapture %} - {% include 'partials/yearlySection.liquid' %} - {% endif %} - - - -
-
+{% assign currentYear = years.currentYear %} diff --git a/src/yearly/index.liquid b/src/yearly/index.liquid new file mode 100644 index 0000000..fe911a9 --- /dev/null +++ b/src/yearly/index.liquid @@ -0,0 +1,10 @@ +--- +pagination: + data: years.blogYears + size: 1 + alias: currentYear +permalink: /{{ currentYear }}/index.html +title: "{{ currentYear }}" +--- + +{% assign currentYear = currentYear %} diff --git a/src/yearly/yearly.json b/src/yearly/yearly.json new file mode 100644 index 0000000..e40413c --- /dev/null +++ b/src/yearly/yearly.json @@ -0,0 +1,6 @@ +{ + "layout": "layouts/yearly.liquid", + "hasTOC": false, + "ghEdit": false, + "addAllPagesToCollections": true +} From afe1b762047066bbd661bf0c8fa9bcc9c6d5b369 Mon Sep 17 00:00:00 2001 From: fershad <27988517+fershad@users.noreply.github.com> Date: Thu, 11 Dec 2025 20:26:48 +0800 Subject: [PATCH 07/22] yearly pages --- src/_includes/css/index.css | 1 + src/_includes/layouts/yearly.liquid | 15 +++++++++++++++ src/index.liquid | 27 --------------------------- src/yearly/index.liquid | 26 ++++++++++++++++++++++++-- 4 files changed, 40 insertions(+), 29 deletions(-) delete mode 100644 src/index.liquid diff --git a/src/_includes/css/index.css b/src/_includes/css/index.css index 8225880..0d2e931 100644 --- a/src/_includes/css/index.css +++ b/src/_includes/css/index.css @@ -393,6 +393,7 @@ body:not(.rainbow) a:not([class]) { body { margin: 0; color-scheme: light dark; + overflow-x: hidden; } .skip-link { diff --git a/src/_includes/layouts/yearly.liquid b/src/_includes/layouts/yearly.liquid index 233de20..8b4b1c4 100644 --- a/src/_includes/layouts/yearly.liquid +++ b/src/_includes/layouts/yearly.liquid @@ -5,6 +5,21 @@ css: - /css/listPage.css --- + +
{{ content }} diff --git a/src/index.liquid b/src/index.liquid deleted file mode 100644 index 68503ae..0000000 --- a/src/index.liquid +++ /dev/null @@ -1,27 +0,0 @@ ---- -layout: layouts/yearly.liquid -title: Home -description: "Hey, I'm Fershad. I am a digital sustainability consultant working with the Green Web Foundation towards a fossil free internet by 2030." ---- - -
- Black and white image of a man in a bucket hat and large glasses, his head slightly tilted up with a skeptical look on his face. He appears casual, with sunglasses hanging on the shirt around his neck. -
-
-

Hey, I'm Fershad

-

- A digital sustainability consultant based in 🇹🇼 Taipei, Taiwan. I work with the Green Web Foundation towards - a fossil free internet by 2030. -

-
-
-
- -{% assign currentYear = years.currentYear %} diff --git a/src/yearly/index.liquid b/src/yearly/index.liquid index fe911a9..ecfc546 100644 --- a/src/yearly/index.liquid +++ b/src/yearly/index.liquid @@ -3,8 +3,30 @@ pagination: data: years.blogYears size: 1 alias: currentYear -permalink: /{{ currentYear }}/index.html -title: "{{ currentYear }}" +permalink: "{% unless currentYear == years.currentYear %}/{{ currentYear }}/index.html{% else %}/index.html{% endunless %}" +eleventyComputed: + title: "{% unless currentYear == years.currentYear %}{{ currentYear }}{% else %}Home{% endunless %}" + description: "{% unless currentYear == years.currentYear %}An archive of writing and other items from {{ currentYear }}{% else %}Hey, I'm Fershad. I am a digital sustainability consultant working with the Green Web Foundation towards a fossil free internet by 2030.{% endunless %}" --- {% assign currentYear = currentYear %} + +
+ Black and white image of a man in a bucket hat and large glasses, his head slightly tilted up with a skeptical look on his face. He appears casual, with sunglasses hanging on the shirt around his neck. +
+
+

Hey, I'm Fershad

+

+ A digital sustainability consultant based in 🇹🇼 Taipei, Taiwan. I work with the Green Web Foundation towards + a fossil free internet by 2030. +

+
+
+
From e95a2218ecb9ca238b0dd2cd3e96c7f7c1fcfb6c Mon Sep 17 00:00:00 2001 From: fershad <27988517+fershad@users.noreply.github.com> Date: Thu, 11 Dec 2025 21:03:12 +0800 Subject: [PATCH 08/22] add yearly nav --- src/_includes/css/home.css | 14 +++++++++++++- src/_includes/css/index.css | 10 +++++++--- src/_includes/css/listPage.css | 2 +- src/_includes/layouts/yearly.liquid | 27 +++++++++++++++++++-------- 4 files changed, 40 insertions(+), 13 deletions(-) diff --git a/src/_includes/css/home.css b/src/_includes/css/home.css index 4cc668b..e7873d6 100644 --- a/src/_includes/css/home.css +++ b/src/_includes/css/home.css @@ -68,7 +68,7 @@ .splitview > .lead-box { position: sticky; - top: 2rem; + top: 6.5rem; bottom: 2rem; align-self: start; padding-block: 3rem; @@ -94,6 +94,18 @@ justify-items: center;*/ } +.current-year { + font-size: var(--font-size-4); +} + +nav > nav { + padding-block-start: 0.75rem; + display: flex; + align-items: center; + justify-content: center; + gap: 1ch; +} + /*.filmstrip .image-content:nth-child(odd) { grid-row: 1; grid-column: 4; diff --git a/src/_includes/css/index.css b/src/_includes/css/index.css index 0d2e931..9209d13 100644 --- a/src/_includes/css/index.css +++ b/src/_includes/css/index.css @@ -572,7 +572,7 @@ ol li { padding: 0; } -:not(nav) > ul li:not(:last-of-type) { +:not(nav > nav) > ul li:not(:last-of-type) { margin-block-end: 2rem; } @@ -635,10 +635,10 @@ footer nav ul { flex-wrap: wrap; } -nav { +nav:not(nav > nav) { margin-block-start: 0 !important; position: sticky !important; - padding-block: 0 !important; + padding-block: 0.5rem !important; top: 0; z-index: 2; background: light-dark(var(--text), var(--background)); @@ -648,6 +648,10 @@ nav { /*border-top: 2px solid var(--line-color);*/ } +nav > nav { + padding-block-start: 0.75rem; +} + nav + section { margin-block-start: 0 !important; } diff --git a/src/_includes/css/listPage.css b/src/_includes/css/listPage.css index f23deb8..e71ac33 100644 --- a/src/_includes/css/listPage.css +++ b/src/_includes/css/listPage.css @@ -53,7 +53,7 @@ ul:not([class]) li { max-inline-size: 100%; } -:not(nav) > ul > * + * { +:not(nav > nav) > ul > * + * { margin-top: 2.15rem; } diff --git a/src/_includes/layouts/yearly.liquid b/src/_includes/layouts/yearly.liquid index 8b4b1c4..3217055 100644 --- a/src/_includes/layouts/yearly.liquid +++ b/src/_includes/layouts/yearly.liquid @@ -9,12 +9,7 @@ css: { "prefetch": [ { - "urls": [ - "/", - {% for year in years.blogYears %} - "/{{ year }}/", - {% endfor %} - ] + "urls": [ "/",{%- for year in years.blogYears -%}{%- unless year == currentYear -%}"/{{ year }}/",{%- endunless -%}{%- endfor -%}] } ] } @@ -24,14 +19,29 @@ css: {{ content }} - {% assign blogYears = years.blogYears %} + {% assign blogYears = years.blogYears | reverse %} {% assign currentYearPosts = collections.post | sortByPublishedDate | filterOnlyTag: "post", "note"| currentYearWriting: currentYear %} {% assign currentYearNotes = collections.post | sortByPublishedDate | filterOnlyTag: "note"| currentYearWriting: currentYear %} {% assign currentYearProjects = projects | currentYearProjects: currentYear %} {% assign currentYearTalks = talks | currentYearTalks: currentYear %} {% assign currentYearImages = film | currentYearImages: currentYear %} -
+ + diff --git a/src/_includes/partials/writingList.liquid b/src/_includes/partials/writingList.liquid index ad23196..44e0ad8 100644 --- a/src/_includes/partials/writingList.liquid +++ b/src/_includes/partials/writingList.liquid @@ -5,25 +5,20 @@ {% assign tags = post.data.tags %} {% assign isNote = tags | find: "note" %}
  • + {%- if post.data.archived -%}{{"class=archived" | raw}}{%- endif -%}>
    + {% if post.data.archived %} + + | Archived + + {% endif %}

    {{ post.data.title }}

    - - {% if post.data.archived %} - | - - Archived - - {% endif %} - {% unless post.data.archived %} {% if post.data.summary %}

    {{ post.data.summary }}

    From 1ab55da44e267b45a9d72c77e9f88bb2d202cb58 Mon Sep 17 00:00:00 2001 From: fershad <27988517+fershad@users.noreply.github.com> Date: Sat, 13 Dec 2025 09:23:47 +0800 Subject: [PATCH 12/22] hide content when nothings there --- src/_includes/css/home.css | 57 ++++------------------------ src/_includes/css/index.css | 54 ++++++++++++++++++++++++++ src/_includes/layouts/yearly.liquid | 55 +++++++++++++++++++++------ src/_includes/partials/header.liquid | 6 +-- 4 files changed, 109 insertions(+), 63 deletions(-) diff --git a/src/_includes/css/home.css b/src/_includes/css/home.css index 5f30fa5..5af0344 100644 --- a/src/_includes/css/home.css +++ b/src/_includes/css/home.css @@ -29,38 +29,6 @@ grid-rows: 1; } -.splitview { - display: grid; - grid-template-columns: 20rem 1fr; - gap: 5rem; - padding: 0; - position: relative; -} - -.splitview > .lead-box:after { - content: ""; - position: absolute; - top: 50%; - transform: translateY(-50%); - right: -1rem; - height: 50%; - width: 2px; - background-color: var(--blue-2); -} - -.splitview > .lead-box { - position: sticky; - top: 6.5rem; - bottom: 2rem; - align-self: start; - padding-block: 3rem; - padding-inline-end: 3rem; -} - -.lead-box + ul { - padding-block: 1.5rem; -} - .filmstrip { display: grid; grid-template-columns: repeat(8, minmax(15rem, 1fr)); @@ -87,10 +55,10 @@ nav > .year-nav { background: light-dark(var(--text), var(--background)); position: absolute; - max-width: 100%; - width: 100%; margin-inline: auto; z-index: 10; + left: 50%; + transform: translateX(-50%); } .year-nav ul li { @@ -116,6 +84,10 @@ nav > .year-nav { border: none; } +.year-nav[open] + .page-nav { + opacity: 0; +} + nav > .page-nav { padding-block-start: 0.75rem; margin-block-start: 3rem; @@ -213,7 +185,7 @@ aside:has(.filmstrip):after { } #yearly-content > section { - scroll-margin-block-start: 2.75rem; + scroll-margin-block-start: 7.75rem; } #yearly-content > * > * { @@ -225,8 +197,7 @@ aside:has(.filmstrip):after { } @media (max-width: 768px) { - #intro, - .splitview { + #intro { grid-template-columns: 1fr; } @@ -234,18 +205,6 @@ aside:has(.filmstrip):after { max-width: 100%; } - .splitview > .lead-box { - position: relative; - top: 0; - bottom: 0; - padding-block-end: 0; - align-self: center; - } - - .splitview ul li { - scroll-margin-block: 10rem; - } - .year-nav ul { flex-direction: column; } diff --git a/src/_includes/css/index.css b/src/_includes/css/index.css index e6e0fb3..9e0a3de 100644 --- a/src/_includes/css/index.css +++ b/src/_includes/css/index.css @@ -874,3 +874,57 @@ gaw-info-bar { max-width: 100%; flex-wrap: wrap; } + +.splitview { + display: grid; + grid-template-columns: 20rem 1fr; + gap: 5rem; + padding: 0; + position: relative; +} + +.splitview > .lead-box:after { + content: ""; + position: absolute; + top: 50%; + transform: translateY(-50%); + right: -1rem; + height: 50%; + width: 2px; + background-color: var(--blue-2); +} + +.splitview > .lead-box { + position: sticky; + top: 7.5rem; + bottom: 2rem; + align-self: start; + padding-block: 3rem; + padding-inline-end: 3rem; +} + +.lead-box + ul { + padding-block: 1.5rem; +} + +@media (max-width: 768px) { + .splitview { + grid-template-columns: 1fr; + } + + .splitview > .lead-box { + position: relative; + top: 0; + bottom: 0; + padding-block-end: 0; + align-self: center; + } + + .splitview > .lead-box:after { + display: none; + } + + .splitview ul li { + scroll-margin-block: 10rem; + } +} diff --git a/src/_includes/layouts/yearly.liquid b/src/_includes/layouts/yearly.liquid index 520c55a..cfc90d9 100644 --- a/src/_includes/layouts/yearly.liquid +++ b/src/_includes/layouts/yearly.liquid @@ -33,10 +33,18 @@ css: {% for year in blogYears %} {% unless year == currentYear %}
  • - {{ year }} + {% if year == years.currentYear %} + {{ year }} + {% else %} + {{ year }} + {% endif %} +
  • + {% else %} +
  • + {{ year }}
  • - {% if forloop.last %}{% else %} | {% endif %} {% endunless %} + {% if forloop.last %}{% else %} | {% endif %} {% endfor %} @@ -60,7 +68,7 @@ css:
    - +{% if currentYearPosts.size > 0 %} {% assign sectionId = 'posts' %} {% assign sectionTitle = 'Posts' %} {% assign sectionIntro = 'Ideas, thoughts, and opinions mostly related to digital sustainability and occassionally other topics.' %} @@ -84,10 +92,15 @@ css: {% endcapture %} {% include 'partials/yearlySection.liquid' %} - - -{% include 'partials/filmstrip.liquid', filmSection: 1 %} - + {% if currentYearImages.size > 0 %} + {% assign completeRow = currentYearImages.size | minus: 8 %} + {% if completeRow > 8 %} + {% include 'partials/filmstrip.liquid', filmSection: 1 %} + {% endif %} + {% endif %} + {% endif %} + +{% if currentYearNotes.size > 0 %} {% assign sectionId = 'notes' %} {% assign sectionTitle = 'Notes' %} {% assign sectionIntro = 'Short(ish) thoughts and reflections on a variety of topics.' %} @@ -112,8 +125,17 @@ css: {% include 'partials/yearlySection.liquid' %} - {% include 'partials/filmstrip.liquid', filmSection: 2 %} + {% if currentYearImages.size > 0 %} + {% assign completeRow = currentYearImages.size | minus: 16 %} + {% if completeRow > 8 %} + {% include 'partials/filmstrip.liquid', filmSection: 2 %} + {% endif %} + {% endif %} +{% endif %} + + + {% if currentYearProjects.size > 0 %} {% assign sectionId = "projects" %} {% assign sectionTitle = "Active projects" %} {% assign sectionIntro = "Projects that I've worked on at one time or another through the year." %} @@ -147,8 +169,13 @@ css: {% endcapture %} {% include 'partials/yearlySection.liquid' %} - - {% include 'partials/filmstrip.liquid', filmSection: 3 %} + {% if currentYearImages.size > 0 %} + {% assign completeRow = currentYearImages.size | minus: 24 %} + {% if completeRow > 8 %} + {% include 'partials/filmstrip.liquid', filmSection: 3 %} + {% endif %} + {% endif %} +{% endif %} {% if currentYearTalks.size > 0 %} {% assign sectionId = "talks" %} @@ -180,9 +207,15 @@ css: {% endcapture %} {% include 'partials/yearlySection.liquid' %} - {% endif %} + {% if currentYearImages.size > 0 %} + {% assign completeRow = currentYearImages.size | minus: 32 %} + {% if completeRow > 8 %} + {% include 'partials/filmstrip.liquid', filmSection: 3 %} + {% endif %} + {% endif %} + {% endif %}
    diff --git a/src/_includes/partials/header.liquid b/src/_includes/partials/header.liquid index 154d744..2b8d1a6 100644 --- a/src/_includes/partials/header.liquid +++ b/src/_includes/partials/header.liquid @@ -5,7 +5,7 @@ Digital Sustainability Consultant -