From 822a489c099239901b8e9bab2c18d2f528f29a1d Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Tue, 9 Aug 2022 12:33:52 +0300 Subject: [PATCH] Don't center file links in snippets. --- public/style.css | 10 +++++----- src/rawdata/scss/_timeline.scss | 4 +++- src/templates/src/include/timeline_item.html | 2 +- src/templates/templates.go | 9 +++++---- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/public/style.css b/public/style.css index f4e864ac..6c7ee2a3 100644 --- a/public/style.css +++ b/public/style.css @@ -9393,13 +9393,13 @@ span.icon-rss::before { .timeline-item .avatar-icon.big { width: 3.875rem; height: 3.875rem; } } - .timeline-item .timeline-content-box { + .timeline-item .timeline-content-box.timeline-item-bg { 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-item .timeline-content-box > * { + display: block; + max-width: 100%; + max-height: 80vh; } .timeline-modal .container { max-height: 100vh; } diff --git a/src/rawdata/scss/_timeline.scss b/src/rawdata/scss/_timeline.scss index b4ea6085..bfc2e827 100644 --- a/src/rawdata/scss/_timeline.scss +++ b/src/rawdata/scss/_timeline.scss @@ -19,7 +19,9 @@ } .timeline-content-box { - @include usevar(background-color, timeline-content-background); + &.timeline-item-bg { + @include usevar(background-color, timeline-content-background); + } > * { display: block; diff --git a/src/templates/src/include/timeline_item.html b/src/templates/src/include/timeline_item.html index 3e94466c..07053dc9 100644 --- a/src/templates/src/include/timeline_item.html +++ b/src/templates/src/include/timeline_item.html @@ -51,7 +51,7 @@ {{ end }} {{ range .EmbedMedia }} -
+
{{ if eq .Type mediaimage }} {{ else if eq .Type mediavideo }} diff --git a/src/templates/templates.go b/src/templates/templates.go index 6cca05a9..3afe7573 100644 --- a/src/templates/templates.go +++ b/src/templates/templates.go @@ -246,8 +246,9 @@ var HMNTemplateFuncs = template.FuncMap{ } }, - "mediaimage": func() TimelineItemMediaType { return TimelineItemMediaTypeImage }, - "mediavideo": func() TimelineItemMediaType { return TimelineItemMediaTypeVideo }, - "mediaaudio": func() TimelineItemMediaType { return TimelineItemMediaTypeAudio }, - "mediaembed": func() TimelineItemMediaType { return TimelineItemMediaTypeEmbed }, + "mediaimage": func() TimelineItemMediaType { return TimelineItemMediaTypeImage }, + "mediavideo": func() TimelineItemMediaType { return TimelineItemMediaTypeVideo }, + "mediaaudio": func() TimelineItemMediaType { return TimelineItemMediaTypeAudio }, + "mediaembed": func() TimelineItemMediaType { return TimelineItemMediaTypeEmbed }, + "mediaunknown": func() TimelineItemMediaType { return TimelineItemMediaTypeUnknown }, }