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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

322 lines
5.5 KiB
SCSS
Raw Normal View History

// --------------------------------------------------
// Topic lists
// --------------------------------------------------
2013-09-06 03:37:07 +08:00
// List controls
// --------------------------------------------------
2013-09-06 03:37:07 +08:00
.list-controls {
.nav {
float: left;
margin-bottom: 10px;
}
2013-10-29 05:37:31 +08:00
.btn {
float: right;
margin-left: 8px;
margin-bottom: 9px;
font-size: $font-up-1;
font-weight: normal;
}
2015-04-02 13:02:07 +08:00
.search .btn {
float: none;
}
a.badge-category {
padding: 3px 12px;
font-size: $font-up-1;
2018-01-13 06:27:38 +08:00
}
}
2013-09-06 03:37:07 +08:00
// Base list
// --------------------------------------------------
2013-09-06 03:37:07 +08:00
.topic-list-icons {
Upgrade to FontAwesome 5 (take two) (#6673) * Add missing icons to set * Revert FA5 revert This reverts commit 42572ff * use new SVG syntax in locales * Noscript page changes (remove login button, center "powered by" footer text) * Cast wider net for SVG icons in settings - include any _icon setting for SVG registry (offers better support for plugin settings) - let themes store multiple pipe-delimited icons in a setting - also replaces broken onebox image icon with SVG reference in cooked post processor * interpolate icons in locales * Fix composer whisper icon alignment * Add support for stacked icons * SECURITY: enforce hostname to match discourse hostname This ensures that the hostname rails uses for various helpers always matches the Discourse hostname * load SVG sprite with pre-initializers * FIX: enable caching on SVG sprites * PERF: use JSONP for SVG sprites so they are served from CDN This avoids needing to deal with CORS for loading of the SVG Note, added the svg- prefix to the filename so we can quickly tell in dev tools what the file is * Add missing SVG sprite JSONP script to CSP * Upgrade to FA 5.5.0 * Add support for all FA4.7 icons - adds complete frontend and backend for renamed FA4.7 icons - improves performance of SvgSprite.bundle and SvgSprite.all_icons * Fix group avatar flair preview - adds an endpoint at /svg-sprites/search/:keyword - adds frontend ajax call that pulls icon in avatar flair preview even when it is not in subset * Remove FA 4.7 font files
2018-11-27 05:49:57 +08:00
.d-icon-thumbtack {
color: dark-light-choose($primary-medium, $secondary-medium);
}
Upgrade to FontAwesome 5 (take two) (#6673) * Add missing icons to set * Revert FA5 revert This reverts commit 42572ff * use new SVG syntax in locales * Noscript page changes (remove login button, center "powered by" footer text) * Cast wider net for SVG icons in settings - include any _icon setting for SVG registry (offers better support for plugin settings) - let themes store multiple pipe-delimited icons in a setting - also replaces broken onebox image icon with SVG reference in cooked post processor * interpolate icons in locales * Fix composer whisper icon alignment * Add support for stacked icons * SECURITY: enforce hostname to match discourse hostname This ensures that the hostname rails uses for various helpers always matches the Discourse hostname * load SVG sprite with pre-initializers * FIX: enable caching on SVG sprites * PERF: use JSONP for SVG sprites so they are served from CDN This avoids needing to deal with CORS for loading of the SVG Note, added the svg- prefix to the filename so we can quickly tell in dev tools what the file is * Add missing SVG sprite JSONP script to CSP * Upgrade to FA 5.5.0 * Add support for all FA4.7 icons - adds complete frontend and backend for renamed FA4.7 icons - improves performance of SvgSprite.bundle and SvgSprite.all_icons * Fix group avatar flair preview - adds an endpoint at /svg-sprites/search/:keyword - adds frontend ajax call that pulls icon in avatar flair preview even when it is not in subset * Remove FA 4.7 font files
2018-11-27 05:49:57 +08:00
.d-icon-thumbtack.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;
2018-01-13 06:27:38 +08:00
margin: 0 0 10px;
th,
td {
padding: 12px 5px;
&:first-of-type {
padding-left: 10px;
2018-01-13 06:27:38 +08:00
}
&:last-of-type {
padding-right: 10px;
2018-01-13 06:27:38 +08:00
}
}
th {
button .d-icon {
color: dark-light-choose($primary-medium, $secondary-medium);
2013-09-06 03:37:07 +08:00
}
}
button.bulk-select {
padding: 0;
}
td.bulk-select {
padding: 10px;
width: 30px;
+ .main-link {
padding-left: 0;
2014-08-22 22:45:51 +08:00
}
}
.badge-notification {
position: relative;
top: -2px;
&.new-topic {
top: -1px;
padding-left: 5px;
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
$td-posters-more-lh: $td-posters-height - 4;
.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;
> a {
float: left;
margin-right: 4px;
&:last-of-type {
margin-right: 0;
2013-09-06 03:37:07 +08:00
}
&.posters-more-count {
cursor: default;
color: dark-light-choose($primary-medium, $secondary-medium);
line-height: $td-posters-more-lh;
font-size: $font-down-1;
}
2013-09-06 03:37:07 +08:00
}
}
td.posters {
height: $td-posters-height;
}
.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;
}
.likes {
width: 65px;
}
.views {
width: 65px;
}
.posts {
width: 65px;
}
.post-actions {
clear: both;
width: auto;
color: dark-light-choose($primary-medium, $secondary-medium);
text-align: left;
font-size: $font-down-1;
margin-top: 5px;
.fa {
margin-right: 2px;
}
a {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
margin-right: 3px;
line-height: $line-height-large;
}
}
.activity {
width: 60px;
&:lang(zh_CN) {
width: 80px;
2018-01-13 06:27:38 +08:00
}
span {
cursor: pointer;
}
}
.age {
width: 60px;
}
.with-year {
white-space: nowrap;
}
}
2014-06-20 16:26:59 +08:00
.topic-list-bottom {
margin: 20px 0;
}
// Misc. stuff
// --------------------------------------------------
#list-area .top-lists h2 {
cursor: pointer;
margin: 5px 0 10px;
}
#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
}
}
}
.bulk-select-container {
@supports (position: sticky) {
@media screen and (min-width: 1250px) {
position: sticky;
position: -webkit-sticky;
}
}
}
#bulk-select {
position: fixed;
right: 20px;
top: 130px;
background-color: $secondary;
z-index: z("dropdown");
@supports (position: sticky) {
@media screen and (min-width: 1250px) {
body:not(.search-page) & {
position: absolute;
right: -60px;
top: 0;
}
}
}
}
button.dismiss-read {
float: right;
margin-bottom: 5px;
margin-left: 10px;
}
.category-heading {
p {
line-height: $line-height-large;
font-size: $font-up-3;
}
}
.category-navigation {
clear: both;
}
2018-01-13 06:27:38 +08:00
.category-logo.aspect-image {
float: left;
2018-08-18 11:07:07 +08:00
margin: 0.25em 1em 0.5em 0;
img {
width: auto;
max-height: 150px;
}
}
@supports (--custom: property) {
.category-logo.aspect-image {
--max-height: 150px;
max-height: var(--max-height);
2018-12-05 02:01:27 +08:00
max-width: 60%;
height: auto;
2018-12-05 02:01:27 +08:00
width: calc(var(--max-height) * var(--aspect-ratio));
img {
width: 100%;
height: inherit;
max-width: initial;
max-height: initial;
}
}
}
2018-01-13 06:27:38 +08:00
/* Tablet (portrait) ----------- */
2018-01-13 06:27:38 +08:00
2018-07-13 04:38:51 +08:00
@include breakpoint(medium) {
// slightly smaller font, tighten spacing on nav pills
.nav-pills {
> li > a {
font-size: $font-0;
padding: 7px 10px;
}
}
// new topic just a "+" no text
button#create-topic {
span {
display: none;
}
Upgrade to FontAwesome 5 (take two) (#6673) * Add missing icons to set * Revert FA5 revert This reverts commit 42572ff * use new SVG syntax in locales * Noscript page changes (remove login button, center "powered by" footer text) * Cast wider net for SVG icons in settings - include any _icon setting for SVG registry (offers better support for plugin settings) - let themes store multiple pipe-delimited icons in a setting - also replaces broken onebox image icon with SVG reference in cooked post processor * interpolate icons in locales * Fix composer whisper icon alignment * Add support for stacked icons * SECURITY: enforce hostname to match discourse hostname This ensures that the hostname rails uses for various helpers always matches the Discourse hostname * load SVG sprite with pre-initializers * FIX: enable caching on SVG sprites * PERF: use JSONP for SVG sprites so they are served from CDN This avoids needing to deal with CORS for loading of the SVG Note, added the svg- prefix to the filename so we can quickly tell in dev tools what the file is * Add missing SVG sprite JSONP script to CSP * Upgrade to FA 5.5.0 * Add support for all FA4.7 icons - adds complete frontend and backend for renamed FA4.7 icons - improves performance of SvgSprite.bundle and SvgSprite.all_icons * Fix group avatar flair preview - adds an endpoint at /svg-sprites/search/:keyword - adds frontend ajax call that pulls icon in avatar flair preview even when it is not in subset * Remove FA 4.7 font files
2018-11-27 05:49:57 +08:00
.d-icon {
margin-right: 0;
}
}
.topic-list {
// tighter table header spacing
2018-01-13 06:27:38 +08:00
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;
}
// suppress views column
th.views {
display: none;
}
td.views {
display: none;
}
// reduce width for more title space
.posts {
width: 50px;
}
.posters {
width: 30px;
text-align: center;
}
// show only the first poster
td.posters {
a:not(.latest) {
2018-01-13 06:27:38 +08:00
display: none;
}
a.latest {
width: 100%;
img {
margin: 0 auto;
2018-01-23 22:45:46 +08:00
}
}
}
}
}