mirror of https://gitlab.com/tildes/tildes.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
443 lines
6.8 KiB
443 lines
6.8 KiB
// Copyright (c) 2018 Tildes contributors <code@tildes.net>
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
.topic-listing > li {
|
|
margin: 0;
|
|
|
|
&:nth-of-type(2n) {
|
|
color: var(--foreground-mixed-color);
|
|
background-color: var(--background-mixed-color);
|
|
}
|
|
}
|
|
|
|
.topic-listing-filter {
|
|
font-size: 0.6rem;
|
|
margin: 0 0 0.4rem 0.4rem;
|
|
}
|
|
|
|
.topic {
|
|
display: grid;
|
|
grid-template-areas:
|
|
"title voting"
|
|
"metadata voting"
|
|
"info actions";
|
|
grid-template-columns: 1fr auto;
|
|
grid-gap: 0.2rem;
|
|
|
|
// set some minimum row heights on mobile to space them out a bit
|
|
$row-height: $min-touch-size - 4px; // subtract grid-gap
|
|
grid-template-rows: repeat(3, minmax($row-height, auto));
|
|
|
|
// on larger screens, rows can size automatically
|
|
@media (min-width: $size-md) {
|
|
grid-template-rows: auto;
|
|
}
|
|
|
|
align-items: center;
|
|
|
|
position: relative;
|
|
|
|
padding: 0.2rem;
|
|
|
|
@media (min-width: $size-sm) {
|
|
padding: 0.4rem;
|
|
}
|
|
|
|
font-size: 0.6rem;
|
|
|
|
header {
|
|
grid-area: title;
|
|
}
|
|
|
|
.topic-metadata {
|
|
grid-area: metadata;
|
|
}
|
|
|
|
.topic-title {
|
|
@include force-text-wrap-if-needed;
|
|
|
|
display: inline;
|
|
margin: 0;
|
|
margin-right: 0.2rem;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.topic-categories {
|
|
grid-area: category;
|
|
}
|
|
|
|
.topic-info {
|
|
grid-area: info;
|
|
}
|
|
|
|
.topic-text-excerpt {
|
|
grid-area: content;
|
|
}
|
|
|
|
.topic-voting {
|
|
grid-area: voting;
|
|
align-self: start;
|
|
}
|
|
|
|
.topic-actions {
|
|
grid-area: actions;
|
|
align-self: end;
|
|
}
|
|
}
|
|
|
|
.topic-actions {
|
|
.btn {
|
|
height: auto;
|
|
padding: 0 0.2rem;
|
|
font-weight: normal;
|
|
border: 0;
|
|
}
|
|
|
|
.btn-post-action {
|
|
font-weight: normal;
|
|
color: var(--link-color);
|
|
}
|
|
|
|
.btn-post-action-used {
|
|
color: var(--link-visited-color);
|
|
}
|
|
|
|
.dropdown-toggle .icon {
|
|
margin-left: 0.2rem;
|
|
}
|
|
|
|
.menu {
|
|
padding: 0.2rem;
|
|
|
|
li {
|
|
margin-top: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.topic-categories {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.topic-content-metadata {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
// This puts a bullet in front of the topic-content-type only when there's something
|
|
// else in front of it (group name and/or tags)
|
|
.topic-content-type:not(:first-child)::before {
|
|
content: "•";
|
|
margin-right: 0.4rem;
|
|
}
|
|
|
|
// Add a colon after the topic-content-type only when there's metadata after it
|
|
.topic-content-type:not(:last-child)::after {
|
|
content: ": ";
|
|
margin-right: 0.2rem;
|
|
}
|
|
|
|
.topic-group {
|
|
margin-right: 0.4rem;
|
|
}
|
|
|
|
.topic-icon {
|
|
width: 16px;
|
|
height: 16px;
|
|
flex-shrink: 0;
|
|
margin-right: 0.2rem;
|
|
background-size: 16px 16px;
|
|
}
|
|
|
|
.topic-log {
|
|
dt {
|
|
display: inline;
|
|
}
|
|
}
|
|
|
|
.topic-log-listing {
|
|
list-style-type: none;
|
|
margin-left: 0;
|
|
font-size: 0.6rem;
|
|
}
|
|
|
|
.topic-log-entry {
|
|
margin-bottom: 0.8rem;
|
|
}
|
|
|
|
.topic-log-entry-time {
|
|
color: var(--foreground-secondary-color);
|
|
}
|
|
|
|
.topic-metadata {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: baseline;
|
|
max-height: 4rem;
|
|
overflow: hidden;
|
|
|
|
// when users enable showing tags in listings, force them to wrap to a new line
|
|
.topic-tags:last-child {
|
|
width: 100%;
|
|
margin-top: 0.2rem;
|
|
}
|
|
}
|
|
|
|
.topic-tags {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
margin: 0;
|
|
}
|
|
|
|
.topic-voting {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 0.2rem;
|
|
height: auto;
|
|
font-weight: normal;
|
|
|
|
// make the voting button wider on large screens
|
|
min-width: 2rem;
|
|
|
|
@media (min-width: $size-sm) {
|
|
min-width: 3rem;
|
|
}
|
|
|
|
&.btn-used {
|
|
border-color: transparent;
|
|
|
|
&:hover {
|
|
background-color: var(--button-color);
|
|
}
|
|
|
|
.topic-voting-votes {
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
}
|
|
|
|
.topic-voting-votes {
|
|
font-size: 0.8rem;
|
|
line-height: 1rem;
|
|
}
|
|
|
|
.topic-voting-label {
|
|
font-size: 0.6rem;
|
|
line-height: 0.6rem;
|
|
}
|
|
|
|
.topic-text-excerpt {
|
|
@extend %text-container;
|
|
|
|
display: none;
|
|
|
|
@media (min-width: $size-md) {
|
|
display: block;
|
|
}
|
|
|
|
max-width: none;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
font-style: italic;
|
|
|
|
color: var(--foreground-secondary-color);
|
|
|
|
h1 {
|
|
margin: 0 0 0.4rem;
|
|
}
|
|
|
|
summary {
|
|
line-height: 0.8rem;
|
|
}
|
|
|
|
> summary::after {
|
|
font-style: italic;
|
|
content: "Re-collapse topic text";
|
|
display: none;
|
|
color: var(--foreground-secondary-color);
|
|
}
|
|
|
|
&[open] {
|
|
font-style: normal;
|
|
font-size: 0.8rem;
|
|
color: var(--foreground-primary-color);
|
|
|
|
summary {
|
|
font-size: 0.6rem;
|
|
|
|
&::after {
|
|
display: inline;
|
|
}
|
|
|
|
span {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.topic-info {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1.5fr 0.7fr;
|
|
|
|
grid-column-gap: 0.4rem;
|
|
|
|
align-items: end;
|
|
max-width: 32rem;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.topic-info-comments {
|
|
white-space: normal;
|
|
|
|
span {
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
.topic-info-comments-new {
|
|
color: var(--alert-color);
|
|
}
|
|
|
|
.topic-info-source {
|
|
display: flex;
|
|
align-items: center;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.topic-info-source-scheduled {
|
|
font-style: italic;
|
|
color: var(--foreground-secondary-color);
|
|
}
|
|
|
|
.topic-full {
|
|
.topic-voting {
|
|
float: right;
|
|
}
|
|
|
|
header h1 {
|
|
@include force-text-wrap-if-needed;
|
|
}
|
|
}
|
|
|
|
.topic-full-byline {
|
|
margin-bottom: 0.4rem;
|
|
font-size: 0.6rem;
|
|
color: var(--foreground-secondary-color);
|
|
}
|
|
|
|
.topic-full-content-metadata {
|
|
margin: 1rem 0 1rem 1rem;
|
|
|
|
h2 {
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
dl {
|
|
display: grid;
|
|
grid-template-columns: max-content minmax(auto, $paragraph-max-width);
|
|
align-items: baseline;
|
|
|
|
margin: 0;
|
|
}
|
|
|
|
dt {
|
|
grid-column-start: 1;
|
|
padding: 0.2rem;
|
|
font-size: 0.6rem;
|
|
}
|
|
|
|
dd {
|
|
@include force-text-wrap-if-needed;
|
|
|
|
grid-column-start: 2;
|
|
margin: 0;
|
|
padding: 0.2rem;
|
|
font-size: 0.6rem;
|
|
}
|
|
}
|
|
|
|
.topic-full-tags {
|
|
margin-bottom: 0.4rem;
|
|
font-size: 0.6rem;
|
|
color: var(--foreground-secondary-color);
|
|
|
|
a {
|
|
text-decoration: underline;
|
|
color: var(--foreground-secondary-color);
|
|
|
|
&:hover {
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.topic-full-link {
|
|
@include force-text-wrap-if-needed;
|
|
|
|
display: flex;
|
|
align-items: first baseline;
|
|
}
|
|
|
|
.topic-full-content {
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.topic-full-text {
|
|
@extend %text-container;
|
|
|
|
overflow: auto;
|
|
padding-bottom: 0.4rem;
|
|
}
|
|
|
|
.topic-comments-header {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
|
|
margin-bottom: 0.4rem;
|
|
|
|
h2 {
|
|
margin-right: 0.4rem;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.btn-group {
|
|
margin-right: auto;
|
|
}
|
|
|
|
.form-listing-options {
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
|
|
.topic-with-excerpt {
|
|
// on larger screens only, add the "content" grid area
|
|
@media (min-width: $size-md) {
|
|
grid-template-areas:
|
|
"title voting"
|
|
"metadata voting"
|
|
"content voting"
|
|
"info actions";
|
|
}
|
|
}
|
|
|
|
.is-topic-mine {
|
|
border-left: 3px solid var(--stripe-mine-color);
|
|
margin-left: -3px;
|
|
}
|
|
|
|
.is-topic-official {
|
|
border-left: 3px solid var(--alert-color);
|
|
margin-left: -3px;
|
|
|
|
h1 {
|
|
a,
|
|
a:visited {
|
|
color: var(--alert-color);
|
|
}
|
|
}
|
|
}
|