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

544 lines
9 KiB
SCSS
Raw Normal View History

2013-09-05 15:37:07 -04:00
// --------------------------------------------------
// Topic lists
// --------------------------------------------------
// List controls
// --------------------------------------------------
.list-controls {
2013-09-05 15:37:07 -04:00
.nav {
float: left;
margin-bottom: 18px;
2013-09-05 15:37:07 -04:00
}
2013-09-05 15:37:07 -04:00
.btn {
float: right;
margin-left: 8px;
margin-bottom: 10px;
2013-10-28 12:25:52 -04:00
font-size: 16px;
font-weight: normal;
2013-09-05 15:37:07 -04:00
}
2013-10-28 17:37:31 -04:00
a.badge-category {
padding: 3px 12px;
font-size: 16px;
2013-11-11 19:35:57 -05:00
&.category-dropdown-button {
height: 24px;
padding: 3px 9px;
i { height: 20px; }
2013-10-28 17:37:31 -04:00
}
}
2013-10-28 17:37:31 -04:00
.badge-category {
font-weight: normal;
text-transform: capitalize;
}
2013-09-05 15:37:07 -04:00
}
#navigation-bar {
2013-09-05 15:37:07 -04:00
.has-icon span:before {
margin-right: 4px;
font: 15px/0.9 "FontAwesome";
}
2014-01-09 16:22:54 -05:00
.has-icon .starred:before {
2013-09-05 15:37:07 -04:00
content: "\f005";
}
.has-icon .unread:before {
content: "\f02e";
}
}
// Base list
// --------------------------------------------------
#topic-list {
width: 100%;
border-collapse: separate;
border-spacing: 0;
2014-01-13 19:02:14 -05:00
margin: 0 0 10px;
border-top: 1px solid scale-color-diff();
.fa-thumb-tack {color: $primary;}
.fa-thumb-tack.unpinned {color: $primary;}
2014-06-20 04:26:59 -04:00
a.title {color: $primary;}
a.title:visited:not(.badge-notification) {color: scale-color($primary, $lightness: 35%);}
> tbody > tr {
&:nth-child(even) {
background-color: darken($secondary, 3%);
2013-09-05 15:37:07 -04:00
}
&.archived a {
opacity: 0.6;
}
&.has-excerpt .star {
vertical-align: top;
margin-top: 2px;
}
&.category-description {
td {
color: $danger;
2013-09-05 15:37:07 -04:00
}
}
&.highlighted {
background-color: scale-color($tertiary, $lightness: 85%);
2013-09-05 15:37:07 -04:00
}
}
th,
td {
padding: 12px 5px;
2013-09-05 15:37:07 -04:00
line-height: 1.25;
text-align: left;
vertical-align: middle;
&:first-of-type {
padding-left: 10px;
}
&:last-of-type {
padding-right: 10px;
}
}
th {
2014-05-12 01:02:05 -04:00
color: scale-color($primary, $lightness: 50%);
2014-03-12 23:17:18 -04:00
font-weight: normal;
font-size: 14px;
2014-05-12 01:02:05 -04:00
button i.fa {color: scale-color($primary, $lightness: 50%);}
2013-11-11 19:35:57 -05:00
2013-09-05 15:37:07 -04:00
}
td {
color: scale-color($primary, $lightness: 50%);
2013-09-05 15:37:07 -04:00
font-size: 14px;
}
button.bulk-select {
padding: 0;
background: transparent;
&:hover {
color: scale-color-diff();
}
}
2013-09-05 15:37:07 -04:00
.star {
width: 20px;
padding-right: 0;
2013-12-09 16:27:49 -05:00
.fa-star {
2013-09-05 15:37:07 -04:00
position: relative;
}
+ .main-link {
padding-left: 5px;
2013-09-05 15:37:07 -04:00
}
}
.main-link {
width: 495px;
font-size: 16px;
i.score {
color: $success;
2013-09-05 15:37:07 -04:00
cursor: pointer;
}
}
.topic-excerpt {
font-size: 13px;
2013-09-05 15:37:07 -04:00
margin-top: 8px;
color: scale-color($primary, $lightness: 50%);
word-break: break-word;
line-height: 1.4;
2013-09-05 15:37:07 -04:00
}
.topic-statuses:empty {
display: none;
}
.topic-status {
margin-right: 4px;
padding: 0;
font-size: 15px;
2013-09-05 15:37:07 -04:00
&:last-of-type {
margin-right: 0;
}
}
.badge-notification {
position: relative;
top: -2px;
2013-09-05 15:37:07 -04:00
}
.category {
padding: 0 20px 0 20px;
min-width: 80px;
2013-09-05 15:37:07 -04:00
}
.posters {
min-width: 150px;
}
.participants {
min-width: 85px;
}
.posters, .participants {
2013-09-05 15:37:07 -04:00
> a {
float: left;
margin-right: 4px;
&:last-of-type {
margin-right: 0;
}
}
}
.avatar {
&.latest {
@include box-shadow(0 0 6px 1px desaturate(scale-color($tertiary, $lightness: 30%), 35%));
2013-09-05 15:37:07 -04:00
}
}
.num {
text-align: center;
a:not(.badge-posts) {
color: inherit;
}
a.badge-posts {
font-weight: bold;
}
2013-09-05 15:37:07 -04:00
}
2013-11-11 19:35:57 -05:00
.sortable {
cursor: pointer;
&:hover {
background-color: scale-color-diff();
2013-11-11 19:35:57 -05:00
}
@include unselectable;
}
2013-09-05 15:37:07 -04:00
.likes {
2013-11-14 15:50:36 -05:00
width: 65px;
}
.views {
width: 65px;
}
.posts {
width: 65px;
2013-09-05 15:37:07 -04:00
}
.activity {
width: 60px;
2013-09-05 15:37:07 -04:00
}
.age {
width: 60px;
}
.with-year {
white-space: nowrap;
}
2013-09-05 15:37:07 -04:00
}
2014-01-13 19:02:14 -05:00
#list-area .top-lists h2 { margin: 5px 0 10px; }
2013-11-11 19:35:57 -05:00
#topic-list tbody tr.has-excerpt .star {
vertical-align: top;
margin-top: 3px;
2013-10-15 20:31:54 -04:00
}
#topic-list.categories {
2014-06-20 04:26:59 -04:00
a.title {color: $tertiary;}
a.title:visited:not(.badge-notification) {color: scale-color($tertiary, $lightness: 35%);}
th.posts {
2013-10-21 00:24:37 -04:00
position: relative;
}
> tbody > tr:nth-child(odd) {
background-color: darken($secondary, 3%);
}
> tbody > tr:nth-child(even) {
background-color: $secondary;
}
2013-10-21 00:24:37 -04:00
th .toggle-admin {
position: absolute;
padding: 3px 8px;
font-size: 12px;
right: -35px;
2013-10-21 00:24:37 -04:00
top: 4px;
}
th.latest, td.latest {
padding-left: 12px;
}
th.num {
width: 45px;
}
th.stats {
width: 90px;
}
td.latest {
vertical-align: top;
padding: 8px;
}
td.category {
vertical-align: top;
padding-top: 15px;
padding-bottom: 15px;
}
td.stats {
.unit {
font-size: 11px;
}
}
table.categoryStats {
td {
padding: 2px;
vertical-align: bottom;
2014-06-11 19:35:54 -04:00
line-height: 24px;
&.value { text-align: right; font-size: 20px; }
&.unit { text-align: left; }
}
}
.last-user-info {
font-size: 12px;
}
2013-10-31 18:02:24 -04:00
.has-description {
td.category {
padding-top: 15px;
}
}
.category{
position: relative;
width: 45%;
2013-10-31 18:02:24 -04:00
h3 {
display: inline-block;
font-size: 18px;
a[href] {
color: $primary;
}
}
2013-10-31 18:02:24 -04:00
.subcategories {
margin-top: 10px;
}
.featured-users {
2013-12-18 11:50:51 -05:00
float: right;
margin-right: 13px;
}
.category-description {
margin-top: 10px;
}
.clear-badge {
color: $primary;
}
.badge-category.bigger {
padding: 6px 10px;
font-size: 14px;
}
}
.featured-topic {
margin: 6px 0;
a.last-posted-at, a.last-posted-at:visited {
color: scale-color($primary, $lightness: 50%);
}
}
.badge-category {
display: inline-block;
margin-top: 1px;
}
}
2013-09-05 15:37:07 -04:00
// Category list
// --------------------------------------------------
.category-list-item {
margin-bottom: 10px;
#topic-list tbody tr:nth-child(even) {
background-color: darken($secondary, 3%);
2013-09-05 15:37:07 -04:00
}
2013-10-31 18:02:24 -04:00
th .badge-category {
2013-09-05 15:37:07 -04:00
float: left;
margin: 1px 4px 0 0;
}
.posters {
float: left;
display: block;
width: 165px;
2013-09-05 15:37:07 -04:00
}
> footer {
border: 1px solid scale-color-diff();
2013-09-05 15:37:07 -04:00
border-top: 0;
padding: 7px 10px;
background-color: scale-color-diff();
2013-09-05 15:37:07 -04:00
figure {
float: left;
margin: 3px 7px 0 0;
color: scale-color($primary, $lightness: 10%);
2013-09-05 15:37:07 -04:00
font-weight: bold;
font-size: 12px;
}
figcaption {
display: inline;
font-weight: normal;
}
.btn {
float: right;
margin-left: 7px;
}
}
}
// Loading
// --------------------------------------------------
// List
.loading #topic-list {
border: 0;
@include box-shadow(none);
tr {
background-color: transparent;
}
}
// Topics
#topic-list-bottom {
margin: 20px 0;
}
.topics-loading {
width: 200px;
margin: 0 auto;
padding: 10px 0 10px 43px;
color: $secondary;
2013-09-05 15:37:07 -04:00
font-size: 18px;
line-height: 25px;
background: {
2014-05-06 23:53:04 -04:00
color: #000;
2013-09-05 15:37:07 -04:00
image: image-url("spinner_96_w.gif");
repeat: no-repeat;
position: 10px 50%;
size: 25px;
};
@include border-radius-all(12px);
}
// Misc. stuff
// --------------------------------------------------
.list-controls {
.home {
background-color: scale-color-diff();
color: $primary;
}
.badge-category {
padding: 4px 10px;
display: inline-block;
line-height: 24px;
float: left;
2013-09-05 15:37:07 -04:00
}
.category-dropdown-button {
border-left: 1px solid rgba(0,0,0,0.15);
font-size: 16px;
width: 10px;
text-align: center;
&:hover {
opacity: 0.8;
2013-09-05 15:37:07 -04:00
}
}
clear: both;
}
#list-area {
margin-bottom: 300px;
2013-12-23 18:50:36 -05:00
h2 {
margin: 20px 0 10px;
}
.empty-topic-list {
padding: 10px;
2013-09-05 15:37:07 -04:00
}
.unseen {
background-color: transparent;
padding: 0;
border: 0;
color: scale-color($danger, $lightness: 20%);
font-size: 13px;
cursor: default;
2013-09-05 15:37:07 -04:00
}
}
#topic-list {
.alert {
margin-bottom: 0;
font-size: 14px;
}
.spinner {
margin-top: 40px;
2013-09-05 15:37:07 -04:00
}
}
span.posted {
display: inline-block;
text-indent: -9999em;
width: 15px;
height: 15px;
background: {
image: image-url("posted.png");
};
}
2013-10-25 15:44:28 -04:00
ol.category-breadcrumb {
display: block;
float: left;
list-style: none;
margin: 0 10px 0 0;
padding: 0;
2013-10-25 15:44:28 -04:00
li {
float: left;
margin-right: 5px;
2013-09-05 15:37:07 -04:00
}
2013-10-25 15:44:28 -04:00
}
.category-dropdown-menu {
overflow-x: hidden;
overflow-y: auto;
position: absolute;
border: 1px solid scale-color-diff();
background-color: $secondary;
2013-12-02 21:09:16 -05:00
max-height: 350px;
padding: 8px 7px 0 7px;
z-index: 100;
2013-10-28 17:37:31 -04:00
margin-top: 30px;
2013-12-02 21:09:16 -05:00
min-width: 138px;
a.badge-category {
font-size: 13px;
font-weight: bold;
padding: 4px 0;
float: none;
line-height: 19px;
text-transform: none;
width: 100%;
min-width: 102px;
text-align: center;
margin-right: 20px;
margin-bottom: 7px;
2013-09-05 15:37:07 -04:00
}
2013-09-05 15:37:07 -04:00
}
2013-10-25 15:44:28 -04:00
2014-01-29 13:35:24 -05:00
#bulk-select {
position: fixed;
right: 20px;
padding: 5px;
background-color: $secondary;
2014-01-29 13:35:24 -05:00
}
button.dismiss-read {
float: right;
margin-bottom: 5px;
}
.category-notification-menu .dropdown-menu {
right: 0;
top: 30px;
bottom: auto;
left: auto;
}