From 66ff3aab1c5d863f622bebd76fe576a751f99dd8 Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Fri, 20 Sep 2024 15:33:20 -0600 Subject: [PATCH] Video page styling --- static/style/video.css | 60 +++++++++++++++++++++++++++++++++++++++++- templates/video.html | 53 +++++++++++++++++++++---------------- 2 files changed, 90 insertions(+), 23 deletions(-) diff --git a/static/style/video.css b/static/style/video.css index bcb4c21..73a7ba5 100644 --- a/static/style/video.css +++ b/static/style/video.css @@ -1,4 +1,4 @@ -.video-container { +/* .video-container { max-width: 600px; margin: 0 auto; } @@ -18,4 +18,62 @@ video { video { max-width: 100%; } +} */ + + +/* new stuff */ + +.media-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 20px; + max-width: 1200px; + margin: 0 auto; + margin-bottom: 1rem; +} + +.media-card { + background-color: white; + border-radius: 8px; + overflow: hidden; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +.media-card h3 { + padding: 15px; + margin: 0; + font-size: 18px; + background-color: #f8f8f8; +} + +.audio-container audio { + width: 100%; +} + +.video-container video { + width: 100%; + max-width: 600px; + display: block; + margin: 0 auto; +} + +.media-download { + padding: 15px; + text-align: center; +} + +.media-download a { + display: inline-block; + padding: 10px 15px; + background-color: #007bff; + color: white; + text-decoration: none; + border-radius: 4px; +} + +/* narrower than 600px */ +@media (max-width: 600px) { + .media-grid { + grid-template-columns: 1fr; + } } \ No newline at end of file diff --git a/templates/video.html b/templates/video.html index c4202fb..77f5c1d 100644 --- a/templates/video.html +++ b/templates/video.html @@ -5,6 +5,7 @@ {{.original.Title}} + {{template "footer-css" .}} @@ -13,31 +14,39 @@

{{.original.Title}}

- {{range .videos}} -

{{.Source}} {{.Width}} x {{.Height}} @ {{.FPS}}

-
- +
+ {{range .videos}} +
+

{{.Source}} {{.Width}} x {{.Height}} @ {{.FPS}}

+
+ +
+ +
+ {{end}}
-
- Download ({{.Size}}, {{.StreamRate}}) +
+ {{range .audios}} +
+

{{.Kbps}}

+
+ +
+ +
+ {{end}}
- {{end}} - {{range .audios}} -

{{.Kbps}}

-
- -
- - {{end}}