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

1057 lines
19 KiB
SCSS
Raw Normal View History

.gap {
background-color: lighten($secondary_background_color, 76%);
2014-03-23 05:39:47 +08:00
padding: 5px 0;
color: lighten($primary_text_color, 35%);
cursor: pointer;
text-align: center;
2014-03-23 05:39:47 +08:00
width: 80%;
&:hover {
background-color: lighten($secondary_background_color, 76%);
}
@include medium-width {
2014-04-08 07:02:33 +08:00
width: 795px;
}
@include small-width {
width: 815px;
}
}
.container {
@extend .clearfix;
max-width: $large-width;
margin-right: auto;
margin-left: auto;
2013-02-06 03:16:51 +08:00
}
.full-width {
margin-left: 0;
2013-02-06 03:16:51 +08:00
}
h1 .topic-statuses .topic-status i {
font-size: 20px;
}
.logo-small {
margin-right: 8px;
width: auto;
max-width: 80px;
height: auto;
max-height: 40px;
}
2013-02-06 03:16:51 +08:00
.post-cloak {
padding: 0;
&:first-of-type {
border-top: none;
}
2013-10-17 02:09:48 +08:00
.reply-to-tab {
display: block;
position: absolute;
left: 120px;
z-index: 400;
padding: 5px 12px;
2014-03-13 11:17:18 +08:00
border: 1px solid $primary_border_color;
font-size: 12px;
margin-left: -8px;
background: $primary_background_color;
color: $secondary_text_color;
@include medium-width {
left: 107px;
}
@include small-width {
left: 103px;
}
2013-10-17 02:09:48 +08:00
}
2013-02-06 03:16:51 +08:00
2013-11-02 03:48:28 +08:00
.avoid-tab {
padding-top: 25px;
.topic-meta-data-inside {margin-top: -30px;}
2013-02-06 03:16:51 +08:00
}
.gutter {
.reply-new {
.discourse-no-touch & {
opacity:0;
transition: opacity linear 0.4s;
-webkit-transition: opacity linear 0.4s;
2013-02-06 03:16:51 +08:00
}
.discourse-touch & {opacity: 1;}
}
}
2013-02-06 03:16:51 +08:00
section.post-menu-area, .post-actions {
.discourse-no-touch & {
opacity: 0.2;
transition: opacity linear 0.4s;
-webkit-transition: opacity linear 0.4s;
2013-02-06 03:16:51 +08:00
}
.discourse-touch & {opacity: 1;}
2013-02-06 03:16:51 +08:00
}
&:hover section.post-menu-area, &:hover .post-actions {
opacity: 1;
2013-02-06 03:16:51 +08:00
}
&:hover .gutter {
2013-02-06 03:16:51 +08:00
.reply-new,
.track-link {
opacity:1;
2013-02-06 03:16:51 +08:00
}
}
}
nav.post-controls {
padding: 0;
2014-03-23 05:39:47 +08:00
button {
color: lighten($primary_text_color, 50%);
margin-right: 2px;
2013-02-06 03:16:51 +08:00
}
span.badge-posts {
margin-right: 5px;
2014-03-23 05:39:47 +08:00
transition: all linear 0.15s;
2013-02-06 03:16:51 +08:00
}
.show-replies {
2014-03-23 05:39:47 +08:00
background: lighten($secondary_background_color, 76%);
padding: 8px 15px;
padding-bottom: 20px;
margin-left: 0;
span.badge-posts {color: lighten($primary_text_color, 50%);}
&:hover {
background: lighten($secondary_background_color, 76%);
span.badge-posts {color: $primary_text_color;}
}
i {
margin-left: 5px;
2013-02-06 03:16:51 +08:00
}
}
button.create {
margin-right: 0;
color: $link-color;
background: $emphasis_background_color;
padding: 8px 20px;
margin-left: 10px;
2013-02-06 03:16:51 +08:00
&:hover { color: $tertiary_text_color;
background: $emphasis_text_color;
2013-02-06 03:16:51 +08:00
}
&:active {
background: $emphasis_background_color;
@include box-shadow(inset 0 1px 3px rgba($primary_shadow_color, .3));
}
2013-02-06 03:16:51 +08:00
}
.create i {
margin-right: 5px;
2013-02-06 03:16:51 +08:00
}
button {
font-size: 16px;
padding: 8px 10px;
vertical-align: top;
background: transparent;
border: none;
margin-left: 3px;
2013-10-21 12:45:19 +08:00
transition: all linear 0.15s;
&:hover {
background: lighten($secondary_background_color, 76%);
color: $primary_text_color;
}
&:active {
@include box-shadow(inset 0 1px 3px rgba($primary_shadow_color, .4));
}
&.hidden {
display: none;
}
&.like, &.edit, &.flag, &.delete, &.share, &.bookmark, &.create {
float: right;
}
&.delete:hover {
background: $warning_text_color;
color: $tertiary_text_color;
}
&.like:hover {color: $like_color;
background: $like_background_color;
}
&.bookmark {padding: 8px 11px; }
.read-icon {
&:before {
font-family: "FontAwesome";
content: "\f02e";
}
&.unseen {
&:before {
content: "\f097";
}
}
&.last-read {
color: $warning_text_color;
}
&.bookmarked {
&:before {
color: $link-color;
}
}
}
}
2013-02-06 03:16:51 +08:00
}
.embedded-posts {
background: lighten($secondary_background_color, 76%);
2014-03-23 05:39:47 +08:00
.quote .title, blockquote, .onebox, .onebox-result {
background: lighten($secondary_background_color, 70%);
border-left: 5px solid lighten($secondary_background_color, 60%);
}
2014-03-23 05:39:47 +08:00
&.bottom { margin-top: -11px;}
.topic-meta-data h5 {margin: 5px;}
.topic-meta-data-inside {
margin: -3px 0 0 0;
color: $secondary_text_color;
}
.topic-meta-data {padding-top: 20px;}
}
2013-02-06 03:16:51 +08:00
2014-03-23 05:39:47 +08:00
.bottom-round nav.post-controls .show-replies {
background: lighten($secondary_background_color, 76%);
margin-bottom: 0;
padding-bottom: 8px;
&:hover {background: lighten($secondary_background_color, 76%);
}
}
.post-action {
.relative-date {
margin-left: 5px;
2013-02-06 03:16:51 +08:00
}
.avatar { margin-right: 2px; }
}
2013-09-04 23:53:00 +08:00
a.star {
display: inline-block;
float: left;
2013-02-06 03:16:51 +08:00
}
#main a.star.starred {
text-shadow: none !important;
}
.topic-map {
margin: 20px 0 0 0;
2014-03-13 11:17:18 +08:00
border: 1px solid $primary_border_color;
.buttons .btn {
&:hover {border: 1px solid $primary_border_color !important;}
}
.topic-links li {
word-wrap: break-word;
2013-02-06 03:16:51 +08:00
}
h3 {
margin-bottom: 4px;
color: $primary_text_color;
2013-02-06 03:16:51 +08:00
line-height: 23px;
}
2013-02-06 03:16:51 +08:00
h4 {
2013-03-24 17:07:37 +08:00
margin: 0 0 3px 0;
color: $secondary_text_color;
2013-02-06 03:16:51 +08:00
font-weight: normal;
font-size: 12px;
line-height: 15px;
}
2013-02-06 03:16:51 +08:00
p,
.participants {
margin: 0 0 7px;
}
2013-02-06 03:16:51 +08:00
ul {
margin: 0;
list-style: none;
}
2014-04-06 02:47:25 +08:00
span.domain {
font-size: 10px;
color: $secondary_text_color;
}
2014-04-10 09:19:04 +08:00
2013-02-06 03:16:51 +08:00
.avatars {
> div {
float: left;
position: relative;
margin: 3px 0;
}
.post-count {
position: absolute;
top: 2px;
right: 6px;
padding: 0 4px;
font-weight: normal;
font-size: 11px;
line-height: 14px;
}
2013-02-06 03:16:51 +08:00
}
2013-02-06 03:16:51 +08:00
.avatar {
float: left;
margin-right: 4px;
}
.map {
2013-02-06 03:16:51 +08:00
li {
float: left;
padding: 7px 11px;
2013-02-06 03:16:51 +08:00
&:last-of-type {
border-right: 0;
}
}
a, .number {
2013-02-06 03:16:51 +08:00
line-height: 20px;
}
2014-04-10 09:19:04 +08:00
.number, i {
color: $secondary_text_color;
2013-02-06 03:16:51 +08:00
}
.avatar + a {
float: left;
}
}
.avatars,
.links,
.information {
padding: 7px 14px;
color: $primary_text_color;
2013-02-06 03:16:51 +08:00
}
.information {
border-top: 1px solid $primary_border_color;
2013-02-06 03:16:51 +08:00
}
.participants { // PMs //
.user {float: left; margin: 7px 20px 7px 0;}
}
2013-02-06 03:16:51 +08:00
.topic-links {
2013-10-22 22:41:09 +08:00
li > a {
margin-left: 5px;
}
2013-02-06 03:16:51 +08:00
.badge-notification {
margin: 0 0 4px;
}
}
.buttons {
float: right;
.btn {
border: 0;
border-bottom: 1px solid lighten($secondary_background_color, 76%);
2013-02-06 03:16:51 +08:00
padding: 0 23px;
color: $primary_text_color;
background: lighten($secondary_background_color, 76%);
2013-02-06 03:16:51 +08:00
&:hover {
background: lighten($secondary_background_color, 60%);
color: $primary_text_color;
border: none !important;
border-bottom: 1px solid lighten($secondary_background_color, 60%) !important;
2014-03-23 05:39:47 +08:00
span.badge-posts {color: $primary_text_color;}
2013-02-06 03:16:51 +08:00
}
2013-02-06 03:16:51 +08:00
&.collapsed {
border-bottom: 0;
padding-bottom: 1px;
2013-02-06 03:16:51 +08:00
}
2013-12-10 05:27:49 +08:00
.fa {
2013-02-06 03:16:51 +08:00
margin: 0;
font-size: 18px;
line-height: 52px;
}
}
}
}
#topic-footer-buttons {
padding: 10px 10px 0 0;
p {
line-height: 32px;
color: $secondary_text_color;
}
}
#suggested-topics {
clear: left;
padding: 20px 0 15px 0;
#topic-list > tbody > tr:nth-child(even) {
background-color: lighten($secondary_background_color, 77%);
}
#topic-list > tbody > tr:nth-child(odd) {
background-color: $primary_background_color;
}
table {
box-shadow: none;
border-radius: 0;
border-color: $primary_border_color;
margin-top: 10px;
}
.title {
font-size: 14px; line-height: 8px;
}
}
span.post-count {
background: $secondary_background_color;
color: $tertiary_text_color;
opacity: .8;
}
2014-04-03 03:54:21 +08:00
button.expand-post {
margin-top: 10px;
}
#topic-footer-buttons {
.btn {
margin-bottom: 5px;
margin-right: 10px;
2013-12-10 05:27:49 +08:00
.fa-star {margin-right: 5px;}
}
}
.quote-button {
display: none;
position: absolute;
background-color: lighten($secondary_background_color, 50%);
color: $tertiary_text_color;
padding: 10px;
2013-10-22 14:31:11 +08:00
z-index: 401;
&:hover {
background-color: lighten($secondary_background_color, 50%);
cursor: pointer;
}
}
.quote-button.visible {
display: block;
}
iframe {
max-width: 100%;
}
.extra-info-wrapper {
2013-11-02 03:48:28 +08:00
float: left;
width: 78%;
max-width: 800px;
.topic-statuses {
i { color: $primary_text_color;
}
.unpinned { color: $secondary_text_color;}
}
2014-04-10 09:19:04 +08:00
.topic-link {color: $primary_text_color;}
}
@include medium-width {
.extra-info-wrapper {
2014-04-02 02:09:41 +08:00
max-width: 740px;
}
}
@include small-width {
.extra-info-wrapper {
max-width: 680px;
}
}
.extra-info {
h1 {
margin: 5px 0 0 0;
font-size: 1.8em;
line-height: 1.2em;
}
2013-10-23 15:52:15 +08:00
a.star {
margin-right: 7px;
font-size: 20px;
margin-top: 6px;
}
.topic-statuses {
margin-top: -2px;
}
.badge-category {
vertical-align: top;
margin-top: 4px;
}
}
2013-02-06 03:16:51 +08:00
.topic-meta-data {
margin-bottom: 10px;
width: 92px;
2014-03-13 11:17:18 +08:00
border-top: 1px solid $primary_border_color;
padding-top: 30px;
img {
text-align: center;
width: 45px;
height: 45px;
}
.contents {
text-align: center;
a {
margin: 0 auto;
width: 45px;
word-wrap: break-word;
2014-04-05 10:39:04 +08:00
color: $primary_text_color;
2014-04-07 08:06:55 +08:00
font-weight: normal;
2014-04-05 10:39:04 +08:00
line-height: 1.3;
}
a.user-group {
color: lighten($primary_text_color, 50%);
width: 100%;
}
h3 a {
width: auto;
}
h3.full-name {
font-weight: normal;
font-size: 12px;
margin-top: 2px;
2014-02-27 06:15:57 +08:00
a {color: $secondary_text_color;}
}
}
h3 { display: block; }
}
.open >.dropdown-menu {
display: block;
}
.dropdown-menu li {
margin: 5px 0;
}
.btn-group {
margin-top: 25px;
2013-02-06 03:16:51 +08:00
position: relative;
}
.dropdown-toggle {
float: left;
position: relative;
}
.contents .cooked a {
word-wrap: break-word;
}
.contents .cooked {
margin-right: 50px;
margin-top: 15px;
word-wrap: break-word;
h1, h2, h3, h4, h5, h6 { margin: 30px 0 10px; }
}
a.mention {
padding: 2px 4px;
color: $primary_text_color;
background: lighten($secondary_background_color, 76%);
}
.modal-body {
input[type=text] {
font-size: 16px;
}
}
.deleted {
.topic-body {
background-color: $warning_background_color;
}
}
.post-hidden {
opacity: 0.5;
}
.moderator {
.topic-body {
2014-03-28 17:05:19 +08:00
background-color: $highlight_background_color;
}
}
#share-link {
width: 265px;
margin-left: -4px;
h3 {
margin: 5px 0;
}
input[type=text] {
font-size: 16px;
width: 92%;
margin-bottom: 10px;
}
}
.post-select {
float: right;
margin-right: 20px;
margin-top: -20px;
}
#show-topic-admin {
right: 20px;
padding: 5px 8px;
margin-top: 5px;
}
.topic-admin-menu {
h3 {margin-top: 0;}
}
.deleted-user-avatar {
font-size: 36px;
}
2013-12-20 07:58:48 +08:00
.new-user a {
color: $secondary_text_color;
2013-12-20 07:58:48 +08:00
}
.staff a {
margin: -2px 0 0 0;
background-color: $highlight_background_color;
}
.topic-meta-data {
float: left;
position: relative;
h3 {
font-size: 13px;
margin-top: 5px;
overflow: hidden;
line-height: 1.2em;
}
}
.user-title {
margin-top: 5px;
color: $secondary_text_color;
overflow: hidden;
font-size: 80%;
line-height: 13px;
}
.info-line {
margin: 10px 0;
color: $secondary_text_color;
}
blockquote { /* solo quotes */
margin: 14px 0;
padding: 12px;
2014-03-23 05:39:47 +08:00
a.mention {background: lighten($secondary_background_color, 70%);}
p:first-of-type {margin-top: 0;}
p:last-of-type {margin-bottom: 0;}
}
.quote { /* quotes with attribution */
margin-top: 14px;
blockquote {margin-top: 0; padding-top: 0;
.onebox-result {background-color: $secondary_text_color;}
}
.title {
border-left: 5px solid $primary_border_color;
background-color: lighten($secondary_background_color, 76%);
padding: 12px;
.avatar { margin-right: 7px; }
img {margin-top: -4px;}
}
}
.quote-controls {
float: right;
color: $secondary_text_color;
a {
margin: 0;
}
.back:before,
.quote-other-topic:before {
display: inline-block;
margin-left: 8px;
color: $secondary_text_color;
font-family: "FontAwesome";
position: relative;
z-index: 20;
}
.back:before {
content: "\f062";
}
.quote-other-topic:before {
content: "\f061";
}
}
.gutter {
float: left;
margin-top: 6px;
ul {margin: 0;}
padding-left: 10px;
i {font-size: 12px;}
.post-links {
list-style-type: none;
padding-left: 19px;
position: relative;
margin-left: 5px;
line-height: 18px;
a i {
position: absolute;
left: 0;
margin-right: 15px;
margin-bottom: 20px;
margin-top: 2px;
}
a {color: $secondary_text_color;}
li {margin-bottom: 10px;}
}
}
.topic-body {
2014-03-13 11:17:18 +08:00
border-top: 1px solid $primary_border_color;
float: left;
position: relative;
padding: 10px 0 15px 0;
2014-03-28 17:05:19 +08:00
&.highlighted {
background-color: $emphasis_background_color;
}
img, svg {
max-width: 100%;
}
}
.bottom-round.contents.regular {
2014-03-28 17:05:19 +08:00
-webkit-transition: background-color .25s linear;
transition: background-color .25s linear;
}
2013-10-22 04:54:53 +08:00
.posts-wrapper {
position: relative;
}
//columns
.span14 { width: 70%; padding-left: 1%; } //main content
.span2 {width: 9%; }
2014-04-07 16:29:51 +08:00
.span11 {width: 85%; padding-left: 2%;}
.span5 {width: 19%; padding-left: 1%; }
@media screen and (max-width: 966px) {
.gutter {display: none;}
.span14 { width: 80%; max-width: 720px; } //main content
}
.row:before, .row:after {display: table; content: "";}
.row:after {clear: both;}
.embedded-posts {
h1, h2, h3 {margin: 10px 0;}
2014-03-23 05:39:47 +08:00
a.mention {background: lighten($secondary_background_color, 70%);}
2013-10-23 15:52:15 +08:00
&.bottom {
.topic-meta-data {padding-left: 13px;}
&.hidden {display: block; opacity: 0; }
}
&.bottom .arrow {float: right; margin: 0 0 0 0;}
&.top {
margin-left: 112px;
max-width: 775px;
.topic-meta-data {padding-left: 13px;}
@include medium-width {
margin-left: 99px;
}
@include small-width {
margin-left: 95px;
max-width: 720px;
}
}
&.top.span14 {padding-left: 0;}
.topic-body, .topic-meta-data {border: none;}
.row {border-top: 1px solid $primary_border_color; padding-top: 7px;}
.reply:first-of-type .row {border-top: none;}
}
.dropdown {
position: relative;
}
.caret {
display: inline-block;
width: 0;
height: 0;
vertical-align: middle;
border-top: 4px solid $primary_text_color;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
content: "";
margin-left: 5px;
}
.dropdown-menu {
position: absolute;
bottom: 115%;
left: 0;
z-index: 1000;
display: none;
float: left;
width: 550px;
padding: 4px 0;
margin: 1px 0 0;
list-style: none;
background-color: $primary_background_color;
border: 1px solid $primary_border_color;
box-shadow: 0 1px 5px rgba($primary_shadow_color, .4);
background-clip: padding-box;
span {font-size: 12px;}
.title {font-weight: bold; display: block; font-size: 14px;}
}
.dropdown-menu a {
display: block;
padding: 3px 15px;
clear: both;
font-weight: normal;
line-height: 18px;
color: $primary_text_color;
& > div {
margin-left: 26px;
}
}
.dropdown-menu li > a:hover,
.dropdown-menu .active > a,
.dropdown-menu .active > a:hover {
color: $tertiary_text_color;
text-decoration: none;
background-color: $emphasis_text_color;
}
.dropdown-menu .disabled > a,
.dropdown-menu .disabled > a:hover {
text-decoration: none;
color: $primary_text_color;
background-color: $moderator_background_color;
cursor: default;
}
.dropdown-menu .icon {
margin-top: 3px;
float: left;
font-size: 18px;
}
.open > .dropdown-menu {
display: block;
clear: both;
}
.fade {
opacity: 0;
-webkit-transition: opacity 0.15s linear;
transition: opacity 0.15s linear;
}
.fade.in {
opacity: 1;
}
#selected-posts {
padding-left: 20px;
margin-left: 330px;
width: 200px;
position: fixed;
z-index: 1000;
left: 50%;
background-color: $emphasis_background_color;
border: 1px solid $emphasis_border_color;
padding: 5px;
margin-bottom: 5px;
button {
width: 180px;
margin: 4px auto;
display: inline-block;
text-align: left;
}
&.hidden {
display: none;
}
.controls {
margin-top: 10px;
}
p {
font-size: 13px;
margin: 0 0 10px 0;
}
p.cancel {
margin: 10px 0 0 0;
}
h3 {
font-size: 25px;
color: $primary_text_color;
margin-bottom: 5px;
i {
margin-right: 7px;
}
}
.btn {
border: none;
color: $tertiary_text_color;
font-weight: normal;
margin-bottom: 10px;
background: $btn-primary-background-color;
&[href] {
color: $tertiary_text_color;
}
&:hover
{
color: $tertiary_text_color;
background: darken($btn-primary-background-color, 12%);
}
&:active {
@include linear-gradient(darken($btn-primary-background-color, 18%), darken($btn-primary-background-color, 12%));
@include box-shadow(inset 0 1px 3px rgba($primary_shadow_color, 0.2));
color: $tertiary_text_color;
}
&[disabled] {
text-shadow: 0 1px 0 rgba($primary_shadow_color, 0.2);
@include linear-gradient($btn-primary-background-color, $btn-primary-background-color-dark);
@include box-shadow((inset 0 1px 0 rgba($primary_shadow_color, 0.33), inset 0 -1px 2px rgba($primary_shadow_color, 0.2)));
}
}
}
.topic-post {
&.selected {
article.boxed {
.select-posts {
button.select-post {
background-color: $emphasis_background_color;
color: $tertiary_text_color;
}
}
.topic-body {
.contents:after {
display: none;
}
}
}
}
article.boxed {
position: relative;
2013-11-14 12:19:37 +08:00
line-height: 21px;
.select-posts {
position: absolute;
right: 5px;
z-index: 490;
top: 4px;
button {
background-color: lighten($secondary_background_color, 60%);
border-top: 1px solid $tertiary_border_color;
border-left: 1px solid $tertiary_border_color;
border-bottom: 1px solid $primary_border_color;
border-right: 1px solid $primary_border_color;
color: $secondary_text_color;
}
}
}
}
2013-10-23 15:52:15 +08:00
a.attachment:before {
display: inline-block;
margin-right: 4px;
font-family: "FontAwesome";
content: "\f019";
}
2013-10-30 21:11:05 +08:00
.private_message .gutter, .deleted-topic .gutter,.read_restricted .gutter {
position: relative;
}
2013-10-30 21:11:05 +08:00
.private_message .gutter:before, .deleted-topic .gutter:before, .read_restricted .gutter:before {
display: block;
position: absolute;
top: 0;
left: 10px;
color: lighten($primary_text_color, 76%);
font: 90px/1 FontAwesome;
content: "\f05c";
z-index: -5;
}
2013-10-30 21:11:05 +08:00
.read_restricted .gutter:before {
content: "\f0c0";
}
2013-10-30 21:11:05 +08:00
.private_message .gutter:before {
content: "\f0e0";
}