From 7ea11ebd51e47f7b56ffacbc6a54739c28b286bb Mon Sep 17 00:00:00 2001 From: Ben Visness Date: Sat, 6 Aug 2022 23:43:15 -0500 Subject: [PATCH] Bam that's the rest of the todo list --- public/style.css | 14 +++++------ public/themes/dark/theme.css | 1 + public/themes/light/theme.css | 1 + src/parsing/parsing.go | 2 ++ src/rawdata/scss/_core.scss | 4 ---- src/rawdata/scss/_timeline.scss | 24 +++++++++++-------- src/rawdata/scss/themes/dark/_variables.scss | 2 ++ src/rawdata/scss/themes/light/_variables.scss | 2 ++ .../src/include/showcase_templates.html | 2 +- src/templates/src/include/timeline_item.html | 4 ++-- .../src/layouts/wheeljam_2022_base.html | 2 ++ src/templates/src/wheeljam_2022_index.html | 4 ++-- 12 files changed, 36 insertions(+), 26 deletions(-) diff --git a/public/style.css b/public/style.css index 0c432fbb..f4e864ac 100644 --- a/public/style.css +++ b/public/style.css @@ -7472,9 +7472,6 @@ article code { .h1-5 { height: 1.5rem; } -.pre-line { - white-space: pre-line; } - .fira { font-family: "Fira Sans", sans-serif; } @@ -9396,10 +9393,13 @@ span.icon-rss::before { .timeline-item .avatar-icon.big { width: 3.875rem; height: 3.875rem; } } - .timeline-item .timeline-content-box > * { - display: block; - max-width: 100%; - max-height: 80vh; } + .timeline-item .timeline-content-box { + background-color: rgba(0, 0, 0, 0.2); + background-color: var(--timeline-content-background); } + .timeline-item .timeline-content-box > * { + display: block; + max-width: 100%; + max-height: 80vh; } .timeline-modal .container { max-height: 100vh; } diff --git a/public/themes/dark/theme.css b/public/themes/dark/theme.css index c69c5f6d..bcb5d540 100644 --- a/public/themes/dark/theme.css +++ b/public/themes/dark/theme.css @@ -288,6 +288,7 @@ pre, code, .codeblock { --forum-diff-insert-border-color: #30591b; --card-background: #282828; --card-background-hover: #333; + --timeline-content-background: rgba(255, 255, 255, 0.06); --irc-border-color: #333; --irc-tab-current-shadow: 0px 0px 5px #000 inset; --irc-tab-close-button-color: #bbb; diff --git a/public/themes/light/theme.css b/public/themes/light/theme.css index 1e6a2371..5ea692db 100644 --- a/public/themes/light/theme.css +++ b/public/themes/light/theme.css @@ -306,6 +306,7 @@ pre, code, .codeblock { --forum-diff-insert-border-color: #5baa3f; --card-background: #e8e8e8; --card-background-hover: #f0f0f0; + --timeline-content-background: rgba(0, 0, 0, 0.2); --irc-border-color: #ddd; --irc-tab-current-shadow: 0px 0px 5px #bbb inset; --irc-tab-close-button-color: #fff; diff --git a/src/parsing/parsing.go b/src/parsing/parsing.go index 63802938..9a747404 100644 --- a/src/parsing/parsing.go +++ b/src/parsing/parsing.go @@ -4,6 +4,7 @@ import ( "bytes" "github.com/yuin/goldmark/parser" + "github.com/yuin/goldmark/renderer/html" "github.com/yuin/goldmark" highlighting "github.com/yuin/goldmark-highlighting" @@ -42,6 +43,7 @@ var DiscordMarkdown = makeGoldmark( Previews: false, Embeds: false, })...), + goldmark.WithRendererOptions(html.WithHardWraps()), ) func ParseMarkdown(source string, md goldmark.Markdown) string { diff --git a/src/rawdata/scss/_core.scss b/src/rawdata/scss/_core.scss index d486bde4..bb05d4c4 100644 --- a/src/rawdata/scss/_core.scss +++ b/src/rawdata/scss/_core.scss @@ -337,10 +337,6 @@ article code { height: 1.5rem; } -.pre-line { - white-space: pre-line; -} - .fira { font-family: "Fira Sans", sans-serif; } diff --git a/src/rawdata/scss/_timeline.scss b/src/rawdata/scss/_timeline.scss index deb97b4e..b4ea6085 100644 --- a/src/rawdata/scss/_timeline.scss +++ b/src/rawdata/scss/_timeline.scss @@ -18,17 +18,21 @@ } } - .timeline-content-box > * { - display: block; - max-width: 100%; - max-height: 80vh; - } + .timeline-content-box { + @include usevar(background-color, timeline-content-background); - .timeline-content-box.embed { - @extend .aspect-ratio, .aspect-ratio--16x9; - - > iframe { - @extend .aspect-ratio--object; + > * { + display: block; + max-width: 100%; + max-height: 80vh; + } + + &.embed { + @extend .aspect-ratio, .aspect-ratio--16x9; + + > iframe { + @extend .aspect-ratio--object; + } } } } diff --git a/src/rawdata/scss/themes/dark/_variables.scss b/src/rawdata/scss/themes/dark/_variables.scss index f90fac10..48f13e07 100644 --- a/src/rawdata/scss/themes/dark/_variables.scss +++ b/src/rawdata/scss/themes/dark/_variables.scss @@ -99,6 +99,8 @@ $vars: ( card-background: #282828, card-background-hover: #333, + timeline-content-background: rgba(255, 255, 255, 0.06), + irc-border-color: #333, irc-tab-current-shadow: 0px 0px 5px #000 inset, irc-tab-close-button-color: #bbb, diff --git a/src/rawdata/scss/themes/light/_variables.scss b/src/rawdata/scss/themes/light/_variables.scss index 20f21859..0f02537c 100644 --- a/src/rawdata/scss/themes/light/_variables.scss +++ b/src/rawdata/scss/themes/light/_variables.scss @@ -99,6 +99,8 @@ $vars: ( card-background: #e8e8e8, card-background-hover: #f0f0f0, + timeline-content-background: rgba(0, 0, 0, 0.2), + irc-border-color: #ddd, irc-tab-current-shadow: 0px 0px 5px #bbb inset, irc-tab-close-button-color: #fff, diff --git a/src/templates/src/include/showcase_templates.html b/src/templates/src/include/showcase_templates.html index d63affae..beb73827 100644 --- a/src/templates/src/include/showcase_templates.html +++ b/src/templates/src/include/showcase_templates.html @@ -27,7 +27,7 @@ -
+
Unknown description
diff --git a/src/templates/src/include/timeline_item.html b/src/templates/src/include/timeline_item.html index cad2fc9d..3e94466c 100644 --- a/src/templates/src/include/timeline_item.html +++ b/src/templates/src/include/timeline_item.html @@ -38,7 +38,7 @@ {{ if .Description }}
-
{{ trim .Description }}
+
{{ trim .Description }}
{{ if .TruncateDescription }}
{{ end }} @@ -51,7 +51,7 @@ {{ end }} {{ range .EmbedMedia }} -
+
{{ if eq .Type mediaimage }} {{ else if eq .Type mediavideo }} diff --git a/src/templates/src/layouts/wheeljam_2022_base.html b/src/templates/src/layouts/wheeljam_2022_base.html index 1e8c55e5..5fc5fa17 100644 --- a/src/templates/src/layouts/wheeljam_2022_base.html +++ b/src/templates/src/layouts/wheeljam_2022_base.html @@ -55,6 +55,8 @@ --theme-color-dim: {{ $themeDim }}; --theme-color-dimmer: {{ $themeDimmer }}; --theme-color-dimmest: {{ $themeDimmest }}; + + --timeline-content-background: rgba(255, 255, 255, 0.1); } body { diff --git a/src/templates/src/wheeljam_2022_index.html b/src/templates/src/wheeljam_2022_index.html index 755d2494..d52fcad9 100644 --- a/src/templates/src/wheeljam_2022_index.html +++ b/src/templates/src/wheeljam_2022_index.html @@ -279,8 +279,8 @@

Jam.

- {{ if eq .DaysUntilStart 0 }} - Create a Handmade Network project + {{ if and (eq .DaysUntilStart 0) (not .SubmittedProjectUrl) }} + Create a Handmade Network project {{ else }} After the jam starts, create a Handmade Network project {{ end }}