status.css (7004B)
1 /* 2 GoToSocial 3 Copyright (C) 2021-2023 GoToSocial Authors admin@gotosocial.org 4 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU Affero General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU Affero General Public License for more details. 14 15 You should have received a copy of the GNU Affero General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 @import "photoswipe/dist/photoswipe.css"; 20 @import "photoswipe-dynamic-caption-plugin/photoswipe-dynamic-caption-plugin.css"; 21 @import "plyr/dist/plyr.css"; 22 23 main { 24 background: transparent; 25 grid-auto-rows: auto; 26 } 27 28 .thread { 29 display: flex; 30 flex-direction: column; 31 border-radius: $br; 32 } 33 34 .toot { 35 background: $toot-bg; 36 box-shadow: $boxshadow; 37 border: $boxshadow-border; 38 border-radius: $br; 39 position: relative; 40 margin-bottom: $br; 41 padding-top: 0.75rem; 42 43 a { 44 position: relative; 45 z-index: 1; 46 color: inherit; 47 text-decoration: none; 48 } 49 50 .author > a { 51 padding: 0 0.75rem; 52 display: grid; 53 grid-template-columns: 3.5rem 1fr auto; 54 grid-template-rows: auto auto; 55 grid-template-areas: 56 "avatar display date" 57 "avatar user ."; 58 gap: 0 0.5rem; 59 60 .avatar { 61 grid-area: avatar; 62 height: 3.5rem; 63 width: 3.5rem; 64 object-fit: cover; 65 66 border: 0.15rem solid $avatar-border; 67 border-radius: $br; 68 overflow: hidden; /* hides corners from img overflowing */ 69 70 img { 71 height: 100%; 72 width: 100%; 73 object-fit: cover; 74 background: $bg; 75 } 76 } 77 78 .displayname, .username { 79 justify-self: start; 80 align-self: start; 81 82 max-width: 100%; 83 white-space: nowrap; 84 overflow: hidden; 85 text-overflow: ellipsis; 86 } 87 88 .displayname { 89 grid-area: display; 90 font-weight: bold; 91 font-size: 1rem; 92 line-height: 1.3rem; 93 /* margin-top: -0.5rem; */ 94 } 95 96 .username { 97 grid-area: user; 98 color: $link-fg; 99 font-size: 1rem; 100 line-height: 1.3rem; 101 } 102 103 .timestamp { 104 grid-area: date; 105 color: $fg-reduced; 106 } 107 } 108 109 .body { 110 padding: 0.5rem 0.75rem; 111 display: flex; 112 flex-direction: column; 113 gap: 0.5rem; 114 } 115 116 details > summary { 117 display: inline-block; 118 list-style: none; 119 120 &::-webkit-details-marker { 121 display: none; /* Safari */ 122 } 123 124 .button { 125 white-space: nowrap; 126 cursor: pointer; 127 } 128 } 129 130 .text { 131 margin: 0; 132 grid-row: span 1; 133 grid-column: 1 / span 3; 134 135 position: relative; 136 z-index: 2; 137 138 width: 100%; 139 140 details > summary { 141 padding-bottom: 0.5rem; 142 143 .button { 144 padding: 0.2rem 0.3rem; 145 font-size: 1rem; 146 } 147 } 148 149 a { 150 color: $link-fg; 151 text-decoration: underline; 152 } 153 154 .content { 155 word-break: break-word; 156 157 blockquote { 158 padding: 0.5rem 0 0.5rem 0.5rem; 159 border-left: 0.2rem solid $border-accent; 160 margin: 0; 161 font-style: italic; 162 } 163 164 hr { 165 border: 1px dashed $border-accent; 166 } 167 168 pre, code { 169 background-color: $gray2; 170 } 171 172 code { 173 padding: 0.25rem; 174 border-radius: $br-inner; 175 } 176 177 pre { 178 display: flex; 179 border-radius: $br; 180 padding: 0.5rem; 181 182 code { 183 padding: 0.5rem; 184 white-space: pre; 185 border-radius: 0; 186 overflow-x: auto; 187 -webkit-overflow-scrolling: touch; 188 } 189 } 190 191 img { 192 max-width: 100%; 193 margin: 5px auto; 194 } 195 img[alt~="!center"] { 196 display: block; 197 } 198 } 199 200 .emoji { 201 transition: 0.1s; 202 } 203 204 .emoji:hover, .emoji:active { 205 transform: scale(2); 206 background-color: $bg; 207 box-shadow: $boxshadow; 208 border: $boxshadow-border; 209 border-radius: $br-inner; 210 } 211 } 212 213 .media { 214 grid-column: span 3; 215 display: grid; 216 grid-template-columns: 50% 50%; 217 grid-auto-rows: 10rem; 218 overflow: hidden; 219 220 .media-wrapper { 221 height: 100%; 222 width: 100%; 223 box-sizing: border-box; 224 border: 0.15rem solid $gray1; 225 border-radius: $br; 226 position: relative; 227 overflow: hidden; 228 z-index: 2; 229 230 details { 231 position: absolute; 232 height: 100%; 233 width: 100%; 234 235 &[open] summary { 236 height: auto; 237 width: auto; 238 margin: 1rem; 239 padding: 0; 240 241 .show, video, img { 242 display: none; 243 } 244 245 .eye.button .hide { 246 display: inline-block; 247 grid-column: 1 / span 3; 248 grid-row: 1 / span 2; 249 } 250 } 251 252 summary { 253 position: absolute; 254 height: 100%; 255 width: 100%; 256 z-index: 3; 257 overflow: hidden; 258 259 display: grid; 260 padding: 1rem; 261 grid-template-columns: 1fr auto 1fr; 262 grid-template-rows: 1fr 1fr; 263 grid-template-areas: 264 "eye sensitive ." 265 ". sensitive ."; 266 267 .eye.button { 268 grid-area: eye; 269 align-self: start; 270 justify-self: start; 271 margin: 0; 272 padding: 0.4rem; 273 274 .fa-fw { 275 line-height: $fa-fw; 276 } 277 278 .hide { 279 display: none; 280 } 281 } 282 283 .show.sensitive { 284 grid-area: sensitive; 285 align-self: center; 286 287 .button { 288 cursor: pointer; 289 align-self: center; 290 } 291 } 292 293 video, img { 294 z-index: -1; 295 position: absolute; 296 height: calc(100% + 1.2rem); 297 width: calc(100% + 1.2rem); 298 top: -0.6rem; 299 left: -0.6rem; 300 filter: blur(1.2rem); 301 } 302 } 303 304 video.plyr-video, .plyr { 305 position: absolute; 306 height: 100%; 307 width: 100%; 308 object-fit: contain; 309 background: $gray1; 310 } 311 } 312 } 313 314 &.single .media-wrapper { 315 grid-column: span 2; 316 } 317 318 &.odd .media-wrapper:first-child, &.double .media-wrapper { 319 grid-row: span 2; 320 } 321 322 img { 323 width: 100%; 324 height: 100%; 325 object-fit: cover; 326 } 327 } 328 329 .info { 330 display: flex; 331 background: $toot-info-bg; 332 color: $fg-reduced; 333 border-top: 0.15rem solid $toot-info-border; 334 padding: 0.5rem 0.75rem; 335 336 div, time { 337 padding-right: 1rem; 338 } 339 340 .stats { 341 display: flex; 342 } 343 344 grid-column: span 3; 345 flex-wrap: wrap; 346 } 347 348 .toot-link { 349 top: 0; 350 right: 0; 351 bottom: 0; 352 left: 0; 353 overflow: hidden; 354 text-indent: 100%; 355 white-space: nowrap; 356 357 position: absolute; 358 z-index: 0; 359 } 360 361 &:first-child { 362 /* top left, top right */ 363 border-top-left-radius: $br; 364 border-top-right-radius: $br; 365 } 366 367 &:last-child, &:last-child .info { 368 /* bottom left, bottom right */ 369 border-bottom-left-radius: $br; 370 border-bottom-right-radius: $br; 371 margin-bottom: 0; 372 } 373 374 &.expanded { 375 background: $toot-focus-bg; 376 padding-bottom: 0; 377 378 .info { 379 background: $toot-focus-info-bg; 380 } 381 } 382 } 383 384 .plyr--video { 385 flex-direction: column-reverse; 386 387 .plyr__video-wrapper { 388 position: relative; 389 } 390 391 .plyr__controls { 392 align-self: stretch; 393 position: initial; 394 padding: 0.1rem; 395 padding-top: 0.2rem; 396 } 397 398 .plyr__control { 399 box-shadow: none; 400 } 401 402 .plyr__control--overlaid { 403 top: calc(50% - 18px); 404 } 405 } 406 407 .pswp__content { 408 padding: 2rem; 409 410 .plyr { 411 max-height: 100%; 412 } 413 }