Skip to content

Commit

Permalink
Update global template
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Jun 25, 2019
1 parent a215264 commit cc4ff18
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 76 deletions.
157 changes: 93 additions & 64 deletions server/files/stylesheets/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,11 @@ blockquote .author {
margin: 0em;
}

#example .masthead iframe.github {
width: 101px !important;
}
#example .masthead iframe {
margin-left: 5px;
width: 101px !important;
float: right;
}

Expand Down Expand Up @@ -2103,14 +2105,21 @@ code .chunk {
Style Overrides
-----------------*/

#example .masthead .advertisement {
width: 285px;
height: 130px;
}
#example .masthead .advertisement #carbonads {
width: 100%;
height: 130px;
}
#example .advertisement #carbonads {
position: relative;
display: block;
width: auto;
margin: 0 auto;
background-color: #F5F8F9;
border: 1px solid #9ECAD3;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
background-color: #F5F5F5;
border: 1px solid #CCCCCC;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.08) inset;
padding: 1em;
font-family: "Helvetica Neue", Arial, sans-serif;
overflow: hidden;
Expand Down Expand Up @@ -2180,82 +2189,71 @@ code .chunk {
width: auto;
}

#example .bsa-cpc #_default_ {
#semantic-sponsor {
position: relative;
z-index: 3;
margin-top: -1px;
min-height: 40px;
border-top: solid 1px #dddddd;
border-bottom: solid 1px #dddddd;
text-align: center;
font-size: 14px;
line-height: 1.5;
transition: background 0.3s ease;
}
#example .bsa-cpc #_default_:hover {
background-color: #FAFAFA;
}

#example .bsa-cpc .default-ad {
display: none;
#semantic-sponsor:hover {
border-color: #87C7D0;
}

#example .bsa-cpc ._default_ {
display: inline-block;
overflow: hidden;
padding: 10px 3em;
max-width: 1044px;
color: #415a5a;
text-align: left;
line-height: 1;
margin-right: 344px;
.native-link {
display: block;
width: 100%;
background-color: #F5F5F5;
padding: 5px 3em;
color: #415a5a;
}

#example .bsa-cpc ._default_ > * {
vertical-align: middle;
.native-link:hover {
color: #000000;
background-color: #F0F8F9;
}

#example .bsa-cpc a {
.native-link,
.native-ad {
text-decoration: none;
}

#example .bsa-cpc .default-image {
display: inline-block;
margin-right: 6px;
line-height: 0;
}

#example .bsa-cpc .default-image img {
height: 18px;
border-radius: 3px;
.native-ad {
position: absolute;
right: 1rem;
}

#example .bsa-cpc .default-title:after {
content: " — ";
.native-inline,
.native-link {
display: flex;
align-items: center;
}

#example .bsa-cpc .default-title,
#example .bsa-cpc .default-description {
display: inline;
.native-img {
margin-right: 10px;
display: block;
padding: 5px;
height: 30px;
flex: 0 0 auto;
width: 30px;
border-radius: 50%;
}

#example .bsa-cpc .default-title {
position: relative;
font-weight: 600;
.native-text {
margin-right: 38px;
}

#example .bsa-cpc .default-description:after {
position: relative;
top: 0px;
right: 0px;
padding: 4px 6px;
float: right;
.native-ad {
padding: 4px 7px 4px;
line-height: 1;
border-radius: 3px;
background-color: #848484;
color: #fff;
content: "Ad";
text-transform: uppercase;
font-size: 9px;
font-family: Verdana, sans-serif;
font-size: 10px;
}

.native-ad:hover {
color: #fff;
}


