discourse/app/assets/stylesheets/common/base/topic.scss

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

395 lines
7.9 KiB
SCSS
Raw Normal View History

@keyframes button-jump-up {
0% {
margin-bottom: -60px;
}
50% {
margin-bottom: 10px;
}
65% {
margin-bottom: 0px;
}
77% {
margin-bottom: 5px;
}
100% {
margin-bottom: 0px;
}
}
#main-outlet {
--below-topic-margin: 0.75em;
}
.container.posts {
display: grid;
grid-template-areas: "posts timeline";
grid-template-columns: auto auto;
margin-bottom: var(--below-topic-margin);
> .row {
grid-area: posts;
max-width: calc(
100vw - 20px
); // 20px is the left + right padding on .wrap in common/base/discourse.scss
min-width: 0; // grid needs to be able to shrink
}
.timeline-container {
margin-left: unset !important;
/* This is a temporary override to ease the transition
to the sticky position timeline for themes with custom timeline positioning.
Without this those themes would render topics unreadable. */
}
// timeline
@media screen and (min-width: 925px) {
// at 925px viewport width and above the timeline is visible (see topic-navigation.js)
.topic-navigation {
grid-area: timeline;
align-self: start;
@include sticky;
top: calc(var(--header-offset, 60px) + 2em);
margin-left: 1em;
z-index: z("timeline");
&.with-topic-progress {
align-self: end;
}
&.topic-progress-expanded {
z-index: z("fullscreen");
}
}
.topic-navigation-popup {
box-sizing: border-box;
position: absolute;
top: 0;
overflow-y: auto;
z-index: z("timeline");
padding: 10px 10px 35px 10px;
box-shadow: var(--shadow-dropdown);
background: var(--tertiary-low);
.close {
display: flex;
align-items: center;
position: absolute;
right: 0px;
top: 8px;
color: var(--primary);
opacity: 0.5;
font-size: var(--font-up-1);
}
}
}
// progress bar
@media screen and (max-width: 924px) {
grid-template-areas: "posts";
grid-template-columns: auto;
.topic-navigation {
grid-area: posts;
grid-row: 3;
width: auto;
}
.timeline-container:not(.timeline-fullscreen) {
display: none; // hiding this because sometimes the JS switch lags and causes layout issues
}
.timeline-container .timeline-scroller-content {
position: relative;
}
}
}
.progress-back-container {
z-index: z("dropdown");
margin-right: 0;
animation-duration: 0.5s;
animation-name: button-jump-up;
width: 145px;
text-align: center;
margin-bottom: 0px;
position: absolute;
right: 0;
top: -120%; // above parent container + some extra space
.btn {
margin: 0;
}
}
.topic-status-info,
.topic-timer-info {
border-top: 1px solid var(--primary-low);
margin: 0;
max-width: calc(
var(--topic-body-width) + (var(--topic-body-width-padding) * 2) +
var(--topic-avatar-width)
);
&:empty {
padding: 0;
}
span .d-icon {
font-size: var(--font-down-1);
}
.topic-timer-heading,
.slow-mode-heading {
display: flex;
align-items: center;
margin: 0;
padding: var(--below-topic-margin) 0;
}
.slow-mode-remove,
.topic-timer-modify {
display: flex;
margin-left: auto;
align-self: flex-start;
}
button {
font-size: var(--font-down-2);
background: transparent;
}
}
.title-wrapper {
display: flex;
flex-wrap: wrap;
.topic-statuses {
line-height: 1.2;
.d-icon {
color: var(--primary-medium);
}
}
.header-title .private-message-glyph-wrapper {
float: left;
margin-right: 0.25em;
}
}
2014-10-06 23:50:18 +08:00
#topic-title {
2015-01-15 04:36:38 +08:00
.title-wrapper {
display: flex;
flex-wrap: wrap;
@media screen and (min-width: 925px) {
width: 90%; // topic title isn't full-width on wide screens
}
2015-01-15 04:36:38 +08:00
}
h1 {
margin-bottom: 0;
width: 100%;
}
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
a.edit-topic .d-icon {
font-size: 0.8em;
}
.edit-topic-title {
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
gap: 0.5em;
width: 100%;
max-width: calc(
var(--topic-body-width) + (var(--topic-body-width-padding) * 2) +
var(--topic-avatar-width)
);
.select-kit .category-row {
max-width: unset;
}
}
.edit-title__wrapper {
flex: 1 1 100%;
#edit-title {
width: 100%;
margin: 0;
}
}
.edit-category__wrapper {
flex: 1 1 5%;
@include breakpoint(tablet) {
min-width: 0; // allows category name to shrink to fit narrow screens
}
.select-kit.combo-box.category-chooser {
width: 100%;
}
}
.edit-tags__wrapper {
flex: 1 1 33%;
@include breakpoint(tablet) {
flex: 1 1 100%; // force full row on narrow screens
}
.mini-tag-chooser {
width: 100%;
}
.select-kit-header--filter {
flex-wrap: nowrap; // forces the whole input to wrap if needed, rather than individual tags
min-width: 0;
@include breakpoint(tablet) {
flex-wrap: wrap; // individual tags will need to wrap on narrow screens
}
button {
min-width: 0;
}
}
.multi-select-filter {
flex-shrink: 0;
min-width: 2em; // always provide a minimal space for input
}
}
.edit-controls {
display: flex;
width: 100%;
gap: 0.5em;
}
2014-10-06 23:50:18 +08:00
}
.private-message-glyph {
color: var(--primary-medium);
height: 0.95em;
}
.private_message {
background: var(--d-content-background);
#topic-title {
.edit-topic-title {
position: relative;
min-width: 0;
.private-message-glyph {
position: absolute;
left: 0.75em;
top: 0.7em;
}
#edit-title {
width: calc(100% - 50px);
padding-left: 2.25em;
}
.mini-tag-chooser {
margin-left: 0;
@include breakpoint(mobile-large, min-width) {
.selected-name {
max-width: 500px;
}
}
}
}
}
}
.topic-title-outlet {
clear: both;
}
.has-pending-posts {
display: flex;
justify-content: space-between;
padding: 0.5em;
background-color: var(--highlight-bg);
margin-top: 1em;
max-width: 757px;
}
.post-links-container {
@include unselectable;
clear: both;
.post-links {
margin-top: 1em;
padding-top: 1em;
border-top: 1px solid var(--primary-low);
2018-02-10 01:43:15 +08:00
li:last-of-type {
margin-bottom: 1em;
}
}
.expand-links {
color: var(--primary-med-or-secondary-med);
}
.track-link {
2018-02-10 01:43:15 +08:00
display: flex;
align-items: center;
span:not(.badge) {
@include ellipsis;
2018-02-10 01:43:15 +08:00
}
}
ul {
margin: 0;
list-style: none;
li {
margin-bottom: 0.5em;
a[href] {
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-27 05:49:57 +08:00
.d-icon {
font-size: var(--font-down-2);
2018-02-10 01:43:15 +08:00
margin: 0 0.5em 0 0;
}
}
}
a.reply-new {
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 {
background: var(--secondary);
border-radius: 20px;
transition: all linear 0.15s;
}
&:hover {
color: var(--tertiary);
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 {
background: var(--tertiary-low);
}
}
}
}
a.topic-featured-link {
display: inline-flex;
align-items: center;
text-transform: lowercase;
color: var(--primary-med-or-secondary-med);
font-size: 0.875rem;
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 {
font-size: var(--font-down-1);
margin-right: 0.25em;
}
}
.topic-area {
.pending-posts {
max-width: calc(
var(--topic-body-width) + (var(--topic-body-width-padding) * 2) +
var(--topic-avatar-width)
);
.reviewable-item {
.post-body {
max-height: unset;
}
}
}
}
.published-page-notice {
display: flex;
justify-content: space-between;
padding-bottom: 1em;
max-width: calc(
var(--topic-body-width) + (var(--topic-body-width-padding) * 2) +
var(--topic-avatar-width)
);
align-items: center;
.is-public {
padding: 0.25em 0.5em;
font-size: var(--font-down-2);
background: var(--tertiary);
color: var(--secondary);
border-radius: 3px;
text-transform: lowercase;
}
}
a[data-clicks]::after {
@include click-counter-badge;
}