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

487 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;
align-items: baseline;
max-width: unset;
margin-right: 0;
padding: 8px 9px 8px 8px;
i {
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 {
color: $primary-high;
margin-left: auto;
2017-11-18 05:57:25 +08:00
}
&.has-like {
color: $love;
}
&.bookmarked {
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;
2013-09-06 03:37:07 +08:00
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,
i {
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 {
float: left;
margin-right: 1em;
width: 160px;
margin-bottom: 0.5em;
}
2013-09-06 03:37:07 +08:00
}
2014-05-06 15:48:44 +08:00
#topic-footer-buttons p {
clear: both;
/* 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;
}
2013-09-06 03:37:07 +08:00
#suggested-topics {
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: 5px;
2013-09-06 03:37:07 +08:00
margin-right: 10px;
}
}
#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: inherit;
}
// 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%;
}
.extra-info {
display: none;
}
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;
}
#share-link {
2014-06-24 15:55:43 +08:00
width: 290px;
left: auto;
right: 4px;
2013-09-06 03:37:07 +08:00
}
.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;
}
.gutter {
display: none;
}
.posts-wrapper {
position: relative;
}
2014-03-31 23:29:32 +08:00
span.highlighted {
2017-10-11 04:07:46 +08:00
background-color: dark-light-choose($highlight-low, $highlight);
}
.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 {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-low-mid, $secondary-high);
}
.user-title {
color: #aaa;
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;
}
}