diff --git a/public/style.css b/public/style.css index ebf9c40c..d4a0919f 100644 --- a/public/style.css +++ b/public/style.css @@ -7501,6 +7501,14 @@ video { .breadcrumb.current { text-overflow: clip ellipsis; } +.aspect-ratio-real--1x1 { + aspect-ratio: 1 / 1; +} +.center-abs { + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} @media screen and (min-width: 35em) { .bg1-ns { background-color: var(--c1); @@ -8896,9 +8904,8 @@ code .ss, max-height: 60vh; } .timeline-item .timeline-media.timeline-embed { - height: 0; position: relative; - padding-bottom: 56.25%; + aspect-ratio: 16 / 9; } .timeline-item .timeline-media.timeline-embed > iframe { position: absolute; diff --git a/src/rawdata/css/core.css b/src/rawdata/css/core.css index 148c4321..fb937cca 100644 --- a/src/rawdata/css/core.css +++ b/src/rawdata/css/core.css @@ -363,6 +363,17 @@ on our SVGs to ensure that they naturally render at the right size.) } } +/* NOTE(asaf): Tachyons uses a padding trick instead of using the actual property */ +.aspect-ratio-real--1x1 { + aspect-ratio: 1 / 1; +} + +.center-abs { + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + @media screen and (min-width: 35em) { .bg1-ns { background-color: var(--c1); @@ -661,4 +672,4 @@ on our SVGs to ensure that they naturally render at the right size.) height: 100%; margin: auto; } -} \ No newline at end of file +} diff --git a/src/rawdata/css/timeline.css b/src/rawdata/css/timeline.css index dd4bc2a2..61755a48 100644 --- a/src/rawdata/css/timeline.css +++ b/src/rawdata/css/timeline.css @@ -33,13 +33,10 @@ max-height: 60vh; &.timeline-embed { - /* aspect-ratio aspect-ratio--16x9 */ - height: 0; position: relative; - padding-bottom: 56.25%; + aspect-ratio: 16 / 9; >iframe { - /* aspect-ratio--object */ position: absolute; top: 0; right: 0; @@ -78,4 +75,4 @@ height: var(--size); background-color: var(--unread-color); border-radius: 999px; -} \ No newline at end of file +} diff --git a/src/templates/img/play.svg b/src/templates/img/play.svg new file mode 100644 index 00000000..ba04293c --- /dev/null +++ b/src/templates/img/play.svg @@ -0,0 +1 @@ + diff --git a/src/templates/src/include/timeline_item.html b/src/templates/src/include/timeline_item.html index b5db4b12..534e2830 100644 --- a/src/templates/src/include/timeline_item.html +++ b/src/templates/src/include/timeline_item.html @@ -70,7 +70,19 @@ {{ else if eq .Type mediaaudio }}