/*******************************
Expand Down Expand Up @@ -2325,21 +2323,26 @@ code .chunk {
/* Table Ad */
@media only screen and (max-width: 1272px) {

#example .masthead > .container:first-child {
display: flex;
flex-direction: row;
}
#example .masthead > .container {
margin-right: 2em !important;
max-width: none !important;
}
#example .masthead .introduction {
display: table-cell;
vertical-align: top;
width: 100%;
flex: 1 0 auto;
}
#example .masthead .advertisement {
position: static;
float: none;
display: table-cell;
flex: 0 1 auto;
vertical-align: bottom;
padding-left: 3em;
padding-left: 0em;
margin-left: 2rem;
margin-top: -0.5rem;
padding-right: 0em;
}
#example .bsa-cpc ._default_ {
Expand All @@ -2350,14 +2353,30 @@ code .chunk {
/* Squish Content (Just For Small Computers) */
@media only screen and (max-width: 1272px) {

/* Resize TOC */
#example .full.height > .toc {
width: 200px;
}
#example .article {
margin-left: 200px;
}
#example .masthead > .container,
#example .main.container,
#example .fixed.menu > .container {
margin-left: 2rem !important;
margin-right: 2rem !important;
}
/* Resize Main Container */
#example .main.container {
margin-right: 318px !important;
}

/* Resize TOC */
#example .full.height > .toc {
width: 200px;
.native-link {
padding-left: 2rem;
padding-right: 2rem;
}
.native-ad {
right: 2rem;
}

/* Resize Rail */
Expand Down Expand Up @@ -2506,6 +2525,16 @@ code .chunk {

@media only screen and (max-width: 768px) {

#example .masthead > .container:first-child {
flex-direction: column;
}
#example .masthead .advertisement #carbonads {
height: auto;
}
#example .masthead .advertisement {
height: auto;
margin: 1rem 0rem;
}
/* Hide Some Fixed Menu Content (Pagination, Search) */
#example .fixed.menu > .container > .section.item {
display: none;
Expand Down
1 change: 1 addition & 0 deletions server/layouts/default.html.eco
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<%- @partial('javascript') %>
<%- @partial('css') %>
<%- @partial('tracking') %>
<%- @partial('site-ads') %>
<%- @partial('transifex') %>
</head>
<body id="example" class="<%= @document.css %>" ontouchstart="">
Expand Down
28 changes: 16 additions & 12 deletions server/partials/header.html.eco
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<script type="text/javascript">
window.twttr=(function(d,s,id){var t,js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id)){return}js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);return window.twttr||(t={_e:[],ready:function(f){t._e.push(f)}})}(document,"script","twitter-wjs"));
</script>
<iframe class="github" src="//ghbtns.com/github-btn.html?user=semantic-org&amp;repo=semantic-ui&amp;type=watch&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>
<iframe class="github" src="//ghbtns.com/github-btn.html?user=semantic-org&amp;repo=semantic-ui&amp;type=star&amp;count=true&amp;" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>
<% end %>
<%[email protected] %>
</div>
Expand Down Expand Up @@ -180,18 +180,22 @@
</div>
<% if 'development' in @getEnvironments(): %>
<% else: %>
<script src="//m.servedby-buysellads.com/monetization.js" type="text/javascript"></script>
<div class="bsa-cpc"></div>
<div id="semantic-sponsor"></div>
<script>
(function(){
if(typeof _bsa !== 'undefined' && _bsa) {
_bsa.init('default', 'CVAIKK7I', 'placement:semanticuicom', {
target: '.bsa-cpc',
align: 'horizontal',
disable_css: 'true'
});
}
})();
_bsa.init('custom', 'CVAIKK7I', 'placement:semanticuicom',
{
target: '#semantic-sponsor',
template: `
<div class="native-inline">
<a href="##link##" class="native-link">
<img src="##image##" style="background-color: ##backgroundColor##" class="native-img">
<div class="native-text">##company## — ##description##</div>
</a>
<a href="##adViaLink##" class="native-ad">AD</a>
</div>
`
}
);
</script>
<div class="ui vertical beg transition hidden segment">
<i class="large red delete link icon"></i>
Expand Down
4 changes: 4 additions & 0 deletions server/partials/site-ads.html.eco
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<% if ('development' in @getEnvironments()): %>
<% else: %>
<script src="//m.servedby-buysellads.com/monetization.js" type="text/javascript"></script>
<% end %>

0 comments on commit cc4ff18

Please sign in to comment.