diff options
| author | William Hergès <william@herges.fr> | 2025-08-29 16:24:25 +0200 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-08-29 16:24:25 +0200 |
| commit | e2cdf90a4e318a10c443711bf4254410873d2d1d (patch) | |
| tree | b62d3e2cd8395375a0671b074991aa13bbbc78b4 | |
| parent | a4e2949d76442f29ed1af4c8b0b0964ee8196d1e (diff) | |
feat(base): webring integration
| -rw-r--r-- | data.go | 19 | ||||
| -rw-r--r-- | scss/main.scss | 25 | ||||
| -rw-r--r-- | templates/base/base.gohtml | 11 |
3 files changed, 48 insertions, 7 deletions
@@ -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 @@ <style> .links { {{ .Data.Color.Button.GetBackground }}{{ .Data.Color.Button.GetTextColor }} } </style> - {{ else }} + {{ else }} {{ range .Data.RelMeLinks }} <link rel="me" href="{{ . }}" /> {{ end }} @@ -22,6 +22,15 @@ <div class="center"> {{template "body" .Data}} </div> + {{ if ne .Data.Rings nil }} + <div class="rings"> + {{ range $ring := .Data.Rings }} + <a href="{{ $ring.Link }}" target="_blank" class="ring"> + <img src="{{ getImage $ring.Image }}" alt="{{ $ring.Name }} logo"> + </a> + {{ end }} + </div> + {{ end }} <footer class="credits"> <p>Crafted by <a href="/legal" target="_blank">Anhgelus Morhtuuzh</a></p> </footer> |
