discourse/app/assets/stylesheets/desktop/topic-list.scss

369 lines
6.8 KiB
SCSS
Raw Normal View History

2018-01-13 06:27:38 +08:00
// --------------------------------------------------
// Topic lists
// --------------------------------------------------
2013-09-06 03:37:07 +08:00
2018-01-13 06:27:38 +08:00
// List controls
// --------------------------------------------------
2013-09-06 03:37:07 +08:00
2018-01-13 06:27:38 +08:00
.list-controls {
.nav {
float: left;
margin-bottom: 18px;
}
2018-01-13 06:27:38 +08:00
.btn {
float: right;
margin-left: 8px;
margin-bottom: 10px;
font-size: $font-up-1;
font-weight: normal;
}
2013-10-29 05:37:31 +08:00
2018-01-13 06:27:38 +08:00
.search .btn {
float: none;
}
2015-04-02 13:02:07 +08:00
2018-01-13 06:27:38 +08:00
a.badge-category, .dropdown-header {
padding: 3px 12px;
font-size: $font-up-1;
}
2018-01-13 06:27:38 +08:00
}
2013-09-06 03:37:07 +08:00
2018-01-13 06:27:38 +08:00
// Base list
// --------------------------------------------------
2013-09-06 03:37:07 +08:00
2018-01-13 06:27:38 +08:00
.topic-list-icons {
.d-icon-thumb-tack { color: dark-light-choose($primary-medium, $secondary-medium); }
.d-icon-thumb-tack.unpinned { color: dark-light-choose($primary-medium, $secondary-medium); }
a.title {color: $primary;}
.d-icon-bookmark { color: dark-light-choose($primary-medium, $secondary-medium); }
}
2018-01-13 06:27:38 +08:00
.topic-list {
@extend .topic-list-icons;
margin: 0 0 10px;
th,
td {
padding: 12px 5px;
&:first-of-type {
padding-left: 10px;
}
&:last-of-type {
padding-right: 10px;
}
}
th {
button .d-icon {color: dark-light-choose($primary-medium, $secondary-medium); }
}
2018-01-13 06:27:38 +08:00
> tbody > tr {
&.highlighted {
animation: background-fade-highlight 2.5s ease-out;
}
2013-09-06 03:37:07 +08:00
}
2018-01-13 06:27:38 +08:00
button.bulk-select {
padding: 0;
margin-right: 0.3em;
2013-09-06 03:37:07 +08:00
}
2018-01-13 06:27:38 +08:00
.star {
width: 20px;
padding-right: 0;
.d-icon-star {
position: relative;
}
+ .main-link {
padding-left: 5px;
}
2014-08-22 22:45:51 +08:00
}
2018-01-13 06:27:38 +08:00
.badge-notification {
2013-09-06 03:37:07 +08:00
position: relative;
2018-01-13 06:27:38 +08:00
top: -2px;
&.new-topic {
top: -1px;
padding-left: 5px;
}
2013-09-06 03:37:07 +08:00
}
2018-01-13 06:27:38 +08:00
td.category {
line-height: $line-height-small;
2013-09-06 03:37:07 +08:00
}
2018-01-17 22:54:09 +08:00
2018-01-13 06:27:38 +08:00
.posters {
2018-01-17 22:54:09 +08:00
// we know there are up to 5 avatars of fixed size
// will be overridden by media width queries on narrow displays to 1 avatar's width
width: 146px;
2018-01-13 06:27:38 +08:00
> a {
float: left;
margin-right: 4px;
&:last-of-type {
margin-right: 0;
}
2013-09-06 03:37:07 +08:00
}
}
2018-01-17 22:54:09 +08:00
td.posters {
height: 29px; // min-height of td with avatar glow
}
2018-01-13 06:27:38 +08:00
.posters a:first-child .avatar.latest:not(.single) {
box-shadow: 0 0 3px 1px desaturate($tertiary-medium, 35%);
border: 2px solid desaturate($tertiary-medium, 40%);
position: relative;
top: -2px;
left: -2px;
}
2018-01-13 06:27:38 +08:00
.sortable {
cursor: pointer;
&:hover {
background-color: $primary-low;
}
@include unselectable;
}
.likes {
width: 65px;
}
.views {
width: 65px;
}
.posts {
width: 65px;
2013-11-12 08:35:57 +08:00
}
2018-01-13 06:27:38 +08:00
.post-actions {
clear: both;
width: auto;
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
2018-01-13 06:27:38 +08:00
text-align: left;
font-size: $font-down-1;
margin-top: 5px;
.fa {
margin-right: 2px;
}
a {
color: dark-light-choose($primary-medium, $secondary-medium);
margin-right: 3px;
line-height: $line-height-large;
}
}
2018-01-13 06:27:38 +08:00
.activity {
width: 60px;
&:lang(zh_CN) {
width: 80px;
}
span {
cursor: pointer;
}
}
2018-01-13 06:27:38 +08:00
.age {
width: 60px;
}
.with-year {
white-space: nowrap;
}
}
2014-06-20 16:26:59 +08:00
2018-01-13 06:27:38 +08:00
.topic-list tbody tr.has-excerpt .star {
vertical-align: top;
2018-01-13 06:27:38 +08:00
margin-top: 3px;
}
2018-01-13 06:27:38 +08:00
.topic-list.categories {
a.title {
color: $tertiary;
}
2018-01-13 06:27:38 +08:00
th.posts {
position: relative;
}
2018-01-13 06:27:38 +08:00
th.stats {
width: 90px;
2013-11-01 06:02:24 +08:00
}
2018-01-13 06:27:38 +08:00
td.latest {
vertical-align: top;
padding: 0 8px 8px;
}
2018-01-13 06:27:38 +08:00
.last-user-info {
font-size: $font-down-1;
}
2018-01-13 06:27:38 +08:00
.has-description {
td.category {
padding-top: 15px;
}
}
2018-01-13 06:27:38 +08:00
.category{
h3 {
display: inline-block;
font-size: $font-up-2;
i {
margin-right: 5px;
}
a[href] {
color: $primary;
}
}
.subcategories {
margin-top: 10px;
}
.category-description {
margin-top: 10px;
}
.clear-badge {
color: $primary;
}
}
2018-01-13 06:27:38 +08:00
.featured-topic {
margin: 10px 0 0;
/* topic status glyphs */
i {
color: dark-light-choose($primary-medium, $secondary-medium) !important;
font-size: 0.929em;
}
a.last-posted-at, a.last-posted-at:visited {
color: dark-light-choose($primary-medium, $secondary-medium);
font-size: $font-down-1;
}
.badge {
font-size: $font-down-1;
top: -1px;
}
}
}
2018-01-13 06:27:38 +08:00
.topic-list-bottom {
margin: 20px 0;
}
2013-09-06 03:37:07 +08:00
2018-01-13 06:27:38 +08:00
// Misc. stuff
// --------------------------------------------------
2018-01-13 06:27:38 +08:00
#list-area .top-lists h2 {
cursor: pointer;
margin: 5px 0 10px;
2013-12-24 07:50:36 +08:00
}
2018-01-13 06:27:38 +08:00
#list-area {
h2 {
margin: 20px 0 10px;
}
.show-more.has-topics {
top: 0;
.alert {
padding: 12px 35px 12px 14px;
}
}
}
2018-01-13 06:27:38 +08:00
.category-dropdown-menu {
max-height: 350px;
min-width: 134px;
2016-06-07 02:18:15 +08:00
}
2018-01-13 06:27:38 +08:00
#bulk-select {
position: fixed;
right: 20px;
top: 130px;
padding: 5px;
background-color: $secondary;
z-index: z("dropdown");
}
2018-01-13 06:27:38 +08:00
button.dismiss-read {
float: right;
margin-bottom: 5px;
margin-left: 10px;
}
2018-01-13 06:27:38 +08:00
.tags-admin-menu {
.dropdown-menu {
right: 0;
top: 30px;
bottom: auto;
left: auto;
}
}
2018-01-13 06:27:38 +08:00
.category-heading {
clear: both;
p {
line-height: $line-height-large;
font-size: $font-up-3;
}
}
2018-01-13 06:27:38 +08:00
.category-navigation {
clear: both;
}
2018-01-13 06:27:38 +08:00
.category-logo {
max-height: 150px;
float: left;
margin-bottom: 15px;
margin-right: 15px;
}
2018-01-13 06:27:38 +08:00
/* Tablet (portrait) ----------- */
@media all
and (max-width : 850px) {
// slightly smaller font, tighten spacing on nav pills
.nav-pills {
> li > a {
font-size: $font-0;
padding: 7px 10px;
}
}
2018-01-13 06:27:38 +08:00
// new topic just a "+" no text
button#create-topic {
span {
display: none;
}
i {
margin-right: 0;
}
}
2018-01-13 06:27:38 +08:00
.topic-list {
2018-01-13 06:27:38 +08:00
// tighter table header spacing
th:first-of-type {
padding: 12px 5px;
}
2018-01-13 06:27:38 +08:00
// smaller table cell spacing
th, td {
padding: 10px;
font-size: $font-0;
}
.category {
min-width: 0;
padding: 0;
}
// suppress views column
th.views {
display: none;
}
td.views {
display: none;
}
// reduce width for more title space
.posts {
width: 50px;
}
// show only the first poster
td.posters {
width: 50px;
a:not(.latest) {
display: none;
}
a.latest {
padding: 0 8px;
}
}
}
}