discourse/app/assets/stylesheets/desktop/topic-post.scss
2014-02-11 00:44:10 -05:00

1017 lines
17 KiB
SCSS

@import "common/foundation/variables";
@import "common/foundation/mixins";
@import "common/foundation/helpers";
.gap {
background-color: $primary_lightest;
padding: 5px 10px;
margin-bottom: 10px;
color: $primary_medium;
cursor: pointer;
text-align: center;
width: 820px;
&:hover {
background-color: $primary_lightest;
}
@include medium-width {
width: 800px;
}
}
.container {
@extend .clearfix;
max-width: $large-width;
margin-right: auto;
margin-left: auto;
}
.full-width {
margin-left: 0px;
}
h1 .topic-statuses .topic-status i {margin-right: 5px;}
.logo-small {margin-right: 8px;}
.post-cloak {
padding: 0;
&:first-of-type {
border-top: none;
}
.reply-to-tab {
display: block;
position: absolute;
left: 120px;
z-index: 400;
padding: 5px 12px;
border: 1px solid lighten($primary_light, 20%);
font-size: 12px;
margin-left: -8px;
background: $secondary;
}
.avoid-tab {
padding-top: 25px;
.topic-meta-data-inside {margin-top: -30px;}
}
.gutter {
.reply-new {
.discourse-no-touch & {
opacity:0;
transition: linear 0.4s;
-webkit-transition: linear 0.4s;
}
.discourse-touch & {opacity: 1;}
}
}
section.post-menu-area, .post-actions {
.discourse-no-touch & {
opacity: 0.2;
transition: linear 0.4s;
-webkit-transition: linear 0.4s;
}
.discourse-touch & {opacity: 1;}
}
&:hover section.post-menu-area, &:hover .post-actions {
opacity: 1;
}
&:hover .gutter {
.reply-new,
.track-link {
opacity:1;
}
}
}
nav.post-controls {
padding: 0;
button {color: $primary_light;
margin-right: 2px;
}
span.badge-posts {
margin-right: 5px;
color: $primary_light;
}
.show-replies {
i {
margin-left: 5px;
}
}
button.show-replies {
padding: 8px 15px;
margin-left: 0px;
}
button.create {
margin-right: 0;
color: $tertiary;
background: $tertiary_lightest;
padding: 8px 20px;
margin-left: 10px;
&:hover { color: $secondary;
background: $tertiary;
}
&:active {
background: $tertiary_lightest;
@include box-shadow(inset 0 1px 3px $primary_light);
}
}
.create i {
margin-right: 5px;
}
button {
font-size: 16px;
padding: 8px 10px;
vertical-align: top;
background: transparent;
border: none;
margin-left: 3px;
transition: all linear 0.15s;
outline: none;
&:hover {
background: lighten($primary_light, 20%);
color: $primary_medium;
}
&:active {
@include box-shadow(inset 0 1px 3px $primary_lightest);
}
&.hidden {
display: none;
}
&.like, &.edit, &.flag, &.delete, &.share, &.bookmark, &.create {
float: right;
}
&.delete:hover {
background: $highlight_danger;
color: $secondary;
}
&.like:hover {color: $heart;
background: $heart_light;
}
&.bookmark {padding: 8px 11px; }
.read-icon {
&:before {
font-family: "FontAwesome";
content: "\f02e";
}
&.unseen {
&:before {
content: "\f097";
}
}
&.last-read {
color: $highlight_danger;
}
&.bookmarked {
&:before {
color: $tertiary;
}
}
}
}
}
.embedded-posts {
background: $primary_lightest;
.quote .title {background: $primary_lighter;}
blockquote {background: $primary_lighter;}
&.bottom { margin-top: -11px;}
.topic-meta-data h5 {margin: 5px;}
.topic-meta-data-inside {
margin: -3px 0 0 0;
color: $primary_light;
}
.topic-meta-data {padding-top: 20px;}
}
.post-action {
.relative-date {
margin-left: 5px;
}
.avatar { margin-right: 2px; }
}
a.star {
display: inline-block;
float: left;
}
#main a.star.starred {
text-shadow: none !important;
}
.topic-map {
margin: 20px 0 0 0;
border: 1px solid lighten($primary_lighter, 10%);
.buttons .btn {border: 1px solid $primary_lightest !important;
&:hover {border: 1px solid $primary_lighter !important;}
}
.topic-links li {
word-wrap: break-word;
}
h3 {
margin-bottom: 4px;
color: $primary;
line-height: 23px;
}
h4 {
margin: 0 0 3px 0;
color: $primary_medium;
font-weight: normal;
font-size: 12px;
line-height: 15px;
}
p,
.participants {
margin: 0 0 7px;
}
ul {
margin: 0;
list-style: none;
}
.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;
}
}
.avatar {
float: left;
margin-right: 4px;
}
.map {
li {
float: left;
padding: 7px 11px;
&:last-of-type {
border-right: 0;
}
}
a, .number {
font-weight: bold;
line-height: 20px;
}
.number {
color: $tertiary_dark;
}
.avatar + a {
float: left;
}
}
.avatars,
.links,
.information {
padding: 7px 14px;
color: $primary;
}
.information {
border-top: 1px solid $primary_light;
}
.participants { // PMs //
.user {float: left; margin: 7px 20px 7px 0;}
}
.topic-links {
li > a {
margin-left: 5px;
}
.badge-notification {
margin: 0 0 4px;
}
}
.buttons {
float: right;
.btn {
border: 0;
border-bottom: 1px solid $primary_lighter;
border-left: 1px solid $primary_lighter;
padding: 0 23px;
color: $primary;
background: $primary_lightest;
&:hover {
background: $primary_lighter;
color: #444;
border-bottom: 1px solid $primary_lighter;
}
&:active {
@include box-shadow(inset 0 1px 3px $primary_lightest);
}
&.collapsed {
border-bottom: 0;
padding-bottom: 1px;
}
.fa {
margin: 0;
font-size: 18px;
line-height: 52px;
}
}
}
}
#topic-footer-buttons {
padding: 10px 10px 0 10px;
p {
line-height: 32px;
color: $primary_light;
}
}
#suggested-topics {
clear: left;
padding: 20px 10px 15px 10px;
.topics table tbody tr {background: $secondary;}
table {
box-shadow: none;
border-radius: 0;
border-color: $primary_lighter;
margin-top: 10px;
}
.title {
font-size: 14px; line-height: 8px;
}
}
span.post-count {
background: $primary;
color: $secondary;
opacity: .8;
}
#topic-footer-buttons {
.btn {
margin-bottom: 5px;
margin-right: 10px;
.fa-star {margin-right: 5px;}
}
}
.quote-button {
display: none;
position: absolute;
background-color: $primary_medium;
color: $secondary;
padding: 10px;
z-index: 401;
&:hover {
background-color: $primary_light;
cursor: pointer;
}
}
.quote-button.visible {
display: block;
}
iframe {
max-width: 100%;
}
.extra-info-wrapper {
float: left;
width: 78%;
.topic-statuses {margin-right: 5px;}
}
.extra-info {
h1 {
margin: 5px 0 0 0;
font-size: 2em;
line-height: 1.2em;
}
a.star {
margin-right: 8px;
font-size: 20px;
margin-top: 8px;
}
.topic-statuses {margin-top: -2px;}
.badge-category {
vertical-align: top;
}
}
.topic-meta-data {
margin-bottom: 10px;
width: 92px;
border-top: 1px solid lighten($primary_lighter, 10%);
padding-top: 30px;
img {
text-align: center;
width: 45px;
height: 45px;
}
.contents {
text-align: center;
a {
display: block;
margin: 0 auto;
width: 45px;
}
a.user-group {
margin: 4px 0 0 0;
padding: 0px;
color: $primary_light;
font-size: 80%;
width: 100%;
line-height: 13px;
}
h3 a {
display: inline;
width: auto;
}
}
h3 { display: block; }
}
.open>.dropdown-menu {
display: block;
}
.dropdown-menu li {
margin: 5px 0;
}
.btn-group {
margin-top: 25px;
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: 20px 0 10px; }
li p {margin: 3px 0;}
}
a.mention {
padding: 2px 4px;
color: $primary;
background: $primary_lightest;
}
.modal-body {
input[type=text] {
font-size: 16px;
}
}
.deleted {
.topic-body {
background-color: $highlight_danger_light;
}
}
.post-hidden {
opacity: 0.5;
}
.moderator {
.topic-body {
background-color: $highlight_light;
}
}
#share-link {
width: 265px;
margin-left: -4px;
h3 {
margin: 5px 0;
}
input[type=text] {
font-size: 16px;
width: 92%;
margin-bottom: 10px;
}
}
#selected-posts {
padding-left: 20px;
.btn {
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: 0px;}
}
.deleted-user-avatar {
font-size: 36px;
}
.new-user a {
color: $primary_medium;
}
.staff a {
padding: 2px;
margin: -2px 0 0 0;
background-color: $highlight_light;
}
.topic-meta-data {
float: left;
position: relative;
h3 {
font-size: 13px;
margin-top: 5px;
overflow: hidden;
line-height: 1.2em;
}
}
.user-title {
margin-top: 8px;
color: $primary_light;
overflow: hidden;
font-size: 80%;
line-height: 13px;
}
.info-line {
margin: 10px 0;
color: $primary_medium;
}
blockquote { /* solo quotes */
margin: 14px 0;
padding: 12px;
a.mention {background: $primary_lighter;}
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: $primary_lighter;}
}
.title {
border-left: 5px solid $primary_lighter;
background-color: $primary_lightest;
padding: 12px;
.avatar { margin-right: 7px; }
img {margin-top: -4px;}
}
}
.quote-controls {
float: right;
color: $primary_light;
a {
margin: 0;
}
.back:before,
.quote-other-topic:before {
display: inline-block;
margin-left: 8px;
color: $primary_light;
font-family: "FontAwesome";
position: relative;
z-index: 20;
}
.back:before {
content: "\f062";
}
.quote-other-topic:before {
content: "\f061";
}
}
.gutter {
float: left;
max-width: 250px;
width: 15%;
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: $primary_light;}
li {margin-bottom: 10px;}
}
}
.topic-body {
border-top: 1px solid lighten($primary_lighter, 10%);
float: left;
position: relative;
width: 720px;
padding: 10px 10px 15px 20px;
.highlighted {
background-color: $highlight_light !important;
}
img, svg {
max-width: 100%;
}
}
.bottom-round.contents.regular {
-webkit-transition: background-color .25s linear;
transition: background-color .25s linear;
}
.posts-wrapper {
position: relative;
}
//columns
.span14 { width: 70%; max-width: 720px; } //main content
.span2 {max-width: 92px;}
.span11 {width: 80%; max-width: 580px;}
.span5 {max-width: 250px;}
@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;}
&.bottom {
&.hidden {display: block; opacity: 0; }
}
&.bottom .arrow {float: right; margin: 0 0 0 0;}
&.top {margin-left: 112px;}
.topic-body, .topic-meta-data {border: none;}
.row {border-top: 1px solid $primary_lighter; padding-top: 7px;}
.reply:first-of-type .row {border-top: none;}
}
.contents.regular {
button.show-replies {
background: $primary_lightest;
padding-bottom: 20px;
&:hover {background: $primary_lighter;
.badge-posts {color: $primary_medium;}
}
}
&.bottom-round button.show-replies {
background: $primary_lightest;
margin-bottom: 0;
padding-bottom: 8px;
&:hover {background: $primary_lighter;
.badge-posts {color: $primary_medium;}
}
}
}
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
outline: 0;
}
.dropdown {
position: relative;
}
.dropdown-toggle {
*margin-bottom: -3px;
}
.dropdown-toggle:active,
.open .dropdown-toggle {
outline: 0;
}
.caret {
display: inline-block;
width: 0;
height: 0;
vertical-align: middle;
border-top: 4px solid $primary;
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: $secondary;
border: 1px solid $primary_light;
box-shadow: 0 1px 5px $primary_lightest;
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;
}
.dropdown-menu li > a:hover,
.dropdown-menu .active > a,
.dropdown-menu .active > a:hover {
color: $secondary;
text-decoration: none;
background-color: $tertiary;
}
.open {
*z-index: 1000;
}
.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 {
margin-left: 330px;
width: 12%;
position: fixed;
z-index: 1000;
left: 50%;
background-color: $tertiary_lightest;
border: 1px solid $tertiary_light;
padding: 5px;
margin-bottom: 5px;
button {
width: 160px;
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;
margin-bottom: 5px;
i {
margin-right: 7px;
}
}
.btn {
border: none;
color: $secondary;
font-weight: normal;
color: $secondary;
background: $btn-primary-background-color;
&[href] {
color: $secondary;
}
&:hover
{
color: $secondary;
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, 0.2));
color: $secondary;
}
&[disabled] {
text-shadow: 0 1px 0 rgba($primary, 0.2);
@include linear-gradient($btn-primary-background-color, $btn-primary-background-color-dark);
@include box-shadow((inset 0 1px 0 rgba($secondary, 0.33), inset 0 -1px 2px rgba($primary, 0.2)));
}
}
}
.topic-post {
&.selected {
article.boxed {
.select-posts {
button.select-post {
background-color: $tertiary;
color: $secondary;
}
}
.topic-body {
.contents {
}
.contents:after {
display: none;
}
}
}
}
article.boxed {
position: relative;
line-height: 21px;
.select-posts {
position: absolute;
right: 5px;
z-index: 490;
top: 4px;
button {
background-color: $primary_lighter;
border-top: 1px solid $secondary;
border-left: 1px solid $secondary;
border-bottom: 1px solid $primary_light;
border-right: 1px solid $primary_light;
color: $primary_light;
}
}
}
}
a.attachment:before {
display: inline-block;
margin-right: 4px;
font-family: "FontAwesome";
content: "\f019";
}
.private_message .gutter, .deleted-topic .gutter,.read_restricted .gutter {
position: relative;
}
.private_message .gutter:before, .deleted-topic .gutter:before, .read_restricted .gutter:before {
display: block;
position: absolute;
top: 0;
left: 10px;
color: $primary_lightest;
font: 90px/1 FontAwesome;
content: "\f05c";
z-index: -5;
}
.read_restricted .gutter:before {
content: "\f0c0";
}
.private_message .gutter:before {
content: "\f0e0";
}