mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 10:09:31 -07:00
v0.0.2 (#144)
* chore(Geist): bump geist font to v1.0.1 * refactor(_typography.scss): split the CSS lang tag to ensure compatibility with Chromium-based browsers * refactor(stage.ts): bump up preload count on desktop * feat(params.toml): add support for user defined resize option * feat(_fonts.scss): add a new font file to better support fullwidth plus and minus * refactor(info): update info * chore(build.yml): update branch name for updating bundled artifacts to include the current date * chore(package.json): update version from 0.0.1 to v0.0.2 to reflect changes made in the codebase
This commit is contained in:
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -16,10 +16,8 @@ The inspiration for this theme came from a video by <u>[Hyperlexed](https://www.
|
||||
|
||||
Once again, great shout out to <u>[Tyler McRobert](https://tylermcrobert.com)</u> 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 <u>[Tyler McRobert](https://tylermcrobert.com)</u>.
|
||||
|
||||
© {{< year >}} Spedon | Powered by [Hugo](https://gohugo.io)
|
||||
© {{< year >}} <u>[Spedon](https://github.com/Sped0n)</u> | Powered by [Hugo](https://gohugo.io)
|
||||
|
||||
@@ -23,10 +23,11 @@
|
||||
{{- partial "plugin/script.html" $script -}}
|
||||
|
||||
{{/* fonts */}}
|
||||
<link rel="preload" href="/lib/fonts/NotoSans-Regular.woff2" as="font" crossorigin />
|
||||
<link rel="preload" href="/lib/fonts/fw.woff2" as="font" crossorigin />
|
||||
{{- if (partial "function/langCode.html" (slice "en" "de" "fr" "es" "it")) -}}
|
||||
<link rel="preload" href="/lib/fonts/GeistVF.woff2" as="font" crossorigin />
|
||||
{{- else if (partial "function/langCode.html" (slice "zh-cn" "zh-sg")) -}}
|
||||
<link rel="preload" href="/lib/fonts/NotoSans-Regular.woff2" as="font" crossorigin />
|
||||
<link
|
||||
rel="preload"
|
||||
href="/lib/fonts/NotoSansCJKsc-Regular.woff2"
|
||||
@@ -34,6 +35,7 @@
|
||||
crossorigin
|
||||
/>
|
||||
{{- else if (partial "function/langCode.html" (slice "zh-tw" "zh-hk" "zh-mo")) -}}
|
||||
<link rel="preload" href="/lib/fonts/NotoSans-Regular.woff2" as="font" crossorigin />
|
||||
<link
|
||||
rel="preload"
|
||||
href="/lib/fonts/NotoSansCJKtc-Regular.woff2"
|
||||
@@ -41,6 +43,7 @@
|
||||
crossorigin
|
||||
/>
|
||||
{{- else if (partial "function/langCode.html" (slice "ja")) -}}
|
||||
<link rel="preload" href="/lib/fonts/NotoSans-Regular.woff2" as="font" crossorigin />
|
||||
<link
|
||||
rel="preload"
|
||||
href="/lib/fonts/NotoSansCJKjp-Regular.woff2"
|
||||
@@ -48,6 +51,7 @@
|
||||
crossorigin
|
||||
/>
|
||||
{{- else if (partial "function/langCode.html" (slice "ko")) -}}
|
||||
<link rel="preload" href="/lib/fonts/NotoSans-Regular.woff2" as="font" crossorigin />
|
||||
<link
|
||||
rel="preload"
|
||||
href="/lib/fonts/NotoSansCJKkr-Regular.woff2"
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
{{- with $params.unifiedAlt -}}
|
||||
{{- $alt = . -}}
|
||||
{{- end -}}
|
||||
{{- $lores := .Resize "800x webp Lanczos q60" -}}
|
||||
{{- $hires := .Resize "2500x webp Lanczos q75" -}}
|
||||
{{- $lores := .Resize (site.Params.loResOpt | default "700x webp Lanczos q60") -}}
|
||||
{{- $hires := .Resize (site.Params.hiResOpt | default "2000x webp Lanczos q75") -}}
|
||||
{{- $Page.Scratch.Add "img" (dict
|
||||
"index" (int $index)
|
||||
"alt" (string $alt)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bridget",
|
||||
"version": "0.0.1",
|
||||
"version": "v0.0.2",
|
||||
"description": "bridget theme source file",
|
||||
"packageManager": "pnpm@8.10.2",
|
||||
"private": true,
|
||||
|
||||
Binary file not shown.
BIN
static/lib/fonts/fw.woff2
Normal file
BIN
static/lib/fonts/fw.woff2
Normal file
Binary file not shown.
Reference in New Issue
Block a user