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.

267 lines
4.7 KiB
SCSS
Raw Normal View History

// --------------------------------------------------
// Topic lists
// --------------------------------------------------
2013-09-05 14:37:07 -05:00
// Base list
// --------------------------------------------------
2013-09-05 14:37:07 -05: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-26 15:49:57 -06:00
.d-icon-thumbtack {
color: var(--primary-med-or-secondary-med);
}
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-26 15:49:57 -06:00
.d-icon-thumbtack.unpinned {
color: var(--primary-med-or-secondary-med);
}
a.title {
color: var(--primary);
}
.d-icon-bookmark {
color: var(--primary-med-or-secondary-med);
2018-01-12 16:27:38 -06:00
}
}
.topic-list {
@extend .topic-list-icons;
2018-01-12 16:27:38 -06:00
margin: 0 0 10px;
.topic-list-data {
padding: 12px 5px;
&:first-of-type {
padding-left: 10px;
2018-01-12 16:27:38 -06:00
}
&:last-of-type {
padding-right: 10px;
2018-01-12 16:27:38 -06:00
}
th & {
border-bottom: 3px solid var(--primary-low);
}
}
button.bulk-select {
padding: 0;
line-height: var(--line-height-large);
}
.topic-list-data.bulk-select {
padding: 0;
width: 30px;
label {
margin: 0px;
padding: 12px 10px 16px 10px;
cursor: pointer;
}
+ .main-link {
padding-left: 0;
2014-08-22 09:45:51 -05:00
}
}
.topics-replies-toggle {
background: none;
border: none;
line-height: var(--line-height-large);
min-height: 30px;
&.active {
background: var(--quaternary);
color: var(--secondary);
}
}
.badge-notification {
position: relative;
top: -2px;
&.new-topic {
top: -1px;
padding-left: 2px;
2013-09-05 14:37:07 -05:00
}
}
2018-01-17 08:54:09 -06:00
$td-posters-height: 29px; // min-height of td with avatar glow
$td-posters-more-lh: $td-posters-height - 4;
.posters {
2018-01-17 08:54:09 -06: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-05 14:37:07 -05:00
}
&.posters-more-count {
cursor: default;
color: var(--primary-med-or-secondary-med);
line-height: $td-posters-more-lh;
font-size: var(--font-down-1);
}
2013-09-05 14:37:07 -05:00
}
}
.topic-list-data.posters {
height: $td-posters-height;
}
.posters a:first-child .avatar.latest:not(.single) {
box-shadow: 0 0 3px 1px rgba(var(--tertiary-rgb), 0.35);
border: 1px solid rgba(var(--tertiary-rgb), 0.5);
position: relative;
left: -2px;
}
.likes {
width: 65px;
}
.views {
width: 65px;
}
.posts {
width: 65px;
}
.post-actions {
clear: both;
width: auto;
color: var(--primary-med-or-secondary-med);
text-align: left;
font-size: var(--font-down-1);
margin-top: 5px;
.fa {
margin-right: 2px;
}
a {
color: var(--primary-med-or-secondary-med);
margin-right: 3px;
line-height: var(--line-height-large);
}
}
.activity {
width: 60px;
&:lang(zh_CN) {
width: 80px;
2018-01-12 16:27:38 -06:00
}
}
.age {
width: 60px;
}
.with-year {
white-space: nowrap;
}
}
2014-06-20 03:26:59 -05:00
.topic-list-bottom {
margin: 20px 0;
.footer-message {
padding-top: 4px;
}
.dismiss-container-bottom {
float: right;
}
}
// Misc. stuff
// --------------------------------------------------
#list-area .top-lists {
h2 {
cursor: pointer;
margin: 5px 0 10px;
}
.period-chooser .select-kit-body {
width: 275px;
}
}
#list-area {
h2 {
margin: 20px 0 10px;
}
}
.bulk-select-topics {
display: inline-flex;
margin-left: -5px;
.btn {
margin-right: 0.5em;
}
}
.dismiss-container-top {
display: flex;
justify-content: flex-end;
}
.category-breadcrumb {
// only target the top-level li, not dropdowns
.select-kit {
align-self: stretch;
height: 100%;
}
}
.category-logo.aspect-image {
float: left;
margin: 0.33em 2em 2em 0;
}
2018-01-12 16:27:38 -06:00
/* Tablet (portrait) ----------- */
2018-01-12 16:27:38 -06:00
// These styles kick in a little earlier when the sidebar appears
@include breakpoint(medium, $sidebar: true) {
.topic-list {
// suppress views column
.views {
display: none;
}
// reduce width for more title space
.posts {
width: 3em;
}
.posters {
width: 2em;
text-align: center;
}
// show only the first poster
.topic-list-data.posters {
2022-03-07 11:08:00 -06:00
a:first-child .avatar.latest:not(.single) {
top: 0px;
left: 0px;
}
a:not(.latest) {
2018-01-12 16:27:38 -06:00
display: none;
}
a.latest {
width: 100%;
img {
margin: 0 auto;
2018-01-23 08:45:46 -06:00
}
}
}
}
}
@include breakpoint(medium) {
.nav-pills {
> li > a {
font-size: var(--font-0);
padding: 0.45em 0.67em;
}
}
.topic-list {
.topic-list-data {
font-size: var(--font-0);
}
}
.topic-list-header {
font-size: var(--font-down-1);
}
}
.container.list-container {
position: relative;
}