From cc4ff18447e63dd194fb0101dddc74d513054b69 Mon Sep 17 00:00:00 2001 From: Jack Lukic Date: Tue, 25 Jun 2019 14:36:52 -0400 Subject: [PATCH] Update global template --- server/files/stylesheets/docs.css | 157 ++++++++++++++++++------------ server/layouts/default.html.eco | 1 + server/partials/header.html.eco | 28 +++--- server/partials/site-ads.html.eco | 4 + 4 files changed, 114 insertions(+), 76 deletions(-) create mode 100755 server/partials/site-ads.html.eco diff --git a/server/files/stylesheets/docs.css b/server/files/stylesheets/docs.css index 6e59b2f544..641afe66d7 100755 --- a/server/files/stylesheets/docs.css +++ b/server/files/stylesheets/docs.css @@ -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; } @@ -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; @@ -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; +} /******************************* @@ -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_ { @@ -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 */ @@ -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; diff --git a/server/layouts/default.html.eco b/server/layouts/default.html.eco index e9c44b946f..30925746d6 100755 --- a/server/layouts/default.html.eco +++ b/server/layouts/default.html.eco @@ -5,6 +5,7 @@ <%- @partial('javascript') %> <%- @partial('css') %> <%- @partial('tracking') %> + <%- @partial('site-ads') %> <%- @partial('transifex') %> diff --git a/server/partials/header.html.eco b/server/partials/header.html.eco index 92b3be302a..5d738553af 100755 --- a/server/partials/header.html.eco +++ b/server/partials/header.html.eco @@ -20,7 +20,7 @@ - + <% end %> <%=@document.description %> @@ -180,18 +180,22 @@ <% if 'development' in @getEnvironments(): %> <% else: %> - -
+