/* GoToSocial Copyright (C) 2021-2023 GoToSocial Authors admin@gotosocial.org This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ @import "photoswipe/dist/photoswipe.css"; @import "photoswipe-dynamic-caption-plugin/photoswipe-dynamic-caption-plugin.css"; main { background: transparent; grid-auto-rows: auto; } .thread { display: flex; flex-direction: column; border-radius: $br; } .toot { background: $toot-bg; box-shadow: $boxshadow; border: $boxshadow-border; border-radius: $br; position: relative; margin-bottom: $br; padding-top: 0.75rem; a { position: relative; z-index: 1; color: inherit; text-decoration: none; } .author > a { padding: 0 0.75rem; display: grid; 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; border: 0.15rem solid $avatar-border; border-radius: $br; overflow: hidden; /* hides corners from img overflowing */ img { height: 100%; width: 100%; object-fit: cover; background: $bg; } } .displayname, .username { justify-self: start; align-self: start; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .displayname { grid-area: display; font-weight: bold; font-size: 1rem; line-height: 1.3rem; /* margin-top: -0.5rem; */ } .username { grid-area: user; color: $link-fg; font-size: 1rem; line-height: 1.3rem; } .timestamp { grid-area: date; color: $fg-reduced; } } .body { padding: 0 0.75rem; } details > summary { list-style: none; padding-bottom: 0.5rem; display: inline-block; .button { white-space: nowrap; padding: 0.2rem 0.3rem; cursor: pointer; font-size: 1rem; } } .text { margin: 0; padding-top: 0.5rem; grid-row: span 1; grid-column: 1 / span 3; position: relative; z-index: 2; width: 100%; a { color: $link-fg; text-decoration: underline; } .content { padding-bottom: 0.5rem; word-break: break-word; blockquote { padding: 0.5rem 0 0.5rem 0.5rem; border-left: 0.2rem solid $border-accent; margin: 0; font-style: italic; } hr { border: 1px dashed $border-accent; } pre, code { background-color: $gray2; } code { padding: 0.25rem; border-radius: $br-inner; } pre { display: flex; border-radius: $br; padding: 0.5rem; code { padding: 0.5rem; white-space: pre; border-radius: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; } } img { max-width: 100%; margin: 5px auto; } img[alt~="!center"] { display: block; } } .emoji { transition: 0.1s; } .emoji:hover, .emoji:active { transform: scale(2); background-color: $bg; box-shadow: $boxshadow; border: $boxshadow-border; border-radius: $br-inner; } } .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 { 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 { z-index: 2; } input.sensitive-checkbox:checked { /* Media is shown */ & ~ .video-play { display: flex; } & ~ .sensitive { .closed { transition: 0.8s; pointer-events: none; opacity: 0; & > * { display: none; } } .open { display: flex; justify-content: flex-start; .button { align-self: flex-start; display: initial; z-index: 4; } } } } .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%; .open, .closed { display: flex; position: absolute; height: 100%; width: 100%; justify-content: center; padding: 1rem; label { z-index: 3; } } .closed { transition: 0.3s; background: $bg-sensitive; @supports (backdrop-filter: blur(2rem)) { background: transparent; backdrop-filter: blur(2rem); } .button { align-self: center; justify-self: center; } } } .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; } &:hover { span { display: block; } border-radius: 0.2rem; } } img { width: 100%; height: 100%; object-fit: cover; } } .info { display: flex; background: $toot-info-bg; color: $fg-reduced; border-top: 0.15rem solid $toot-info-border; padding: 0.5rem 0.75rem; div, time { padding-right: 1rem; } .stats { display: flex; } grid-column: span 3; flex-wrap: wrap; } .toot-link { top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; text-indent: 100%; white-space: nowrap; position: absolute; z-index: 0; } &:first-child { /* top left, top right */ border-top-left-radius: $br; border-top-right-radius: $br; } &:last-child, &:last-child .info { /* bottom left, bottom right */ border-bottom-left-radius: $br; border-bottom-right-radius: $br; margin-bottom: 0; } &.expanded { background: $toot-focus-bg; padding-bottom: 0; .info { background: $toot-focus-info-bg; } .not-expanded { display: none; } .media { margin-bottom: 0.5rem; } } }