Skip to content

Commit

Permalink
Merge pull request #2902 from codeigniter4/carbonads
Browse files Browse the repository at this point in the history
Carbonads
  • Loading branch information
lonnieezell authored Apr 29, 2020
2 parents 6363c0b + 956bb5f commit d49e6ac
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 30 deletions.
124 changes: 94 additions & 30 deletions user_guide_src/source/_static/css/citheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
font-weight: 200;
src: url('../fonts/Raleway/raleway-v14-latin-200.eot'); /* IE9 Compat Modes */
src: local('Raleway ExtraLight'), local('Raleway-ExtraLight'),
url('../fonts/Raleway/raleway-v14-latin-200.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/Raleway/raleway-v14-latin-200.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-200.woff') format('woff'), /* Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-200.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/Raleway/raleway-v14-latin-200.svg#Raleway') format('svg'); /* Legacy iOS */
url('../fonts/Raleway/raleway-v14-latin-200.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/Raleway/raleway-v14-latin-200.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-200.woff') format('woff'), /* Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-200.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/Raleway/raleway-v14-latin-200.svg#Raleway') format('svg'); /* Legacy iOS */
}

@font-face {
Expand All @@ -23,11 +23,11 @@
font-weight: 200;
src: url('../fonts/Raleway/raleway-v14-latin-200italic.eot'); /* IE9 Compat Modes */
src: local('Raleway ExtraLight Italic'), local('Raleway-ExtraLightItalic'),
url('../fonts/Raleway/raleway-v14-latin-200italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/Raleway/raleway-v14-latin-200italic.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-200italic.woff') format('woff'), /* Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-200italic.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/Raleway/raleway-v14-latin-200italic.svg#Raleway') format('svg'); /* Legacy iOS */
url('../fonts/Raleway/raleway-v14-latin-200italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/Raleway/raleway-v14-latin-200italic.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-200italic.woff') format('woff'), /* Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-200italic.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/Raleway/raleway-v14-latin-200italic.svg#Raleway') format('svg'); /* Legacy iOS */
}

@font-face {
Expand All @@ -36,11 +36,11 @@
font-weight: 400;
src: url('../fonts/Raleway/raleway-v14-latin-regular.eot'); /* IE9 Compat Modes */
src: local('Raleway'), local('Raleway-Regular'),
url('../fonts/Raleway/raleway-v14-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/Raleway/raleway-v14-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-regular.woff') format('woff'), /* Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/Raleway/raleway-v14-latin-regular.svg#Raleway') format('svg'); /* Legacy iOS */
url('../fonts/Raleway/raleway-v14-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/Raleway/raleway-v14-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-regular.woff') format('woff'), /* Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/Raleway/raleway-v14-latin-regular.svg#Raleway') format('svg'); /* Legacy iOS */
}

@font-face {
Expand All @@ -49,11 +49,11 @@
font-weight: 400;
src: url('../fonts/Raleway/raleway-v14-latin-italic.eot'); /* IE9 Compat Modes */
src: local('Raleway Italic'), local('Raleway-Italic'),
url('../fonts/Raleway/raleway-v14-latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/Raleway/raleway-v14-latin-italic.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-italic.woff') format('woff'), /* Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-italic.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/Raleway/raleway-v14-latin-italic.svg#Raleway') format('svg'); /* Legacy iOS */
url('../fonts/Raleway/raleway-v14-latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/Raleway/raleway-v14-latin-italic.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-italic.woff') format('woff'), /* Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-italic.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/Raleway/raleway-v14-latin-italic.svg#Raleway') format('svg'); /* Legacy iOS */
}

@font-face {
Expand All @@ -62,11 +62,11 @@
font-weight: 700;
src: url('../fonts/Raleway/raleway-v14-latin-700.eot'); /* IE9 Compat Modes */
src: local('Raleway Bold'), local('Raleway-Bold'),
url('../fonts/Raleway/raleway-v14-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/Raleway/raleway-v14-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-700.woff') format('woff'), /* Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/Raleway/raleway-v14-latin-700.svg#Raleway') format('svg'); /* Legacy iOS */
url('../fonts/Raleway/raleway-v14-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/Raleway/raleway-v14-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-700.woff') format('woff'), /* Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/Raleway/raleway-v14-latin-700.svg#Raleway') format('svg'); /* Legacy iOS */
}

@font-face {
Expand All @@ -75,11 +75,11 @@
font-weight: 700;
src: url('../fonts/Raleway/raleway-v14-latin-700italic.eot'); /* IE9 Compat Modes */
src: local('Raleway Bold Italic'), local('Raleway-BoldItalic'),
url('../fonts/Raleway/raleway-v14-latin-700italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/Raleway/raleway-v14-latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-700italic.woff') format('woff'), /* Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-700italic.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/Raleway/raleway-v14-latin-700italic.svg#Raleway') format('svg'); /* Legacy iOS */
url('../fonts/Raleway/raleway-v14-latin-700italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/Raleway/raleway-v14-latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-700italic.woff') format('woff'), /* Modern Browsers */
url('../fonts/Raleway/raleway-v14-latin-700italic.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/Raleway/raleway-v14-latin-700italic.svg#Raleway') format('svg'); /* Legacy iOS */
}

/* General ------------------------------------------------------------------ */
Expand Down Expand Up @@ -261,6 +261,10 @@ div#pulldown-menu {
white-space: pre;
}

.rst-content {
max-width: 60em;
}

.rst-content dl:not(.docutils) dt {
background: #fdc894;
color: #434343;
Expand Down Expand Up @@ -316,3 +320,63 @@ div#pulldown-menu {
margin-bottom: 2.5rem;
margin-top: 2.5rem;
}

/* Carbon Ads --------------------------------------------------------------- */

#carbonads {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

#carbonads {
display: flex;
max-width: 330px;
background-color: hsla(0, 0%, 98%, 0.1);
border: 1px solid hsla(0, 0%, 98%, 0.15);
margin: 3em 1.5em;
}

#carbonads a {
color: inherit;
text-decoration: none;
}

#carbonads a:hover {
color: inherit;
}

#carbonads span {
position: relative;
display: block;
overflow: hidden;
}

.carbon-img {
display: block;
margin: 0;
line-height: 1;
text-align: center;
}

.carbon-img img {
display: block;
margin: auto;
}

.carbon-text {
font-size: 13px;
padding: 10px;
line-height: 1.5;
text-align: left;
}

.carbon-poweredby {
display: block;
padding: 8px 10px;
text-align: center;
text-transform: uppercase;
letter-spacing: .5px;
font-weight: lighter;
font-size: 9px;
line-height: 1;
}
16 changes: 16 additions & 0 deletions user_guide_src/source/_static/js/carbon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Add Carbon Ads underneath navigation to support CodeIgniter Foundation
*/
if (window.location.hostname === 'codeigniter.com') {
window.onload = function () {
// Create a HTML DOM Element Object
var carbon = document.createElement('script');
carbon.async = true;
carbon.type = 'text/javascript';
carbon.src = 'https://cdn.carbonads.com/carbon.js?serve=CE7I62QW&placement=codeignitercom';
carbon.id = '_carbonads_js';

// Append Carbon Ads to .wy-menu
document.querySelector('.wy-menu').appendChild(carbon);
}
}
1 change: 1 addition & 0 deletions user_guide_src/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
# A list of JS files.
html_js_files = [
'js/citheme.js',
'js/carbon.js'
]

# -- Options for LaTeX output --------------------------------------------------
Expand Down

0 comments on commit d49e6ac

Please sign in to comment.