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

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

489 lines
8.1 KiB
SCSS
Raw Normal View History

2013-09-06 03:37:07 +08:00
// --------------------------------------------------
// Topic lists
// --------------------------------------------------
// List controls
// --------------------------------------------------
.list-controls {
2018-05-10 05:48:34 +08:00
.container {
display: flex;
flex-wrap: wrap;
align-items: center;
#create-topic {
box-sizing: border-box;
display: flex;
align-self: stretch;
align-items: center;
2013-09-18 04:07:02 +08:00
}
2013-09-06 03:37:07 +08:00
}
2018-05-10 05:48:34 +08:00
.dropdown-select-box-header {
display: flex;
height: 100%;
}
.navigation-container {
display: flex;
flex-wrap: wrap;
width: 100%;
margin: 0;
2018-05-10 05:48:34 +08:00
button {
&.select-kit-header {
display: flex;
height: 100%;
flex: 1 1 auto;
}
}
}
2018-05-10 05:48:34 +08:00
.nav-pills {
display: flex;
flex: 1 1 auto;
margin: 0 3px 5px 3px;
position: relative;
.navigation-toggle {
flex: 0 1 auto;
}
> li {
2018-05-10 05:48:34 +08:00
margin-right: 0;
font-size: $font-down-1;
border: 1px solid var(--primary-medium);
2018-05-10 05:48:34 +08:00
}
> li > a {
2018-05-10 05:48:34 +08:00
line-height: $line-height-large;
display: flex;
align-items: center;
.d-icon {
margin-left: 5px;
2020-02-18 02:00:31 +08:00
margin-right: 0;
2018-05-10 05:48:34 +08:00
}
}
.drop {
border: 1px solid var(--primary-low);
2018-05-10 05:48:34 +08:00
position: absolute;
z-index: z("dropdown") - 1;
background-color: var(--secondary);
2018-05-10 05:48:34 +08:00
padding: 0 10px 10px 10px;
width: 150px;
top: 100%;
margin: 0;
left: 0; // iOS6 alignment
li {
2018-05-10 05:48:34 +08:00
list-style-type: none;
margin-left: 0;
margin-top: 5px;
padding-top: 10px;
a {
width: 100%;
display: inline-block;
}
}
}
}
2013-09-06 03:37:07 +08:00
}
2013-09-18 04:07:02 +08:00
.list-container .full-width {
margin-left: 0;
}
.category-breadcrumb {
width: 100%;
gap: 0.5em;
li {
2021-01-07 05:15:28 +08:00
flex: 1 1 33%;
margin: 0;
details {
width: 100%;
}
.name,
.category-name {
@include ellipsis;
2021-01-07 05:15:28 +08:00
}
}
}
2013-09-06 03:37:07 +08:00
// Base list
// --------------------------------------------------
.topic-list {
2015-10-23 16:19:28 +08:00
.right {
margin-left: 55px;
2015-10-23 16:19:28 +08:00
}
.topic-list-data {
2018-04-21 07:14:48 +08:00
padding: 7px 0;
2016-01-15 04:12:09 +08:00
max-width: 300px;
2013-09-06 03:37:07 +08:00
}
.main-link {
line-height: $line-height-medium;
position: relative;
z-index: z("base") + 1; // Intentionally overlapping category to create bigger tap target
font-size: var(--font-up-1);
a.title {
display: block;
color: var(--primary);
padding: 0;
}
.topic-statuses {
padding: 0 0 0.5em 0;
a {
line-height: 0.8;
color: var(--primary-medium);
}
}
}
.topic-featured-link {
padding: 0;
}
.badge-notification,
.category-topic-link td.num .badge-notification {
2013-09-06 03:37:07 +08:00
position: relative;
2018-07-26 11:58:23 +08:00
display: inline-block;
2013-09-06 03:37:07 +08:00
top: -1px;
2018-07-28 01:10:13 +08:00
font-size: $font-0;
2018-07-26 11:58:23 +08:00
line-height: $line-height-small;
2018-07-28 01:10:13 +08:00
padding: 0.15em 0.4em 0.2em 0.4em;
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 {
color: var(--secondary);
}
&.new-topic::before {
margin-right: 0;
}
&.new-topic {
padding: 0;
}
2013-09-06 03:37:07 +08:00
}
.category-topic-link td.num .badge-notification {
&.unread-posts {
color: var(--secondary);
}
}
.topic-item-stats {
// disabling clicks because these targets are too small on mobile
pointer-events: none;
position: relative;
display: flex;
align-items: baseline;
z-index: z("base");
margin-top: 0.5em;
.category,
.num,
.last-poster {
2013-09-06 03:37:07 +08:00
float: left;
}
2014-12-02 16:19:42 +08:00
.category a {
max-width: 160px;
2014-12-02 16:19:42 +08:00
}
.num .fa,
a,
a:visited {
color: var(--primary-med-or-secondary-med);
}
.activity {
margin-left: auto;
}
.discourse-tags {
display: flex;
flex-wrap: nowrap;
flex: 0 1 auto;
overflow: hidden;
}
2013-09-06 03:37:07 +08:00
}
.age {
white-space: nowrap;
a {
color: var(--primary-600);
font-size: var(--font-down-1);
}
}
2013-09-06 03:37:07 +08:00
}
// Category list
// --------------------------------------------------
.categories-list .category-list {
margin-bottom: 2em;
td {
padding: 12px 5px;
color: var(--primary-med-or-secondary-high);
vertical-align: top;
}
2018-04-21 07:14:48 +08:00
th {
padding: 10px 0 0;
}
td:first-of-type {
padding-left: 10px;
}
tbody {
2020-02-18 02:00:31 +08:00
border-top: none;
.category {
border-left: 6px solid;
}
}
2015-09-12 02:28:18 +08:00
}
.category-list-item.category {
tr:first-of-type {
border: none;
}
2015-09-12 02:28:18 +08:00
// Allow percentage widths on table cells to include their padding
box-sizing: border-box;
*,
*:before,
*:after {
2015-09-12 02:28:18 +08:00
box-sizing: inherit;
}
.posts {
2015-10-20 14:02:32 +08:00
vertical-align: top;
2015-09-12 02:28:18 +08:00
}
.age {
margin-left: 5px;
2015-09-12 02:28:18 +08:00
}
// numbers get dimmer as they get colder
.coldmap {
&-high {
opacity: 0.4;
}
&-med {
opacity: 0.6;
}
&-low {
opacity: 0.8;
}
}
2015-09-12 02:28:18 +08:00
}
2013-09-06 03:37:07 +08:00
.subcategory-list-item.category {
display: block;
width: calc(100% + 20px);
margin: 1.25em 10px 0;
border-bottom: none !important;
border-top: 1px solid var(--primary-low) !important;
&:last-of-type {
margin-top: 0;
margin-bottom: 1.25em;
border-bottom: 1px solid var(--primary-low) !important;
}
td:first-of-type {
padding: 12px 0px;
}
.category-logo.aspect-image {
display: none;
}
.subcategories {
padding-left: 10px;
}
}
tr.category-topic-link {
border-bottom: 1px solid var(--primary-low);
&:last-of-type {
border-bottom: none;
}
}
2014-07-28 22:33:23 +08:00
.category-list-item,
.subcategory-list-item {
padding: 0 0 0 3px;
border-left: 6px solid;
h3,
h4 {
2018-12-05 02:01:27 +08:00
max-width: 100%;
padding: 0 0 0 10px;
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: 5px;
}
a[href] {
color: var(--primary);
}
}
h3 {
font-size: $font-up-2;
}
h4 {
font-size: $font-up-1;
}
.category-name {
max-width: 80vw;
}
.category-topic-link .main-link,
.subcategories-list td,
.category-description td {
padding-left: 10px;
}
.category-topic-link .main-link .age {
2018-01-13 06:27:38 +08:00
font-size: $font-down-1;
}
.category-description td {
padding-top: 0;
padding-bottom: 15px;
}
.subcategories-list {
border-bottom: none;
td {
padding-top: 15px;
}
}
th .badge-category {
2015-01-30 09:09:42 +08:00
margin: 0;
}
2014-07-28 22:33:23 +08:00
2015-10-20 14:02:32 +08:00
.category-topic-link {
.num {
white-space: nowrap;
}
.topic-excerpt {
width: 110%;
}
}
2013-09-06 03:37:07 +08:00
.posters {
float: left;
}
> footer {
border-top: 1px solid var(--primary-low);
padding: 7px 10px;
Fix i18n issues reported on Crowdin (#11747) * Pluralize `groups.errors.adding_too_many_users` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/248/en-ar#53882 * Pluralize `js.composer.error.title_too_short` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41172 * Pluralize `js.composer.error.title_too_long` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41174 * Pluralize `js.composer.error.post_length` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41178 * Pluralize `js.topic.progress.jump_prompt_of` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41958 * Use translations to join strings about posters This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/248/en-ar#49334 It also makes some changes to the crawler view: * Removes `poster.moreCount` which is only available on the client for PMs * CSS class names are actually stored in `poster.extras` instead of `poster.extraClasses` * Stop concatenating category stats This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#40740 * Pluralize `js.summary.description` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#40782 * Pluralize `js.summary.description_time_MF` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#40784 * Use translation to join list of tags This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#43372 * Pluralize `admin_js.admin.groups.manage.membership.automatic_membership_user_count` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#43720 * Pluralize `js.post.controls.delete_topic_confirm_modal` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#54804 * Stop concatenating `js.post.last_edited_on` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#42358 * Stop concatenating `js.post.wiki_last_edited_on` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#42356 It also fixes a regression because `js.post.wiki_last_edited_on` wasn't used anymore since 2017.
2021-02-02 17:50:04 +08:00
.category-stat {
float: left;
Fix i18n issues reported on Crowdin (#11747) * Pluralize `groups.errors.adding_too_many_users` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/248/en-ar#53882 * Pluralize `js.composer.error.title_too_short` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41172 * Pluralize `js.composer.error.title_too_long` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41174 * Pluralize `js.composer.error.post_length` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41178 * Pluralize `js.topic.progress.jump_prompt_of` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41958 * Use translations to join strings about posters This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/248/en-ar#49334 It also makes some changes to the crawler view: * Removes `poster.moreCount` which is only available on the client for PMs * CSS class names are actually stored in `poster.extras` instead of `poster.extraClasses` * Stop concatenating category stats This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#40740 * Pluralize `js.summary.description` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#40782 * Pluralize `js.summary.description_time_MF` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#40784 * Use translation to join list of tags This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#43372 * Pluralize `admin_js.admin.groups.manage.membership.automatic_membership_user_count` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#43720 * Pluralize `js.post.controls.delete_topic_confirm_modal` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#54804 * Stop concatenating `js.post.last_edited_on` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#42358 * Stop concatenating `js.post.wiki_last_edited_on` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#42356 It also fixes a regression because `js.post.wiki_last_edited_on` wasn't used anymore since 2017.
2021-02-02 17:50:04 +08:00
margin: 3px 1em 0 0;
font-weight: normal;
Fix i18n issues reported on Crowdin (#11747) * Pluralize `groups.errors.adding_too_many_users` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/248/en-ar#53882 * Pluralize `js.composer.error.title_too_short` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41172 * Pluralize `js.composer.error.title_too_long` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41174 * Pluralize `js.composer.error.post_length` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41178 * Pluralize `js.topic.progress.jump_prompt_of` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#41958 * Use translations to join strings about posters This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/248/en-ar#49334 It also makes some changes to the crawler view: * Removes `poster.moreCount` which is only available on the client for PMs * CSS class names are actually stored in `poster.extras` instead of `poster.extraClasses` * Stop concatenating category stats This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#40740 * Pluralize `js.summary.description` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#40782 * Pluralize `js.summary.description_time_MF` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#40784 * Use translation to join list of tags This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#43372 * Pluralize `admin_js.admin.groups.manage.membership.automatic_membership_user_count` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#43720 * Pluralize `js.post.controls.delete_topic_confirm_modal` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#54804 * Stop concatenating `js.post.last_edited_on` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#42358 * Stop concatenating `js.post.wiki_last_edited_on` This fixes https://discourse.crowdin.com/translate/f3230e7607a36bb0a2f97fd90605a44e/246/en-ar#42356 It also fixes a regression because `js.post.wiki_last_edited_on` wasn't used anymore since 2017.
2021-02-02 17:50:04 +08:00
font-size: $font-down-1;
.value {
font-weight: bold;
}
}
.btn {
float: right;
margin-left: 7px;
}
2013-09-06 03:37:07 +08:00
}
}
.category-list-item {
padding: 0.5em 0 0.25em;
border-top: 1px solid var(--primary-low) !important;
border-bottom: 1px solid var(--primary-low) !important;
margin: 1em 0 2em;
}
.category-box {
h3 {
margin: 0 0 0.5em 0;
}
}
.category-topics-count a {
color: var(--primary);
}
.topic-list-bottom {
margin: 20px 0 0 0;
2013-09-06 03:37:07 +08:00
}
// Misc. stuff
// --------------------------------------------------
.dropdown {
position: relative;
}
.dropdown-toggle:active,
.open .dropdown-toggle {
outline: 0;
}
2013-09-06 03:37:07 +08:00
.fade.in {
opacity: 1;
}
.category-heading {
p {
font-size: $font-up-1;
margin-bottom: 0.75em;
}
}
.category-logo.aspect-image {
display: block;
margin: 1.5em 0 1em;
img {
max-width: 100%;
}
}
button.dismiss-read {
margin-bottom: 10px;
}
// base defines extra padding for easier click/top of title field
// this is a bit too much for mobile
td .main-link {
2018-07-28 01:10:13 +08:00
width: 78%;
display: inline-block;
a.title {
padding: 5px 10px 5px 0;
2016-01-13 14:40:36 +08:00
word-wrap: break-word;
}
2014-10-20 21:54:36 +08:00
}
.topic-list {
.num.posts-map {
font-size: $font-up-2;
padding: 0;
button {
padding: 0;
}
}
.num.activity a {
padding: 0.5em 0;
}
2015-10-20 14:02:32 +08:00
// so the topic excerpt is full width
// as the containing div is 80%
.topic-excerpt {
display: block;
2015-10-20 14:02:32 +08:00
padding-right: 0;
width: 120%;
}
.topic-excerpt-more {
color: var(--tertiary);
}
}
.category-list.with-topics .category-list-item .category-description {
display: none;
}
.category-list .category.muted a.category-title-link {
color: var(--primary-medium);
font-size: $font-down-1;
}
.muted-categories-link {
margin-left: 0;
}