From e2cdf90a4e318a10c443711bf4254410873d2d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Fri, 29 Aug 2025 16:24:25 +0200 Subject: feat(base): webring integration --- data.go | 19 +++++++++++++------ scss/main.scss | 25 +++++++++++++++++++++++++ templates/base/base.gohtml | 11 ++++++++++- 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/data.go b/data.go index 103207b..7782b7b 100644 --- a/data.go +++ b/data.go @@ -24,15 +24,22 @@ type ConfigData interface { } type Config struct { - Image string `json:"image" toml:"image"` - Description string `json:"description" toml:"description"` - Person *Person `json:"person" toml:"person"` - Color *Color `json:"colors" toml:"colors"` - Links []*Link `json:"links" toml:"links"` + Image string `json:"image" toml:"image"` + Description string `json:"description" toml:"description"` + folder string Legal string `json:"legal" toml:"legal"` RelMeLinks []string `json:"rel_me_links" toml:"rel_me_links"` CustomPages []string `json:"custom_pages" toml:"custom_pages"` - folder string + Person *Person `json:"person" toml:"person"` + Color *Color `json:"colors" toml:"colors"` + Links []*Link `json:"links" toml:"links"` + Rings []*Ring `json:"rings" toml:"rings"` +} + +type Ring struct { + Image string `json:"image" toml:"image"` + Name string `json:"name" toml:"name"` + Link string `json:"link" toml:"link"` } type Person struct { diff --git a/scss/main.scss b/scss/main.scss index 3d070f3..f0fa97a 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -261,6 +261,31 @@ li { } } +.rings { + position: fixed; + right: 4rem; + bottom: 4rem; + display: flex; + flex-direction: column-reverse; + justify-content: center; + align-items: center; + gap: 1rem; + height: 3rem; + @media only screen and (max-width: vars.$bp-little) { + position: absolute; + left: 2rem; + right: 2rem; + } +} + +.ring { + display: block; + height: 100%; + & img { + height: 100%; + } +} + .credits-legal { max-width: 800px; padding: 0 2rem 1rem 2rem; diff --git a/templates/base/base.gohtml b/templates/base/base.gohtml index fced948..51f53de 100644 --- a/templates/base/base.gohtml +++ b/templates/base/base.gohtml @@ -12,7 +12,7 @@ - {{ else }} + {{ else }} {{ range .Data.RelMeLinks }} {{ end }} @@ -22,6 +22,15 @@
{{template "body" .Data}}
+ {{ if ne .Data.Rings nil }} +
+ {{ range $ring := .Data.Rings }} + + {{ $ring.Name }} logo + + {{ end }} +
+ {{ end }} -- cgit v1.2.3