From 12e2f0a18de75387e7b9ece38eeec36b0562480c Mon Sep 17 00:00:00 2001 From: Julian Giebel Date: Fri, 7 Jun 2024 15:53:06 +0200 Subject: [PATCH] Landing page (#64) * Implement landing page * Fix links * Fix responsiveness * Fix body style * Remove wrong margin * Add backdrop blur Add footer * Clean up * Don't show about pages and such in main RSS feed. * Hide OSC for now * Make SS14 logo a link to the main website. * Make background image cover --------- Co-authored-by: Pieter-Jan Briers --- assets/scss/landing_page_trailer.scss | 60 +++++++ assets/scss/main.scss | 1 + config.yml | 3 + content/landing_page/trailer.md | 6 + layouts/home.xml | 71 ++++++++ layouts/landing_page/trailer.html | 66 ++++++++ static/images/logo/GitHub_Lockup_Light.svg | 33 ++++ .../logo/PATREON_SYMBOL_1_BLACK_RGB.svg | 8 + .../logo/PATREON_WORDMARK_1_BLACK_RGB.svg | 28 ++++ static/images/logo/opencollective-ar21.svg | 1 + static/images/logo/ss14_logo_big_en.svg | 153 ++++++++++++++++++ 11 files changed, 430 insertions(+) create mode 100644 assets/scss/landing_page_trailer.scss create mode 100644 content/landing_page/trailer.md create mode 100644 layouts/home.xml create mode 100644 layouts/landing_page/trailer.html create mode 100644 static/images/logo/GitHub_Lockup_Light.svg create mode 100644 static/images/logo/PATREON_SYMBOL_1_BLACK_RGB.svg create mode 100644 static/images/logo/PATREON_WORDMARK_1_BLACK_RGB.svg create mode 100644 static/images/logo/opencollective-ar21.svg create mode 100644 static/images/logo/ss14_logo_big_en.svg diff --git a/assets/scss/landing_page_trailer.scss b/assets/scss/landing_page_trailer.scss new file mode 100644 index 0000000..3596194 --- /dev/null +++ b/assets/scss/landing_page_trailer.scss @@ -0,0 +1,60 @@ +#trailer-landing-page { + display: block; + background-image: none; + height: fit-content; + min-height: 100vh +} + +.trailer-header +{ + position: relative; + height: fit-content; + min-height: 100vh; +} +.trailer-header::before +{ + content: ""; + position: absolute; + top: 0; left: 0; + width: 100%; height: 100%; + background-image: url('/images/home/gallery-bar.webp'); + background-size: cover; + filter: grayscale(100%); +} + +.trailer-header > * +{ + position: relative; +} + +.logo-link { + filter: brightness(1.5); +} + +.trailer-header-logos { + background-color: #00000040; + box-shadow: 0 0 6px 4px #00000040; + max-width: 1000px; + backdrop-filter: blur(2px); +} + +.trailer-header-logos > li { + display: flex; + list-style: none; + justify-content: center; + flex: 1 0 25%; +} + +@media (max-width: 700px) { + .trailer-header-logos > li { + flex: revert !important; + } + + .trailer-header-logos { + flex-direction: column; + } + + .trailer-header:before { + background-position-x: 415px; + } +} diff --git a/assets/scss/main.scss b/assets/scss/main.scss index 1d134b8..7350bc1 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -65,6 +65,7 @@ $fa-font-path: "/fonts/fontawesome"; @import "toc.scss"; @import "media.scss"; @import "serverBrowser.scss"; +@import "landing_page_trailer.scss"; @import "fonts/fira_code.scss"; @import "fonts/montserrat.scss"; diff --git a/config.yml b/config.yml index 0afdc27..2fc53d0 100644 --- a/config.yml +++ b/config.yml @@ -4,6 +4,9 @@ title: "Space Station 14" ignoreFiles: ["\\.ts$", "tsconfig.json$"] mainSections: ["post"] +params: + mainFeedSections: ["post", "updates"] + # PYGMENTS (Syntax Highlighting) settings! # I couldn't get Chroma to parse C# at all. PygmentsUseClassic: true diff --git a/content/landing_page/trailer.md b/content/landing_page/trailer.md new file mode 100644 index 0000000..c2f3f86 --- /dev/null +++ b/content/landing_page/trailer.md @@ -0,0 +1,6 @@ ++++ +title = "Links" +description = "A collection of links related to space station 14" +# This is a section page so have to force-override the layout to be single page. +layout = "trailer" ++++ diff --git a/layouts/home.xml b/layouts/home.xml new file mode 100644 index 0000000..13dacf7 --- /dev/null +++ b/layouts/home.xml @@ -0,0 +1,71 @@ +{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} +{{- $authorEmail := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .email }} + {{- $authorEmail = . }} + {{- end }} + {{- end }} +{{- else }} + {{- with site.Author.email }} + {{- $authorEmail = . }} + {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }} + {{- end }} +{{- end }} + +{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}} +{{- $authorName := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .name }} + {{- $authorName = . }} + {{- end }} + {{- else }} + {{- $authorName = . }} + {{- end }} +{{- else }} + {{- with site.Author.name }} + {{- $authorName = . }} + {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }} + {{- end }} +{{- end }} + +{{- $pctx := . }} +{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} +{{- $pages := slice }} +{{- if or $.IsHome $.IsSection }} +{{- $pages = (where $pctx.RegularPages "Section" "in" .Site.Params.mainFeedSections) }} +{{- else }} +{{- $pages = $pctx.Pages }} +{{- end }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = $pages | first $limit }} +{{- end }} +{{- printf "" | safeHTML }} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo + {{ site.Language.LanguageCode }}{{ with $authorEmail }} + {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} + {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} + {{ . }}{{ end }}{{ if not .Date.IsZero }} + {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{- with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end }} + {{- range $pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} + {{ .Permalink }} + {{ .Summary | transform.XMLEscape | safeHTML }} + + {{- end }} + + diff --git a/layouts/landing_page/trailer.html b/layouts/landing_page/trailer.html new file mode 100644 index 0000000..8768ab8 --- /dev/null +++ b/layouts/landing_page/trailer.html @@ -0,0 +1,66 @@ + + + + + + {{ partial "meta.html" . }} + + {{ if .Title }}{{ .Title }} - SS14{{ else }}Space Station 14{{ end }} + + {{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + {{ partial "head_includes.html" }} + + +
+ + + + +
+ + + + diff --git a/static/images/logo/GitHub_Lockup_Light.svg b/static/images/logo/GitHub_Lockup_Light.svg new file mode 100644 index 0000000..3879c9f --- /dev/null +++ b/static/images/logo/GitHub_Lockup_Light.svg @@ -0,0 +1,33 @@ + + + + + + + + + diff --git a/static/images/logo/PATREON_SYMBOL_1_BLACK_RGB.svg b/static/images/logo/PATREON_SYMBOL_1_BLACK_RGB.svg new file mode 100644 index 0000000..4cf79b6 --- /dev/null +++ b/static/images/logo/PATREON_SYMBOL_1_BLACK_RGB.svg @@ -0,0 +1,8 @@ + + + + + diff --git a/static/images/logo/PATREON_WORDMARK_1_BLACK_RGB.svg b/static/images/logo/PATREON_WORDMARK_1_BLACK_RGB.svg new file mode 100644 index 0000000..0bd8735 --- /dev/null +++ b/static/images/logo/PATREON_WORDMARK_1_BLACK_RGB.svg @@ -0,0 +1,28 @@ + + + + + diff --git a/static/images/logo/opencollective-ar21.svg b/static/images/logo/opencollective-ar21.svg new file mode 100644 index 0000000..cbc16c2 --- /dev/null +++ b/static/images/logo/opencollective-ar21.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/images/logo/ss14_logo_big_en.svg b/static/images/logo/ss14_logo_big_en.svg new file mode 100644 index 0000000..c460953 --- /dev/null +++ b/static/images/logo/ss14_logo_big_en.svg @@ -0,0 +1,153 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + +