diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f599e66..7147f0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,11 @@ jobs: github.ref == 'refs/heads/main' && github.event.repository.fork == false steps: + - name: Set current date as env variable + run: | + echo "builddate=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT + id: version + - name: Checkout uses: actions/checkout@v3 @@ -84,5 +89,5 @@ jobs: token: ${{ secrets.PAT }} title: Update bundled artifacts commit-message: Update bundled artifacts - branch: update-artifacts + branch: update-artifacts-${{ steps.version.outputs.builddate }} base: main diff --git a/assets/scss/_core/_font.scss b/assets/scss/_core/_font.scss index b258857..2cd08c5 100644 --- a/assets/scss/_core/_font.scss +++ b/assets/scss/_core/_font.scss @@ -1,7 +1,7 @@ @font-face { font-family: 'Geist'; src: url('/lib/fonts/GeistVF.woff2') format('woff2'); - font-weight: 90; + font-weight: 400; font-style: normal; font-display: swap; } @@ -45,3 +45,11 @@ font-style: normal; font-display: swap; } + +@font-face { + font-family: 'FW'; + src: url('/lib/fonts/fw.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} diff --git a/assets/scss/_core/_typography.scss b/assets/scss/_core/_typography.scss index 9e6a3f2..bdceea0 100644 --- a/assets/scss/_core/_typography.scss +++ b/assets/scss/_core/_typography.scss @@ -6,7 +6,7 @@ body { font-family: sans-serif; button { - font-family: 'Noto Sans', sans-serif; + font-family: 'FW'; } @include min-width('tablet') { @@ -17,15 +17,43 @@ body { } } -body:lang(en, de, es, fr, it) { +body:lang(en) { font-family: 'Geist', sans-serif; } -body:lang(zh-cn, zh-sg) { +body:lang(de) { + font-family: 'Geist', sans-serif; +} + +body:lang(es) { + font-family: 'Geist', sans-serif; +} + +body:lang(fr) { + font-family: 'Geist', sans-serif; +} + +body:lang(it) { + font-family: 'Geist', sans-serif; +} + +body:lang(zh-cn) { font-family: 'Noto Sans', 'Noto Sans CJK SC', sans-serif; } -body:lang(zh-hk, zh-mo, zh-tw) { +body:lang(zh-sg) { + font-family: 'Noto Sans', 'Noto Sans CJK SC', sans-serif; +} + +body:lang(zh-hk) { + font-family: 'Noto Sans', 'Noto Sans CJK TC', sans-serif; +} + +body:lang(zh-mo) { + font-family: 'Noto Sans', 'Noto Sans CJK TC', sans-serif; +} + +body:lang(zh-tw) { font-family: 'Noto Sans', 'Noto Sans CJK TC', sans-serif; } diff --git a/assets/ts/desktop/stage.ts b/assets/ts/desktop/stage.ts index b6a9fc7..0f7a291 100644 --- a/assets/ts/desktop/stage.ts +++ b/assets/ts/desktop/stage.ts @@ -53,10 +53,10 @@ function getElCurrent(): HTMLImageElement { return elTrail[elTrail.length - 1] } -function getElNextFive(): HTMLImageElement[] { +function getElNextSeven(): HTMLImageElement[] { const s = state.get() const els = [] - for (let i = 0; i < 5; i++) { + for (let i = 0; i < 7; i++) { els.push(imgs[increment(s.index + i, s.length)]) } return els @@ -97,7 +97,7 @@ function setPositions(): void { if (elTrail.length === 0 || !gsapLoaded) return // preload - lores(getElNextFive()) + lores(getElNextSeven()) _gsap.set(elTrail, { x: (i: number) => cordHist.get()[i].x - window.innerWidth / 2, @@ -228,7 +228,7 @@ export function initStage(ijs: ImageJSON[]): void { setPositions() }) // preload - lores(getElNextFive()) + lores(getElNextSeven()) // dynamic import window.addEventListener( 'mousemove', diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 252ad53..e1f61db 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -13,6 +13,10 @@ svgFavicon = "/dot.svg" # fallback png favicon for unsupported browsers svgFaviconFallback = "/dot.png" +# resize options for dynamic resolution, please refer to https://gohugo.io/content-management/image-processing/#image-processing-options +loResOpt = "700x webp Lanczos q60" +hiResOpt = "2000x webp Lanczos q75" + # page config [page] # unified alt text for all images in the page diff --git a/exampleSite/content/Info/index.md b/exampleSite/content/Info/index.md index 991316a..c129d8f 100644 --- a/exampleSite/content/Info/index.md +++ b/exampleSite/content/Info/index.md @@ -16,10 +16,8 @@ The inspiration for this theme came from a video by [Hyperlexed](https://www. Once again, great shout out to [Tyler McRobert](https://tylermcrobert.com) for his inspiration to this project. -[Github ↗](https://instagram.com/pictures.bridget) - -[Instagram ↗](https://www.instagram.com/sped0n/) +[Repo ↗](https://github.com/Sped0n/bridget) Original site design by [Tyler McRobert](https://tylermcrobert.com). -© {{< year >}} Spedon | Powered by [Hugo](https://gohugo.io) +© {{< year >}} [Spedon](https://github.com/Sped0n) | Powered by [Hugo](https://gohugo.io) diff --git a/layouts/partials/head/link.html b/layouts/partials/head/link.html index 77ea31c..143c2e4 100644 --- a/layouts/partials/head/link.html +++ b/layouts/partials/head/link.html @@ -23,10 +23,11 @@ {{- partial "plugin/script.html" $script -}} {{/* fonts */}} - + {{- if (partial "function/langCode.html" (slice "en" "de" "fr" "es" "it")) -}} {{- else if (partial "function/langCode.html" (slice "zh-cn" "zh-sg")) -}} + {{- else if (partial "function/langCode.html" (slice "zh-tw" "zh-hk" "zh-mo")) -}} + {{- else if (partial "function/langCode.html" (slice "ja")) -}} + {{- else if (partial "function/langCode.html" (slice "ko")) -}} +