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

498 lines
8.1 KiB
SCSS
Raw Normal View History

/* hide the reply border above the time gap notices */
.time-gap + .topic-post article {
border-top: 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 {
clear: both;
color: dark-light-choose($primary-low-mid, $secondary-high);
.d-icon {
opacity: 1.0;
}
button {
border: none;
2018-01-13 06:27:38 +08:00
font-size: $font-up-1;
padding: 8px 10px;
2018-01-13 06:27:38 +08:00
vertical-align: middle;
background: transparent;
float: left;
&.hidden {
display: none;
}
&.admin {
position: relative;
}
&.expand-post {
margin:10px 0 10px 0;
}
2017-11-18 05:57:25 +08:00
&.reply {
float: right;
color: $primary-high;
2017-11-18 05:57:25 +08:00
}
&.has-like {
color: $love;
}
&.bookmarked {
color: $tertiary;
}
2013-09-06 03:37:07 +08:00
}
button.like-count {
2018-01-13 06:27:38 +08:00
font-size: $font-0;
padding: 8px 4px;
}
}
}
2013-09-06 03:37:07 +08:00
2014-07-20 17:12:35 +08:00
2014-07-20 17:50:58 +08:00
/* shift post reply button to the right and make it black */
.post-controls button.create {
float: right;
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-high, $secondary-low);
2014-07-20 17:50:58 +08:00
}
2014-05-13 20:53:11 +08:00
.post-admin-menu {
background-color: $secondary;
width: 205px;
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: 0;
left: 135px;
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 {
width: 176px;
margin-bottom: 5px;
.d-icon {
2014-05-13 20:53:11 +08:00
width: 14px;
margin-right: 14px;
}
}
}
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;
right: 80px;
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
2018-01-13 06:27:38 +08:00
margin: -3px 10px 0 0;
float: right;
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;
background: blend-primary-secondary(5%);
2017-06-12 10:20:14 +08:00
border: 1px solid $primary-low;
2015-05-22 16:28:34 +08:00
border-top: none; // would cause double top border
2015-06-03 17:46:35 +08:00
section {
2017-06-12 10:20:14 +08:00
border-top: 1px solid $primary-low;
2015-06-03 17:46:35 +08:00
}
2013-09-06 03:37:07 +08:00
h3 {
margin-bottom: 4px;
margin-top: 0;
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
2018-01-13 06:27:38 +08:00
line-height: $line-height-large;
2015-05-22 06:30:10 +08:00
font-weight: normal;
2018-01-13 06:27:38 +08:00
font-size: $font-0;
2013-09-06 03:37:07 +08:00
}
2013-09-06 03:37:07 +08:00
h4 {
margin: 0 0 3px 0;
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
2013-09-06 03:37:07 +08:00
font-weight: normal;
2018-01-13 06:27:38 +08:00
font-size: $font-down-1;
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;
}
2013-09-06 03:37:07 +08:00
ul {
margin: 0;
list-style: none;
}
.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;
}
}
a, .number {
2018-01-13 06:27:38 +08:00
line-height: $line-height-large;
2013-09-06 03:37:07 +08:00
}
2015-06-03 17:46:35 +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
}
2014-05-07 06:38:22 +08:00
2013-09-06 03:37:07 +08:00
.avatar + a {
float: left;
}
}
li.avatars {
2014-09-23 18:06:07 +08:00
display: none;
}
2015-06-03 17:46:35 +08:00
.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
}
2013-10-22 22:41:09 +08:00
2018-01-13 06:27:38 +08:00
.information {
p {
margin: 0 0 10px 0;
}
}
2015-06-03 17:46:35 +08:00
.participants { // PMs //
.user {float: left; margin: 0 10px 10px 0;}
2013-09-06 03:37:07 +08:00
}
2014-05-06 15:48:44 +08:00
.domain {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-low-mid, $secondary-high);
2014-05-06 15:48:44 +08:00
}
2013-09-06 03:37:07 +08:00
.topic-links {
.badge-notification {
2014-07-01 15:51:47 +08:00
margin: 1px 5px 2px 0;
2013-09-06 03:37:07 +08:00
}
}
2014-06-26 15:46:16 +08:00
td {
vertical-align: top;
padding:1px;
2014-06-26 15:46:16 +08:00
}
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;
}
2013-09-06 03:37:07 +08:00
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;
2013-09-06 03:37:07 +08:00
opacity: .8;
}
#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 cooked part of post body
// this prevents image overflow on deeply nested blockquotes, lists, etc
.cooked {
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;
}
.open>.dropdown-menu {
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 {
width: 97%;
padding: 0.1em 0.7em;
2015-08-21 04:59:32 +08:00
background-color: srgb-scale($tertiary, $secondary, 15%);
2013-09-06 03:37:07 +08:00
.btn {
margin-bottom: 10px;
color: $secondary;
2015-08-21 04:59:32 +08:00
background: $tertiary;
clear: both;
}
p {
clear: both;
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;
position: absolute;
z-index: z("base") + 1;
left: 200px;
2015-08-21 04:59:32 +08:00
background-color: srgb-scale($tertiary, $secondary, 60%);
color: $secondary;
padding: 5px;
}
2013-09-06 03:37:07 +08:00
.post-select {
float: right;
margin-right: 20px;
2013-09-06 03:37:07 +08:00
margin-top: -20px;
}
2014-05-13 13:50:52 +08:00
2013-09-06 03:37:07 +08:00
.deleted {
.topic-body {
background-color: dark-light-diff(rgba($danger,.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;
}
2013-09-06 03:37:07 +08:00
span.btn-text {display: none;}
blockquote {
2013-09-18 23:05:23 +08:00
clear:both;
/* leave browser defaults for top and bottom here */
margin-left: 0;
margin-right: 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;
2016-03-24 02:44:16 +08:00
.poster-icon {
float: right;
}
}
.post-info {
float: right;
.edits { margin-right: 5px; }
}
}
.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;
padding-top: 2px;
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 {
float: right;
text-decoration: underline;
margin-top: 7px;
}
button {
margin-right: 7px;
}
}
.popup-menu {
h3 {
margin-bottom: 0;
}
}