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

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

345 lines
5.7 KiB
SCSS
Raw Normal View History

// IMPORTANT: This stylesheet needs to work for super old browsers, including those
// without support for `var()`. Therefore every color definition needs to define a simple
// value first, as a fallback
body.crawler,
body > noscript {
font-family: serif;
2023-02-16 01:02:16 +08:00
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: serif;
}
&.browser-update {
header {
height: 50px;
margin-bottom: 1em;
}
.buorg {
position: absolute;
top: 50px;
width: 100%;
background: #fdf2ab;
text-align: center;
font-family: sans-serif;
color: #000;
font-size: 14px;
margin-bottom: 10px;
}
#topic-title {
margin-top: 2em;
}
}
&:after,
&:before {
// common way to show fixed background images
display: none;
}
a {
// we want all links to look like links
color: blue !important;
color: var(--tertiary) !important;
text-decoration: underline !important;
}
2016-11-15 04:32:59 +08:00
> header {
// site header
box-sizing: border-box;
2016-11-15 04:32:59 +08:00
width: 100%;
top: 0;
background-color: #fff;
background-color: var(--header_background);
2016-11-15 04:32:59 +08:00
padding: 10px;
box-shadow: none;
border-bottom: 1px solid #eee;
border-bottom: 1px solid var(--header_primary-medium);
2016-11-15 04:32:59 +08:00
}
.header-buttons {
display: none;
}
// topic list
div#main-outlet {
2022-04-02 23:47:01 +08:00
padding: 10px;
div.post {
word-break: break-word;
img {
max-width: 100%;
height: auto;
}
}
2016-11-15 04:32:59 +08:00
}
.topic-list {
table-layout: fixed;
overflow: hidden;
margin: 2em 0;
thead {
border-bottom: 1px solid #ddd;
border-bottom: 1px solid var(--primary_low);
th {
padding: 0 0 0.5em;
}
2023-02-16 01:02:16 +08:00
th:nth-child(2) {
display: none;
}
th:first-of-type {
2023-02-16 01:02:16 +08:00
width: 60%;
padding-left: 0;
}
2023-02-16 01:02:16 +08:00
th:last-of-type,
th.replies,
th.views {
text-align: center;
}
th:last-of-type,
th.replies {
width: 20%;
}
th.posters {
display: none;
}
}
2022-04-02 23:47:01 +08:00
td {
padding: 10px 0;
}
2023-02-16 01:02:16 +08:00
td.posters {
display: none;
}
td:last-of-type,
td.replies,
td.views {
text-align: center;
}
td:first-of-type {
width: 60%;
}
td:last-of-type,
td.replies {
width: 20%;
2022-04-02 23:47:01 +08:00
}
@media (max-width: 850px) {
2022-04-02 23:47:01 +08:00
table-layout: auto;
2023-02-16 01:02:16 +08:00
margin: 0;
td {
2023-02-16 01:02:16 +08:00
word-break: break-word;
&.posters {
a:not(:last-of-type) {
display: none;
}
a:last-of-type {
display: block;
}
}
}
td,
th {
&.views {
display: none;
}
}
.link-top-line {
a.title {
padding: 0;
}
}
.link-bottom-line {
margin-top: 0.25em;
}
}
.topic-list-item {
border-bottom: 1px solid #eee;
border-bottom: 1px solid var(--primary-low);
> * {
padding: 0.75em 0;
}
td.main-link {
padding-right: 1em;
}
2023-02-16 01:02:16 +08:00
p.excerpt {
font-size: var(--font-down-1);
}
}
}
.topic-category {
display: inline;
}
.topic-list-main-link a.title,
.topic-list .main-link a.title,
.latest-topic-list-item .main-link a.title {
padding: 0;
}
.topic-list .link-bottom-line {
margin-top: 0.25em;
2020-04-09 05:29:13 +08:00
}
// topics
div#main-outlet {
div.post {
word-break: break-word;
overflow: auto;
max-width: 100%;
img {
max-width: 100%;
height: auto;
}
}
2023-02-16 01:02:16 +08:00
.topic-body {
float: unset;
}
}
.crawler-post {
margin-top: 1em;
margin-bottom: 2em;
padding-top: 1.5em;
border-top: 1px solid #eee;
border-top: 1px solid var(--primary-low);
}
.crawler-post-meta {
margin-bottom: 1em;
.creator {
word-break: break-all;
a {
font-weight: bold;
}
@include breakpoint(tablet) {
display: inline-block;
margin-bottom: 0.25em;
}
}
}
.crawler-post-infos {
color: #666;
display: inline-block;
@include breakpoint(tablet, min-width) {
float: right;
}
[itemprop="position"] {
float: left;
margin-right: 0.5em;
}
}
.crawler-linkback-list {
margin-top: 1em;
2016-11-15 04:32:59 +08:00
a {
display: block;
padding: 0.5em 0;
border-top: 1px solid #ddd;
border-top: 1px solid var(--primary-low);
}
}
.tag-crawler {
.tag-box {
margin-bottom: 0.5em;
}
}
#topic-title {
> * {
display: block;
}
h1 {
margin-bottom: 0.25em;
2016-11-15 04:32:59 +08:00
}
}
.poll-info {
// crawler vote count always shows 0
display: none;
}
pre,
code,
blockquote,
aside.quote .title {
background: #eee;
background: var(--primary-low);
}
.md-table {
tr {
border: 1px solid #ddd;
border: 1px solid var(--primary-low);
}
th {
font-weight: bold;
}
td,
th {
padding: 0.25em;
border-right: 1px solid #ddd;
border-right: 1px solid var(--primary-low);
}
}
// footer
footer {
margin-top: 2em;
}
.noscript-footer-nav {
margin-top: 4em;
a {
margin-right: 0.25em;
white-space: nowrap;
}
}
#noscript-footer {
padding: 0 10px;
text-align: center;
}
.crawler-nav {
margin: 1em 0;
ul {
margin: 0;
list-style-type: none;
}
li {
display: inline-block;
}
a {
display: inline-block;
padding: 0.5em 1em 0.5em 0;
}
}
}
2023-02-16 01:02:16 +08:00
.buorg div {
padding: 8px;
}
.buorg a,
.buorg a:visited {
color: #e25600;
text-decoration: underline;
}
@media print {
.buorg {
display: none !important;
}
}