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

482 lines
7.7 KiB
SCSS
Raw Normal View History

/* hide the reply border above the time gap notices */
2018-06-19 02:10:48 +08:00
.time-gap + .topic-post article {
border-top: none;
}
.time-gap {
.topic-avatar {
display: none;
}
}
2016-03-29 02:39:55 +08:00
.topic-post article {
2017-06-12 10:20:14 +08:00
border-top: 1px solid $primary-low;
2018-01-13 06:27:38 +08:00
padding: 15px 0 8px 0;
2016-03-29 02:39:55 +08:00
}
.post-stream {
padding-bottom: 30px;
}
2013-09-06 03:37:07 +08:00
span.badge-posts {
margin-right: 5px;
}
.show-replies {
2013-09-06 03:37:07 +08:00
display: none;
}
.topic-post {
nav.post-controls {
color: dark-light-choose($primary-low-mid, $secondary-high);
.actions {
display: flex;
}
.like-button {
display: flex;
flex: 0 1 auto;
button {
&.like {
flex: 1 1 auto;
}
&.like-count {
padding: 8px 4px 8px 8px;
line-height: 1.2;
&.regular-likes {
margin-right: 0;
}
&.my-likes {
display: flex;
max-width: unset;
margin-right: 0;
padding: 8px 9px 8px 8px;
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 {
padding-left: 8px;
}
}
}
.d-icon {
line-height: $line-height-medium;
}
}
2018-06-19 02:10:48 +08:00
button.like-count + button.toggle-like {
padding: 8px 9px 8px 4px;
}
}
.d-icon {
opacity: 1;
}
button {
border: none;
2018-01-13 06:27:38 +08:00
font-size: $font-up-1;
padding: 10px 8px;
background: transparent;
flex: 1 1 auto;
max-width: 45px;
&.hidden {
display: none;
}
&.admin {
position: relative;
}
&.expand-post {
margin: 10px 0 10px 0;
}
2017-11-18 05:57:25 +08:00
&.reply {
2019-02-01 04:13:22 +08:00
.d-icon {
color: $primary-high;
}
margin-left: auto;
2017-11-18 05:57:25 +08:00
}
&.has-like {
2019-02-01 04:13:22 +08:00
.d-icon {
color: $love;
}
2017-11-18 05:57:25 +08:00
}
&.bookmarked {
2019-02-01 04:13:22 +08:00
.d-icon {
color: $tertiary;
}
}
2013-09-06 03:37:07 +08:00
}
}
}
2013-09-06 03:37:07 +08:00
2014-05-13 20:53:11 +08:00
.post-admin-menu {
display: inline-flex;
flex-direction: column;
box-sizing: border-box;
2014-05-13 20:53:11 +08:00
background-color: $secondary;
width: auto;
max-width: 320px;
2014-05-13 20:53:11 +08:00
padding: 10px;
2017-06-12 10:20:14 +08:00
border: 1px solid $primary-low;
2014-05-13 20:53:11 +08:00
position: absolute;
text-align: left;
bottom: -50px;
left: 135px;
@media screen and (max-width: 374px) {
left: 50px;
}
z-index: z("dropdown");
2014-05-13 20:53:11 +08:00
h3 {
margin-top: 0;
2014-05-13 20:53:11 +08:00
color: $primary;
2018-01-13 06:27:38 +08:00
font-size: $font-0;
2014-05-13 20:53:11 +08:00
}
ul {
list-style: none;
margin: 10px 0 0 0;
}
li {
margin-bottom: 5px;
.d-icon {
2014-05-13 20:53:11 +08:00
width: 14px;
margin-right: 10px;
2014-05-13 20:53:11 +08:00
}
}
}
2013-09-06 03:37:07 +08:00
.embedded-posts {
.topic-meta-data h5 a {
margin-left: 10px;
}
}
.post-actions {
/* overriding display: here was causing hidden element to take up space */
}
.post-action {
float: right;
margin-right: 10px;
clear: right;
}
.post-action .relative-date {
margin-left: 5px;
2013-09-06 03:37:07 +08:00
}
a.reply-to-tab {
z-index: z("base") + 1;
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
margin-right: 0.5em;
2013-09-06 03:37:07 +08:00
}
.topic-post .boxed .contents {
2014-06-13 14:14:58 +08:00
clear: both;
}
.topic-map {
margin: 10px 0;
h4 {
2018-01-13 06:27:38 +08:00
line-height: $line-height-medium;
2013-09-06 03:37:07 +08:00
}
2014-07-13 13:17:54 +08:00
.user {
float: left;
margin-right: 10px;
}
.map-collapsed {
.secondary {
display: none;
2013-09-06 03:37:07 +08:00
}
}
.map {
2013-09-06 03:37:07 +08:00
li {
float: left;
2014-09-23 18:06:07 +08:00
padding: 7px 8px;
2013-09-06 03:37:07 +08:00
&:last-of-type {
border-right: 0;
}
}
2018-04-23 22:45:18 +08:00
.number {
line-height: $line-height-medium;
2013-09-06 03:37:07 +08:00
}
.number,
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 {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-high, $secondary-low);
2018-01-13 06:27:38 +08:00
font-size: $font-up-1;
2015-06-03 17:46:35 +08:00
}
2018-06-19 02:10:48 +08:00
.avatar + a {
2013-09-06 03:37:07 +08:00
float: left;
}
}
li.avatars {
2014-09-23 18:06:07 +08:00
display: none;
}
.links,
.information,
.avatars {
2018-01-13 06:27:38 +08:00
padding: 10px;
color: $primary;
2014-05-06 15:24:04 +08:00
overflow: auto;
2013-09-06 03:37:07 +08:00
}
2018-01-13 06:27:38 +08:00
.information {
p {
margin: 0 0 10px 0;
}
}
2013-09-06 03:37:07 +08:00
.buttons {
.btn {
border: 0;
2014-09-23 18:06:07 +08:00
padding: 0 15px;
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-high);
background: blend-primary-secondary(5%);
2017-06-12 10:20:14 +08:00
border-left: 1px solid $primary-low;
2013-12-10 05:27:49 +08:00
.fa {
2013-09-06 03:37:07 +08:00
margin: 0;
2018-01-13 06:27:38 +08:00
font-size: $font-up-2;
2013-09-06 03:37:07 +08:00
line-height: 52px;
}
}
}
.link-summary .btn {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-high);
background: blend-primary-secondary(5%);
width: 100%;
}
2013-09-06 03:37:07 +08:00
}
#topic-footer-buttons {
@include clearfix;
padding: 20px 0 0 0;
.d-icon-bookmark.bookmarked {
color: $tertiary;
}
.combobox {
margin-right: 0.5em;
width: 160px;
margin-bottom: 0.5em;
}
2013-09-06 03:37:07 +08:00
}
#topic-footer-buttons .reason {
/* this is to force the drop-down notification state description para below the button */
2014-05-06 16:14:56 +08:00
margin: 0;
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
2014-05-06 15:48:44 +08:00
}
#topic-footer-button {
width: 100px;
margin: 0 auto;
}
.suggested-topics {
2013-09-06 03:37:07 +08:00
clear: left;
padding: 20px 0 15px 0;
th.views,
td.views,
td.activity,
th.activity,
th.likes,
td.likes {
2013-09-06 03:37:07 +08:00
display: none;
}
a.badge-category,
a.badge-category-parent {
2018-01-13 06:27:38 +08:00
font-size: $font-down-1;
vertical-align: top;
}
2013-09-06 03:37:07 +08:00
}
span.post-count {
background: $primary;
color: $secondary;
opacity: 0.8;
2013-09-06 03:37:07 +08:00
}
#topic-footer-buttons {
.btn {
margin-bottom: 0.5em;
margin-right: 0.5em;
2013-09-06 03:37:07 +08:00
}
}
#topic-title {
z-index: z("base") + 1;
2013-09-06 03:37:07 +08:00
margin: 0 0 0 0 !important;
padding: 15px 0;
2013-09-06 03:37:07 +08:00
}
// mobile has no fixed width on topic-body so overflow: hidden causes problems
.topic-body {
overflow: visible;
.cooked {
overflow: visible;
}
}
// instead, for mobile we set overflow hidden on the post's #main-outlet
// this prevents image overflow on deeply nested blockquotes, lists, etc
[class*="archetype-"] #main-outlet {
overflow: hidden;
}
2013-09-06 03:37:07 +08:00
.quote-button.visible {
display: block;
z-index: z("tooltip");
2013-09-06 03:37:07 +08:00
}
iframe {
max-width: 100%;
}
2018-06-19 02:10:48 +08:00
.open > .dropdown-menu {
2013-09-06 03:37:07 +08:00
display: block;
}
.dropdown-menu li {
margin: 5px 0;
.fa {
float: left;
margin-right: 5px;
padding-top: 1px;
}
span {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
}
span.title {
color: $primary;
}
2013-09-06 03:37:07 +08:00
}
.btn-group {
margin-top: 25px;
2013-09-06 03:37:07 +08:00
position: relative;
}
.dropdown-toggle {
float: left;
2013-09-06 03:37:07 +08:00
position: relative;
}
.selected-posts {
padding: 0.1em 0.7em;
2013-09-06 03:37:07 +08:00
}
// hide the full set of selection buttons on mobile
.select-posts button {
display: none;
}
// unhide the simple "select just this post" button
button.select-post {
display: inline-block;
2013-09-06 03:37:07 +08:00
}
.deleted {
.topic-body {
2018-06-19 02:10:48 +08:00
background-color: dark-light-diff(
rgba($danger, 0.7),
$secondary,
50%,
-60%
);
}
2013-09-06 03:37:07 +08:00
}
.deleted-user-avatar {
2018-01-13 06:27:38 +08:00
font-size: $font-up-5;
}
span.btn-text {
display: none;
}
2013-09-06 03:37:07 +08:00
blockquote {
clear: both;
/* leave browser defaults for top and bottom here */
margin-left: 0;
margin-right: 0;
}
.gap {
padding: 0.25em 0;
}
.posts-wrapper {
position: relative;
}
2014-03-31 23:29:32 +08:00
span.highlighted {
background-color: $highlight-low;
}
.topic-avatar {
float: left;
2018-01-13 06:27:38 +08:00
margin-right: 10px;
z-index: z("base") + 1;
/* must render on top of topic-body + topic-meta-data, otherwise not tappable */
}
.topic-meta-data {
margin-left: 50px;
2018-01-13 06:27:38 +08:00
font-size: $font-down-1;
.names {
2018-01-13 06:27:38 +08:00
line-height: $line-height-medium;
display: flex;
flex-wrap: wrap;
.full-name {
font-weight: bold;
}
.first {
order: 1;
}
.poster-icon {
order: 2;
}
.second {
order: 3;
flex-basis: 100%;
}
.user-title {
order: 4;
flex-basis: 100%;
}
span {
margin-right: 4px;
}
}
}
.username.new-user a {
color: $primary-low-mid;
}
.user-title {
color: $primary-medium;
overflow: hidden;
margin-right: 50px;
2014-03-31 23:29:32 +08:00
}
.read-state {
display: none;
}
2015-09-02 07:49:45 +08:00
.signup-cta {
margin-left: auto;
margin-right: auto;
width: calc(100% - 50px);
a {
margin-top: 7px;
}
button {
margin-right: 7px;
}
}
.popup-menu {
h3 {
margin-bottom: 0;
}
}
.post-notice {
margin-bottom: 1em;
}