Yoginth 7 лет назад
Родитель
Сommit
ad7742cbc1
1 измененных файлов с 97 добавлено и 0 удалено
  1. 97 0
      templates/misc/ad.tmpl

+ 97 - 0
templates/misc/ad.tmpl

@@ -0,0 +1,97 @@
+{{if .Owner.ShowSponsors}}
+<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CK7D52J7&placement=gitotein" id="_carbonads_js"></script>
+
+<style>
+#carbonads {
+   display: block;
+   overflow: hidden;
+   margin: 0 auto;
+   padding: 1em;
+   max-width: 380px;
+   border: solid 1px #dcdcdc;
+   border-radius: 3px;
+   font-size: 13px;
+   line-height: 1.5;
+   margin-top: 1.5em;
+ }
+
+ #carbonads a {
+   color: #575757;
+   text-decoration: none;
+ }
+
+ #carbonads a:hover {
+   color: #000000;
+   text-decoration: none;
+ }
+
+ #carbonads span {
+   position: relative;
+   display: block;
+   overflow: hidden;
+ }
+
+ .carbon-img {
+   float: left;
+   margin-right: 1em;
+ }
+
+ .carbon-img img {
+   display: block;
+ }
+
+ .carbon-text {
+   display: block;
+   float: left;
+   max-width: calc(100% - 130px - 1em);
+   text-align: left;
+   color: #fff;
+ }
+
+ .carbon-poweredby {
+   position: absolute;
+   bottom: 0;
+   left: 143px;
+   display: block;
+   color: hsl(0, 0%, 66%) !important;
+   text-transform: uppercase;
+   letter-spacing: 1px;
+   font-size: 9px;
+   line-height: 1;
+ }
+
+ @media only screen and (min-width: 320px) and (max-width: 479px) {
+   #carbonads {
+     max-width: 100%;
+     border: 0;
+     border-top: solid 1px hsl(263, 32%, 56%);
+     border-radius: 0;
+     padding-top: 2em;
+   }
+ }
+ /* Rules to overwrite the position of Carbon Ads on docs pages */
+
+ .bs-docs-header #carbonads {
+   position: absolute;
+   top: 0;
+   right: 15px;
+ }
+
+ @media only screen and (min-width: 480px) and (max-width: 980px) {
+   .bs-docs-header #carbonads {
+     position: relative;
+     right: 0;
+     margin: 4em auto 0;
+   }
+ }
+
+ @media only screen and (min-width: 320px) and (max-width: 479px) {
+   .bs-docs-header #carbonads {
+     position: relative;
+     right: 0;
+     margin: 2em 0 0;
+   }
+ }
+
+</style>
+{{end}}