From 39b8f480e433fb0b40ce7b82805bf5cd22e46430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vri=20=F0=9F=8C=88?= Date: Wed, 5 Apr 2023 23:53:25 +0200 Subject: [PATCH 01/26] fix continous deployment (#13) Co-authored-by: vrifox Reviewed-on: https://code.cozy.town/vrifox/website/pulls/13 --- .woodpecker.yml | 17 ++++++++++++++--- assets/scss/fonts/playfair.scss | 4 ++-- layouts/partials/sidebar.html | 4 ++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 2877d9d..b80af5e 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,9 +1,20 @@ pipeline: - build: + build-stable: image: archlinux commands: - pacman -Syu --noconfirm hugo git - hugo --destination /woodpecker/build/ --minify --cleanDestinationDir + when: + branch: [ main ] + + build-dev: + image: archlinux + commands: + - pacman -Syu --noconfirm hugo git + - hugo --destination /woodpecker/build/ --baseURL "https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" --cleanDestinationDir + when: + branch: + exclude: [ main ] upload-stable: image: archlinux @@ -26,8 +37,8 @@ pipeline: - echo "$SSH_KEY" > /root/.ssh/id_ed25519 - chmod 700 /root/.ssh/id_ed25519 - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config - - rsync -rv --delete -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ caddy@$SSH_HOST:/var/lib/caddy/woodpecker/vrifox.cc-dev/CI_COMMIT_BRANCH/$CI_COMMIT_SHA/ --mkpath --checksum - - echo "The preview is now available on https://dev.vrifox.cc/CI_COMMIT_BRANCH/$CI_COMMIT_SHA/" + - rsync -rv --delete -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ caddy@$SSH_HOST:/var/lib/caddy/woodpecker/vrifox.cc-dev/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/ --mkpath --checksum + - echo "The preview is now available on https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" secrets: [ ssh_key, ssh_port, ssh_host ] when: branch: diff --git a/assets/scss/fonts/playfair.scss b/assets/scss/fonts/playfair.scss index 12f2d93..0c3db89 100644 --- a/assets/scss/fonts/playfair.scss +++ b/assets/scss/fonts/playfair.scss @@ -1,12 +1,12 @@ @font-face { font-family: "playfair"; src: local("Playfair"), - url("/fonts/playfair/PlayfairDisplay-Regular.woff2") format(woff2); + url("../fonts/playfair/PlayfairDisplay-Regular.woff2") format(woff2); } @font-face { font-family: "playfair"; src: local("Playfair"), - url("/fonts/playfair/PlayfairDisplay-Bold.woff2") format(woff2); + url("../fonts/playfair/PlayfairDisplay-Bold.woff2") format(woff2); font-weight: bold; } \ No newline at end of file diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 6a1084f..73de7c4 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -12,9 +12,9 @@ From 83590f56b68764771024de31b8719ce46c2d1931 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 17 May 2023 13:16:09 +0200 Subject: [PATCH 02/26] use hugoci image --- .woodpecker.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index b80af5e..0a0abc0 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,25 +1,22 @@ pipeline: build-stable: - image: archlinux + image: code.cozy.town/vrifox/hugoci:latest commands: - - pacman -Syu --noconfirm hugo git - hugo --destination /woodpecker/build/ --minify --cleanDestinationDir when: branch: [ main ] build-dev: - image: archlinux + image: code.cozy.town/vrifox/hugoci:latest commands: - - pacman -Syu --noconfirm hugo git - hugo --destination /woodpecker/build/ --baseURL "https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" --cleanDestinationDir when: branch: exclude: [ main ] upload-stable: - image: archlinux + image: code.cozy.town/vrifox/hugoci:latest commands: - - pacman -Syu --noconfirm openssh rsync - mkdir -p /root/.ssh - echo "$SSH_KEY" > /root/.ssh/id_ed25519 - chmod 700 /root/.ssh/id_ed25519 @@ -30,9 +27,8 @@ pipeline: branch: [ main ] upload-dev: - image: archlinux + image: code.cozy.town/vrifox/hugoci:latest commands: - - pacman -Syu --noconfirm openssh rsync - mkdir -p /root/.ssh - echo "$SSH_KEY" > /root/.ssh/id_ed25519 - chmod 700 /root/.ssh/id_ed25519 From 014d970ffd389fa3054d7a465c0994d5ad4c36b6 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 17 May 2023 13:20:19 +0200 Subject: [PATCH 03/26] add condition --- layouts/_default/baseof.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 42a6217..35f53f3 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,7 +8,7 @@ - + {{- block "header" . }}{{ end }} {{ partial "sidebar.html" . }} {{- block "main" . }}{{ end }} From 4c53ad19f560832cb7609eddfbaadeef9a774aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vri=20=F0=9F=8C=88?= Date: Wed, 5 Apr 2023 23:53:25 +0200 Subject: [PATCH 04/26] fix continous deployment (#13) Co-authored-by: vrifox Reviewed-on: https://code.cozy.town/vrifox/website/pulls/13 --- .woodpecker.yml | 17 ++++++++++++++--- assets/scss/fonts/playfair.scss | 4 ++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 2877d9d..b80af5e 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,9 +1,20 @@ pipeline: - build: + build-stable: image: archlinux commands: - pacman -Syu --noconfirm hugo git - hugo --destination /woodpecker/build/ --minify --cleanDestinationDir + when: + branch: [ main ] + + build-dev: + image: archlinux + commands: + - pacman -Syu --noconfirm hugo git + - hugo --destination /woodpecker/build/ --baseURL "https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" --cleanDestinationDir + when: + branch: + exclude: [ main ] upload-stable: image: archlinux @@ -26,8 +37,8 @@ pipeline: - echo "$SSH_KEY" > /root/.ssh/id_ed25519 - chmod 700 /root/.ssh/id_ed25519 - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config - - rsync -rv --delete -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ caddy@$SSH_HOST:/var/lib/caddy/woodpecker/vrifox.cc-dev/CI_COMMIT_BRANCH/$CI_COMMIT_SHA/ --mkpath --checksum - - echo "The preview is now available on https://dev.vrifox.cc/CI_COMMIT_BRANCH/$CI_COMMIT_SHA/" + - rsync -rv --delete -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ caddy@$SSH_HOST:/var/lib/caddy/woodpecker/vrifox.cc-dev/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/ --mkpath --checksum + - echo "The preview is now available on https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" secrets: [ ssh_key, ssh_port, ssh_host ] when: branch: diff --git a/assets/scss/fonts/playfair.scss b/assets/scss/fonts/playfair.scss index 12f2d93..0c3db89 100644 --- a/assets/scss/fonts/playfair.scss +++ b/assets/scss/fonts/playfair.scss @@ -1,12 +1,12 @@ @font-face { font-family: "playfair"; src: local("Playfair"), - url("/fonts/playfair/PlayfairDisplay-Regular.woff2") format(woff2); + url("../fonts/playfair/PlayfairDisplay-Regular.woff2") format(woff2); } @font-face { font-family: "playfair"; src: local("Playfair"), - url("/fonts/playfair/PlayfairDisplay-Bold.woff2") format(woff2); + url("../fonts/playfair/PlayfairDisplay-Bold.woff2") format(woff2); font-weight: bold; } \ No newline at end of file From 3eb883a1920474e6a40edd7beefe9ba8f7383c4a Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 17 May 2023 13:16:09 +0200 Subject: [PATCH 05/26] use hugoci image --- .woodpecker.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index b80af5e..0a0abc0 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,25 +1,22 @@ pipeline: build-stable: - image: archlinux + image: code.cozy.town/vrifox/hugoci:latest commands: - - pacman -Syu --noconfirm hugo git - hugo --destination /woodpecker/build/ --minify --cleanDestinationDir when: branch: [ main ] build-dev: - image: archlinux + image: code.cozy.town/vrifox/hugoci:latest commands: - - pacman -Syu --noconfirm hugo git - hugo --destination /woodpecker/build/ --baseURL "https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" --cleanDestinationDir when: branch: exclude: [ main ] upload-stable: - image: archlinux + image: code.cozy.town/vrifox/hugoci:latest commands: - - pacman -Syu --noconfirm openssh rsync - mkdir -p /root/.ssh - echo "$SSH_KEY" > /root/.ssh/id_ed25519 - chmod 700 /root/.ssh/id_ed25519 @@ -30,9 +27,8 @@ pipeline: branch: [ main ] upload-dev: - image: archlinux + image: code.cozy.town/vrifox/hugoci:latest commands: - - pacman -Syu --noconfirm openssh rsync - mkdir -p /root/.ssh - echo "$SSH_KEY" > /root/.ssh/id_ed25519 - chmod 700 /root/.ssh/id_ed25519 From 727357ab3ec633a00d3999782f206003917af781 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 17 May 2023 13:20:19 +0200 Subject: [PATCH 06/26] add condition --- layouts/_default/baseof.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 42a6217..35f53f3 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,7 +8,7 @@ - + {{- block "header" . }}{{ end }} {{ partial "sidebar.html" . }} {{- block "main" . }}{{ end }} From 71259aea50db0b231631d0669c7b954145cf126e Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 17 May 2023 14:45:41 +0200 Subject: [PATCH 07/26] improve font loading --- assets/scss/fonts/playfair.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/scss/fonts/playfair.scss b/assets/scss/fonts/playfair.scss index 0c3db89..87605d2 100644 --- a/assets/scss/fonts/playfair.scss +++ b/assets/scss/fonts/playfair.scss @@ -2,6 +2,7 @@ font-family: "playfair"; src: local("Playfair"), url("../fonts/playfair/PlayfairDisplay-Regular.woff2") format(woff2); + font-display: swap; } @font-face { @@ -9,4 +10,5 @@ src: local("Playfair"), url("../fonts/playfair/PlayfairDisplay-Bold.woff2") format(woff2); font-weight: bold; + font-display: swap; } \ No newline at end of file From 26fbe298bf05287218752f78c7f8f636fe4230d5 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 17 May 2023 14:50:54 +0200 Subject: [PATCH 08/26] improve image quality --- layouts/partials/sidebar.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 9b07a0a..35a54b3 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -4,7 +4,7 @@
{{ with .Site.Params.avatar }} {{ $avatar := resources.Get . }} - {{ $avatar := $avatar.Resize "64x webp" }} + {{ $avatar := $avatar.Resize "96x webp" }} {{ $.Site.Params.displayName }} {{ end }}
From 1013d07f1cff567197b8919448901a1671b3b5cb Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 17 May 2023 14:53:31 +0200 Subject: [PATCH 09/26] fix DOCTYPE --- layouts/_default/baseof.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 35f53f3..1241061 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,4 +1,4 @@ - + {{ with .Title }} {{ . }} – {{ end }}{{ .Site.Title }} From a90f5a6edc29c2f9e2799de867b93e2e96208811 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 17 May 2023 14:58:32 +0200 Subject: [PATCH 10/26] remove robots.txt --- config/_default/config.yaml | 2 +- layouts/robots.txt | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 layouts/robots.txt diff --git a/config/_default/config.yaml b/config/_default/config.yaml index a2ebc12..05a5675 100644 --- a/config/_default/config.yaml +++ b/config/_default/config.yaml @@ -1,7 +1,7 @@ baseURL: "https://vrifox.cc/" title: "Vris Cute Corner" -enableRobotsTXT: true +enableRobotsTXT: false defaultContentLanguage: de defaultContentLanguageInSubdir: true enableGitInfo: true diff --git a/layouts/robots.txt b/layouts/robots.txt deleted file mode 100644 index d336aa6..0000000 --- a/layouts/robots.txt +++ /dev/null @@ -1,5 +0,0 @@ -User-agent: * - -{{range .Pages}} -Disallow: {{.RelPermalink}} -{{end}} From cb51826059426464c5b23f5cf96e74ba3d049bc1 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 17 May 2023 15:26:00 +0200 Subject: [PATCH 11/26] add descriptions --- content/_index.de.md | 4 ++++ content/_index.en.md | 4 ++++ content/_index.md | 6 ------ layouts/_default/baseof.html | 7 +++++++ 4 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 content/_index.de.md create mode 100644 content/_index.en.md delete mode 100644 content/_index.md diff --git a/content/_index.de.md b/content/_index.de.md new file mode 100644 index 0000000..06217a2 --- /dev/null +++ b/content/_index.de.md @@ -0,0 +1,4 @@ +--- +title: "Hola πŸ––" +description: "Die Website von Vri aka vrifox. Sie erstellt Websites und Grafiken. Außerdem betreibt und betreut sie Cozy Town." +--- \ No newline at end of file diff --git a/content/_index.en.md b/content/_index.en.md new file mode 100644 index 0000000..0566936 --- /dev/null +++ b/content/_index.en.md @@ -0,0 +1,4 @@ +--- +title: "Hola πŸ––" +description: "The website of Vri aka vrifox. She creates websites and graphics. Additionally she hosts and maintains Cozy Town." +--- \ No newline at end of file diff --git a/content/_index.md b/content/_index.md deleted file mode 100644 index e5222e1..0000000 --- a/content/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "Hola πŸ––" ---- -I create Websites and Graphics - -Additinaly I host and maintain [Cozy Town](https://cozy.town) \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 1241061..0506706 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -7,6 +7,13 @@ + {{- block "header" . }}{{ end }} From 914d5ff0f6d388e6f76e7e25b22fa76d26583e94 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 17 May 2023 15:36:56 +0200 Subject: [PATCH 12/26] add GSC file --- static/google3423f546928945a1.html | 1 + 1 file changed, 1 insertion(+) create mode 100644 static/google3423f546928945a1.html diff --git a/static/google3423f546928945a1.html b/static/google3423f546928945a1.html new file mode 100644 index 0000000..ae6d3fd --- /dev/null +++ b/static/google3423f546928945a1.html @@ -0,0 +1 @@ +google-site-verification: google3423f546928945a1.html \ No newline at end of file From 98c2d2c164d8132a423e4709b896677ba2532ea7 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 17 May 2023 15:42:47 +0200 Subject: [PATCH 13/26] fix translation --- i18n/en.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/en.yaml b/i18n/en.yaml index 716669c..3f08843 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -30,9 +30,9 @@ introduction-sub: other: and Computer Science is my passion. home-websites-and-graphics: - other: Ich erstelle Websites und Grafiken + other: I create websites and graphics home-cozy-town: - other: Zudem betreibe und betreue ich Cozy Town + other: Additionally I host and maintain Cozy Town # Blog blog-heading: From a29261b5c059c2575f33de2789b6459deaa532b9 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 17 May 2023 17:57:02 +0200 Subject: [PATCH 14/26] use different directory structure --- .../.hugo-build.yml | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) rename .woodpecker.yml => .woodpecker/.hugo-build.yml (87%) diff --git a/.woodpecker.yml b/.woodpecker/.hugo-build.yml similarity index 87% rename from .woodpecker.yml rename to .woodpecker/.hugo-build.yml index 0a0abc0..a881703 100644 --- a/.woodpecker.yml +++ b/.woodpecker/.hugo-build.yml @@ -4,15 +4,7 @@ pipeline: commands: - hugo --destination /woodpecker/build/ --minify --cleanDestinationDir when: - branch: [ main ] - - build-dev: - image: code.cozy.town/vrifox/hugoci:latest - commands: - - hugo --destination /woodpecker/build/ --baseURL "https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" --cleanDestinationDir - when: - branch: - exclude: [ main ] + branch: main upload-stable: image: code.cozy.town/vrifox/hugoci:latest @@ -22,9 +14,22 @@ pipeline: - chmod 700 /root/.ssh/id_ed25519 - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config - rsync -rv --delete -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ caddy@$SSH_HOST:/var/lib/caddy/woodpecker/vrifox.cc/ --mkpath --checksum - secrets: [ ssh_key, ssh_port, ssh_host ] + secrets: + - ssh_key + - ssh_port + - ssh_host when: - branch: [ main ] + branch: main + + + + build-dev: + image: code.cozy.town/vrifox/hugoci:latest + commands: + - hugo --destination /woodpecker/build/ --baseURL "https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" --cleanDestinationDir + when: + branch: + exclude: main upload-dev: image: code.cozy.town/vrifox/hugoci:latest @@ -35,7 +40,10 @@ pipeline: - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config - rsync -rv --delete -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ caddy@$SSH_HOST:/var/lib/caddy/woodpecker/vrifox.cc-dev/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/ --mkpath --checksum - echo "The preview is now available on https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" - secrets: [ ssh_key, ssh_port, ssh_host ] + secrets: + - ssh_key + - ssh_port + - ssh_host when: branch: - exclude: [ main ] \ No newline at end of file + exclude: main \ No newline at end of file From 9fdef1a7db315d7c19659f83fbafdfb9467c7231 Mon Sep 17 00:00:00 2001 From: vrifox Date: Thu, 18 May 2023 13:03:09 +0200 Subject: [PATCH 15/26] fix svg according to w3 validator --- assets/icons/blog.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/icons/blog.svg b/assets/icons/blog.svg index fd47943..cff106d 100644 --- a/assets/icons/blog.svg +++ b/assets/icons/blog.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file From 41be8c98a5244296afa2340f734265e4e73a11c7 Mon Sep 17 00:00:00 2001 From: vrifox Date: Thu, 18 May 2023 13:17:48 +0200 Subject: [PATCH 16/26] improve accessibility --- assets/scss/partials/sidebar.scss | 142 +++++++++++++++--------------- layouts/partials/sidebar.html | 24 ++--- 2 files changed, 82 insertions(+), 84 deletions(-) diff --git a/assets/scss/partials/sidebar.scss b/assets/scss/partials/sidebar.scss index e94e8c8..bf161e3 100644 --- a/assets/scss/partials/sidebar.scss +++ b/assets/scss/partials/sidebar.scss @@ -81,7 +81,7 @@ } } - header { + #avatar-wrapper { text-align: center; user-select: none; padding: inherit; @@ -230,86 +230,84 @@ } } } - aside { - #social-links { - text-align: center; + #social-links { + text-align: center; - @media (max-width: 1140px) { - display: none; - } - - a { - display: flex; - padding: 1rem; - place-content: center; - - &:hover { - .mastodon-icon { - color: hsl(251.5, 58.9%, 51.4%); - } - } - - .mastodon-icon { - color: hsl(239.6, 100%, 69.4%); - } - - .icon { - height: 1.25rem; - width: 1.25rem; - display: block; - - @media (prefers-reduced-motion: no-preference) { - transition: color 0.2s ease-in-out; - } - } - } + @media (max-width: 1140px) { + display: none; } - #languages { - text-align: center; - border-radius: 0.5rem 0.5rem 1.85rem 0.5rem; + + a { + display: flex; + padding: 1rem; + place-content: center; - @media (max-width: 1140px) { - border-radius: 4rem; - position: absolute; - top: 1rem; - left: calc(100vw - 1em - 64px); - font-size: 1.4rem; - border-radius: 100%; - background-color: var(--sidebar-accent-1); - aspect-ratio: 1 / 1; - width: 64px; - display: flex; - align-items: center; - justify-content: center; - overflow: hidden; - } - @media (prefers-reduced-motion: no-preference) { - transition: background-color 0.2s ease-in-out; - } - &:hover { - background-color: var(--sidebar-accent-1); - - @media (max-width: 1140px) { - background-color: var(--sidebar-accent-2); - } - } - &:active { - background-color: var(--sidebar-accent-2); - - @media (max-width: 1140px) { - background-color: var(--sidebar-accent-3); + .mastodon-icon { + color: hsl(251.5, 58.9%, 51.4%); } } - #language { + .mastodon-icon { + color: hsl(239.6, 100%, 69.4%); + } + + .icon { + height: 1.25rem; + width: 1.25rem; display: block; - text-decoration: none; - width: 100%; - height: 100%; - padding: 1rem; - pointer-events: all; + + @media (prefers-reduced-motion: no-preference) { + transition: color 0.2s ease-in-out; + } } } } + #languages { + text-align: center; + border-radius: 0.5rem 0.5rem 1.85rem 0.5rem; + + @media (max-width: 1140px) { + border-radius: 4rem; + position: absolute; + top: 1rem; + left: calc(100vw - 1em - 64px); + font-size: 1.4rem; + border-radius: 100%; + background-color: var(--sidebar-accent-1); + aspect-ratio: 1 / 1; + width: 64px; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; + } + @media (prefers-reduced-motion: no-preference) { + transition: background-color 0.2s ease-in-out; + } + + &:hover { + background-color: var(--sidebar-accent-1); + + @media (max-width: 1140px) { + background-color: var(--sidebar-accent-2); + } + } + &:active { + background-color: var(--sidebar-accent-2); + + @media (max-width: 1140px) { + background-color: var(--sidebar-accent-3); + } + } + + #language { + display: block; + text-decoration: none; + width: 100%; + height: 100%; + padding: 1rem; + pointer-events: all; + } + } } \ No newline at end of file diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 35a54b3..cea5988 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -1,14 +1,14 @@ {{ $currentPage := . }} - +
+ +
{{- if .Site.IsMultiLingual }} {{ $siteLanguages := .Site.Languages }} {{ $pageLanguage := .Page.Lang }} @@ -39,6 +39,6 @@ {{ end }} {{ end }} {{- end }} - - - +
+
+ From 30b4ffa43d1b70d6c94e6c7187946588ef26ec33 Mon Sep 17 00:00:00 2001 From: vrifox Date: Thu, 18 May 2023 13:19:15 +0200 Subject: [PATCH 17/26] fix aria-labels --- layouts/partials/sidebar.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index cea5988..b2d71cd 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -8,7 +8,7 @@ {{ $.Site.Params.displayName }} {{ end }} -