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

329 lines
5.9 KiB
SCSS
Raw Normal View History

2013-09-05 15:37:07 -04:00
a.loading-onebox {
background: {
image: image-url("spinner_96.gif");
position: 0;
size: 20px;
height: 25px;
repeat: no-repeat;
};
padding-left: 25px;
}
2013-09-05 15:37:07 -04:00
.onebox-result {
@include post-aside;
2014-01-27 17:58:53 -05:00
margin-top: 15px;
2013-12-19 18:32:39 -05:00
padding: 12px 25px 12px 12px;
font-size: 1em;
2013-09-05 15:37:07 -04:00
> .source {
margin-bottom: 12px;
2013-09-05 15:37:07 -04:00
margin-right: 10px;
display: block;
color: $primary;
2013-09-05 15:37:07 -04:00
position: relative;
height: 20px;
2013-09-05 15:37:07 -04:00
.info {
a {
color: black;
text-decoration: none;
padding-right: 10px;
2013-09-05 15:37:07 -04:00
}
position: absolute;
font-size: 1em;
2013-09-05 15:37:07 -04:00
img.favicon {
margin-right: 3px;
}
}
}
2014-02-26 17:15:57 -05:00
2013-09-05 15:37:07 -04:00
.onebox-result-body {
padding-top: 5px;
img {
2013-12-19 18:32:39 -05:00
max-height: 80%;
max-width: 25%;
height: auto;
2013-12-19 18:32:39 -05:00
float: left;
margin-right: 10px;
2013-09-05 15:37:07 -04:00
}
h3, h4 {
2015-07-21 13:21:26 -04:00
margin: 0;
2013-09-05 15:37:07 -04:00
}
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 {
2013-12-19 18:32:39 -05:00
img.verdict {
float: none;
2013-09-05 15:37:07 -04:00
margin-right: 7px;
}
img.popcorn {
float: none;
margin-left: 20px;
margin-right: 5px;
}
}
}
2014-01-27 17:58:53 -05:00
@mixin onebox-favicon($class, $image) {
&.#{$class} .source {
background: image-url("favicons/#{$image}.png") no-repeat;
2014-01-27 17:58:53 -05:00
padding-left: 20px;
}
}
aside.onebox {
@include post-aside;
2014-01-27 17:58:53 -05:00
padding: 12px 25px 12px 12px;
font-size: 1em;
2014-01-27 17:58:53 -05:00
header {
a[href] {
color: $primary;
2014-01-27 17:58:53 -05:00
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');
2014-02-21 16:10:20 -05:00
@include onebox-favicon('amazon', 'amazon');
2014-01-27 17:58:53 -05:00
.onebox-body {
clear: both;
h3, h4 {
2014-01-27 17:58:53 -05:00
font-size: 1.17em;
2015-07-21 13:21:26 -04:00
margin: 10px 0;
2014-01-27 17:58:53 -05:00
}
a[href] {
2015-08-20 19:33:44 -04:00
color: dark-light-choose(scale-color($tertiary, $lightness: -20%), $tertiary);
2014-01-27 17:58:53 -05:00
text-decoration: none;
}
a[href]:visited {
2015-08-20 19:33:44 -04:00
color: dark-light-choose(scale-color($tertiary, $lightness: -20%), $tertiary);
2014-01-27 17:58:53 -05:00
}
img {
max-height: 80%;
max-width: 20%;
2014-01-27 17:58:53 -05:00
height: auto;
float: left;
margin-right: 10px;
}
}
}
@mixin gdocs-logo($type) {
&.g-#{$type}-logo {
background: image-url("favicons/google_branding/logo_#{$type}_128px.png") no-repeat;
}
}
.gdocs-onebox-splash {
background-color: blend-primary-secondary(30%);
color: $primary;
border: 1px inset $primary;
.gdocs-onebox-logo {
display: inline-block;
width: 128px;
height: 128px;
@include gdocs-logo('docs');
@include gdocs-logo('forms');
@include gdocs-logo('sheets');
@include gdocs-logo('slides');
@include gdocs-logo('calendar');
@include gdocs-logo('drive');
}
}
2015-04-23 23:42:27 -04:00
aside.onebox .onebox-body .onebox-avatar {
max-height: none;
max-width: none;
height: 90px;
width: 90px;
2014-03-25 00:52:40 -04:00
}
blockquote {
aside.onebox {
@include post-aside;
}
}
// -- Onebox Github Code Blob --
pre.onebox code ol.lines li:before {
position: absolute;
display:inline-block;
width:35px;
left: -40px;
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;
2014-10-11 08:32:40 -04:00
line-height:1.5em;
}
2015-08-18 18:02:41 -04:00
pre.onebox code {
background-color: dark-light-choose(#fff, #000);
}
pre.onebox code li{
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{
2015-08-18 18:02:41 -04:00
background-color: dark-light-choose(#F8EEC7, #541);
}
pre.onebox code {
white-space: normal;
}
2014-09-29 00:33:20 -04:00
//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;
2014-09-29 00:33:20 -04:00
}
.onebox-body .status_tag.closed {
background-color:#bd2c00;
}
.onebox-body .github-content-right{
margin-left:100px;
}
2015-07-10 16:22:16 -04:00
2015-07-21 13:21:26 -04:00
//Onebox - Twitter - Status
aside.onebox.twitterstatus .onebox-body {
h4 {
margin-bottom: 0;
}
}
.onebox.twitterstatus {
.thumbnail {
float: left;
}
p, .tweet {
2015-07-21 13:21:26 -04:00
float: left;
2015-09-21 07:31:41 -04:00
display: inline-block;
2015-07-21 13:21:26 -04:00
white-space: pre-wrap;
2015-09-21 07:31:41 -04:00
padding-top: 3px;
width: 85%;
2015-07-21 13:21:26 -04:00
}
.date {
clear: left;
2015-09-21 07:31:41 -04:00
padding-top: 5px;
2015-07-21 13:21:26 -04:00
}
2015-07-10 16:22:16 -04:00
}
// Onebox - Imgur - Album
.onebox.imgur-album {
.outer-box {
position: absolute;
z-index: 935;
height: 30px;
overflow: hidden;
font-size: 12px;
color: #fff;
background-color: rgba(0, 0, 0, 0.6);
text-overflow: ellipsis;
max-width: 100%;
.inner-box {
padding-left: 10px;
padding-right: 10px;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: normal;
white-space: nowrap;
.album-title {
width: 100%;
font-size: 13px;
line-height: 30px;
color: #ccc;
text-decoration: none;
}
}
}
}
2015-11-03 08:41:15 -05:00
// resize stackexchange onebox image
aside.onebox.stackexchange .onebox-body img {
max-height: 60%;
max-width: 10%;
}
// mobile specific style
.mobile-view article.onebox-body {
border-top: none;
}