diff options
Diffstat (limited to 'web/source/css/status.css')
-rw-r--r-- | web/source/css/status.css | 399 |
1 files changed, 184 insertions, 215 deletions
diff --git a/web/source/css/status.css b/web/source/css/status.css index 70a47a022..3d0037557 100644 --- a/web/source/css/status.css +++ b/web/source/css/status.css @@ -18,6 +18,7 @@ @import "photoswipe/dist/photoswipe.css"; @import "photoswipe-dynamic-caption-plugin/photoswipe-dynamic-caption-plugin.css"; +@import "plyr/dist/plyr.css"; main { background: transparent; @@ -31,13 +32,13 @@ main { } .toot { - background: $toot-unfocus-bg; + background: $toot-bg; box-shadow: $boxshadow; border: $boxshadow-border; + border-radius: $br; position: relative; margin-bottom: $br; - padding-top: 1.5rem; - padding-bottom: 0.7rem; + padding-top: 0.75rem; a { position: relative; @@ -46,87 +47,88 @@ main { text-decoration: none; } - .contentgrid { - padding: 0 1.5rem; + .author > a { + padding: 0 0.75rem; display: grid; - grid-template-columns: 4rem 1fr auto; - grid-template-rows: 1.5rem auto auto auto; - column-gap: 0.5rem; - } + grid-template-columns: 3.5rem 1fr auto; + grid-template-rows: auto auto; + grid-template-areas: + "avatar display date" + "avatar user ."; + gap: 0 0.5rem; + + .avatar { + grid-area: avatar; + height: 3.5rem; + width: 3.5rem; + object-fit: cover; - .not-expanded { - color: $fg-reduced; - grid-column: 3; - grid-row: 1; - } + border: 0.15rem solid $avatar-border; + border-radius: $br; + overflow: hidden; /* hides corners from img overflowing */ - .avatar { - grid-row: span 3; - aspect-ratio: 1/1; - display: flex; - border: 0.2rem solid $avatar-border; - border-radius: 0.4rem; - overflow: hidden; /* hides corners from img overflowing */ - - img { - height: 100%; - width: 100%; - object-fit: cover; - background: $bg; + img { + height: 100%; + width: 100%; + object-fit: cover; + background: $bg; + } } - } - .displayname, .username { - justify-self: start; - align-self: start; + .displayname, .username { + justify-self: start; + align-self: start; - max-width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } + max-width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } - .displayname { - font-weight: bold; - font-size: 1.5rem; - line-height: 2rem; - margin-top: -0.5rem; - } + .displayname { + grid-area: display; + font-weight: bold; + font-size: 1rem; + line-height: 1.3rem; + /* margin-top: -0.5rem; */ + } - .username { - color: $link-fg; - font-size: 1rem; - line-height: 1.3rem; - } + .username { + grid-area: user; + color: $link-fg; + font-size: 1rem; + line-height: 1.3rem; + } - input.spoiler:checked ~ .content { - display: none; + .timestamp { + grid-area: date; + color: $fg-reduced; + } } - .spoiler { - padding-bottom: 0.5rem; - + .body { + padding: 0.5rem 0.75rem; display: flex; - align-items: center; - flex-wrap: wrap; - gap: 0.4rem; + flex-direction: column; + gap: 0.5rem; + } - .spoiler-text { - word-break: break-word; + details > summary { + display: inline-block; + list-style: none; + + &::-webkit-details-marker { + display: none; /* Safari */ } - label { - padding: 0.2rem 0.3rem; + .button { + white-space: nowrap; cursor: pointer; - font-size: 1rem; - } - label:hover { } } .text { margin: 0; - padding-top: 0.5rem; grid-row: span 1; grid-column: 1 / span 3; @@ -135,14 +137,21 @@ main { width: 100%; + details > summary { + padding-bottom: 0.5rem; + + .button { + padding: 0.2rem 0.3rem; + font-size: 1rem; + } + } + a { color: $link-fg; text-decoration: underline; } .content { - padding-bottom: 0.5rem; - word-break: break-word; blockquote { @@ -202,152 +211,112 @@ main { } .media { - margin-top: 0.5rem; - border-radius: $br; grid-column: span 3; display: grid; grid-template-columns: 50% 50%; grid-auto-rows: 10rem; overflow: hidden; - gap: 0.3rem; .media-wrapper { + height: 100%; + width: 100%; + box-sizing: border-box; + border: 0.15rem solid $gray1; + border-radius: $br; position: relative; - } - - &.single .media-wrapper { - grid-column: span 2; - } - - &.odd .media-wrapper:first-child, &.double .media-wrapper { - grid-row: span 2; - } - - .open, .open .button { - display: none; - } - - .closed { + overflow: hidden; z-index: 2; - } - input.sensitive-checkbox:checked { /* Media is shown */ - & ~ .video-play { - display: flex; - } - & ~ .sensitive { - .closed { - transition: 0.8s; - pointer-events: none; - opacity: 0; + details { + position: absolute; + height: 100%; + width: 100%; - & > * { + &[open] summary { + height: auto; + width: auto; + margin: 1rem; + padding: 0; + + .show, video, img { display: none; } - } - .open { - display: flex; - justify-content: flex-start; - - .button { - align-self: flex-start; - display: initial; - z-index: 4; + .eye.button .hide { + display: inline-block; + grid-column: 1 / span 3; + grid-row: 1 / span 2; } } - } - } - - .video-play { - .icon-span { - align-self: center; - display: initial; - z-index: 4; - - .icon { - color: $white1; - } - .icon-bg { - color: $gray1; - font-size: 1.1em; - } - } - - display: none; - position: absolute; - height: 100%; - width: 100%; - justify-content: center; - align-items: center; - font-size: 7em; - pointer-events: none; - } - - .sensitive { - position: absolute; - height: 100%; - width: 100%; + summary { + position: absolute; + height: 100%; + width: 100%; + z-index: 3; + overflow: hidden; + + display: grid; + padding: 1rem; + grid-template-columns: 1fr auto 1fr; + grid-template-rows: 1fr 1fr; + grid-template-areas: + "eye sensitive ." + ". sensitive ."; + + .eye.button { + grid-area: eye; + align-self: start; + justify-self: start; + margin: 0; + padding: 0.4rem; + + .fa-fw { + line-height: $fa-fw; + } + + .hide { + display: none; + } + } - .open, .closed { - display: flex; - position: absolute; - height: 100%; - width: 100%; - justify-content: center; - padding: 1rem; + .show.sensitive { + grid-area: sensitive; + align-self: center; - label { - z-index: 3; - } - } + .button { + cursor: pointer; + align-self: center; + } + } - .closed { - transition: 0.3s; - background: $bg-sensitive; - @supports (backdrop-filter: blur(2rem)) { - background: transparent; - backdrop-filter: blur(2rem); + video, img { + z-index: -1; + position: absolute; + height: calc(100% + 1.2rem); + width: calc(100% + 1.2rem); + top: -0.6rem; + left: -0.6rem; + filter: blur(1.2rem); + } } - .button { - align-self: center; - justify-self: center; + video.plyr-video, .plyr { + position: absolute; + height: 100%; + width: 100%; + object-fit: contain; + background: $gray1; } } } - .no-image-desc { - color: $no-img-desc-fg; - background: $no-img-desc-bg; - display: flex; - position: absolute; - bottom: 0.1rem; - right: 0.4rem; - margin-bottom: 0.4rem; - margin-right: 0.4rem; - padding: 0.1rem 0.45rem; - border-radius: 100%; - border: 0.2rem solid $button-fg; - z-index: 3; - - i.fa { - display: block; - line-height: 1.6rem; - } - - span { - margin-left: 0.3rem; - display: none; - } + &.single .media-wrapper { + grid-column: span 2; + } - &:hover { - span { - display: block; - } - border-radius: 0.2rem; - } + &.odd .media-wrapper:first-child, &.double .media-wrapper { + grid-row: span 2; } img { @@ -358,14 +327,14 @@ main { } .info { + display: flex; background: $toot-info-bg; color: $fg-reduced; - display: none; border-top: 0.15rem solid $toot-info-border; - padding: 0.5rem 1.5rem; + padding: 0.5rem 0.75rem; - div { - padding-right: 1.3rem; + div, time { + padding-right: 1rem; } .stats { @@ -406,39 +375,39 @@ main { background: $toot-focus-bg; padding-bottom: 0; - .contentgrid { - .displayname { - grid-column: span 2; - } - - .not-expanded { - display: none; - } - } - .info { - display: flex; - } - - .media { - margin-bottom: 0.5rem; + background: $toot-focus-info-bg; } } } -footer + div { /* something weird from the devstack.. */ - display: none; -} +.plyr--video { + flex-direction: column-reverse; -@media screen and (max-width: 89ch) { - .toot { - .contentgrid { - grid-template-rows: 1.5rem 1.3rem 1.3rem auto; - } + .plyr__video-wrapper { + position: relative; + } - .username, .not-expanded { - grid-column: 2; - grid-row: auto; - } + .plyr__controls { + align-self: stretch; + position: initial; + padding: 0.1rem; + padding-top: 0.2rem; + } + + .plyr__control { + box-shadow: none; + } + + .plyr__control--overlaid { + top: calc(50% - 18px); } } + +.pswp__content { + padding: 2rem; + + .plyr { + max-height: 100%; + } +}
\ No newline at end of file |