discourse/app/assets/stylesheets/common/base/onebox.scss

262 lines
4.8 KiB
SCSS

a.loading-onebox {
background: {
image: image-url("spinner_96.gif");
position: 0;
size: 20px;
height: 25px;
repeat: no-repeat;
};
padding-left: 25px;
}
.onebox-result {
margin-top: 15px;
padding: 12px 25px 12px 12px;
border-left: 5px solid dark-light-diff($primary, $secondary, 90%, -65%);
background: dark-light-diff($primary, $secondary, 97%, -45%);
font-size: 1em;
> .source {
margin-bottom: 12px;
margin-right: 10px;
display: block;
color: $primary;
position: relative;
height: 20px;
.info {
a {
color: black;
text-decoration: none;
padding-right: 10px;
}
position: absolute;
font-size: 1em;
img.favicon {
margin-right: 3px;
}
}
}
.onebox-result-body {
padding-top: 5px;
img {
max-height: 80%;
max-width: 25%;
height: auto;
float: left;
margin-right: 10px;
}
h3, h4 {
margin: 0;
}
code {
max-height: 400px;
}
.metrics {
clear: both;
padding-bottom: 25px;
.metric {
display: inline-block;
padding-left: 33px;
float: left;
}
}
}
}
// RottenTomatoes Onebox
.onebox-result {
.onebox-result-body {
img.verdict {
float: none;
margin-right: 7px;
}
img.popcorn {
float: none;
margin-left: 20px;
margin-right: 5px;
}
}
}
@mixin onebox-favicon($class, $image) {
&.#{$class} .source {
background-image: image-url("favicons/#{$image}.png");
background-repeat: no-repeat;
padding-left: 20px;
}
}
aside.onebox {
padding: 12px 25px 12px 12px;
border-left: 5px solid dark-light-diff($primary, $secondary, 90%, -65%);
background: dark-light-diff($primary, $secondary, 97%, -45%);
font-size: 1em;
header {
a[href] {
color: $primary;
text-decoration: none;
}
}
@include onebox-favicon('stackexchange', 'stackexchange');
@include onebox-favicon('twitterstatus', 'twitter');
@include onebox-favicon('wikipedia', 'wikipedia');
@include onebox-favicon('githubblob', 'github');
@include onebox-favicon('githubcommit', 'github');
@include onebox-favicon('githubpullrequest', 'github');
@include onebox-favicon('githubissue', 'github');
@include onebox-favicon('githubgist', 'github');
@include onebox-favicon('amazon', 'amazon');
.onebox-body {
clear: both;
h3, h4 {
font-size: 1.17em;
margin: 10px 0;
}
a[href] {
color: scale-color($tertiary, $lightness: -20%);
text-decoration: none;
}
a[href]:visited {
color: scale-color($tertiary, $lightness: -20%);
}
img {
max-height: 80%;
max-width: 20%;
height: auto;
float: left;
margin-right: 10px;
}
}
}
aside.onebox .onebox-body .onebox-avatar {
max-height: none;
max-width: none;
height: 90px;
width: 90px;
}
blockquote {
aside.onebox {
background: dark-light-diff($primary, $secondary, 97%, -45%);
border-left: 5px solid dark-light-diff($primary, $secondary, 90%, -65%);
}
}
// -- Onebox Github Code Blob --
pre.onebox code ol.lines li:before {
position: absolute;
display:inline-block;
width:35px;
left: -40px;
background: #F7F7F7;
color:#AFAFAF;
text-align:right;
padding-right:5px;
font-size:12px;
line-height: 1.9em;
content: counter(li-counter);
counter-increment: li-counter;
}
pre.onebox code ol{
margin-left:0px;
line-height:1.5em;
}
pre.onebox code li{
background-color:#fff;
padding-left:5px;
}
pre.onebox code ol.lines{
position:relative;
margin-left: 40px;
}
pre.onebox code ol.lines li {
list-style-type: none;
padding-left: 5px;
margin-left: 0px;
border-left: 1px solid #CFCFCF;
min-height: 1.5em; //show empty li lines
white-space: pre;
}
pre.onebox code li.selected{
background-color:#F8EEC7
}
pre.onebox code {
white-space: normal;
}
//Onebox - Github - Pull request
.onebox-body .github-commit-status {
background: #F5F5F5;
border-radius: 5px;
margin:0px 0px 5px 100px;
padding: 10px;
}
.onebox-body .status_tag {
display:inline-block;
color:#fff;
padding:1px 4px;
border-radius:3px;
font-weight:bold;
margin-bottom:5px;
text-transform:capitalize;
}
.onebox-body .build_status
{
padding: 2px;
font-size:12px;
}
.onebox-body .status_tag.open {
background-color:#6cc644;
}
.onebox-body .status_tag.merged{
background-color:#6e5494;
}
.onebox-body .status_tag.closed {
background-color:#bd2c00;
}
.onebox-body .github-content-right{
margin-left:100px;
}
//Onebox - Twitter - Status
aside.onebox.twitterstatus .onebox-body {
h4 {
margin-bottom: 0;
}
}
.onebox.twitterstatus {
.thumbnail {
float: left;
}
p {
float: left;
white-space: pre-wrap;
margin-top: 5px;
width: 100%;
}
.date {
clear: left;
}
}