diff --git a/3.0/mkdocs.yml b/3.0/mkdocs.yml index 8a654972..b82dca5f 100644 --- a/3.0/mkdocs.yml +++ b/3.0/mkdocs.yml @@ -129,6 +129,7 @@ markdown_extensions: theme: name: 'material' + custom_dir: 'theme/' palette: primary: 'blue' accent: 'purple' diff --git a/3.0/theme/main.html b/3.0/theme/main.html new file mode 100644 index 00000000..e01f20b2 --- /dev/null +++ b/3.0/theme/main.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block styles %} + {{ super() }} + +{% endblock %} + +{% block libs %} + {{ super() }} + +{% endblock %} \ No newline at end of file diff --git a/3.0/theme/scripts/carbon.js b/3.0/theme/scripts/carbon.js new file mode 100644 index 00000000..c09d4c99 --- /dev/null +++ b/3.0/theme/scripts/carbon.js @@ -0,0 +1,9 @@ +// data-md-component="toc" +document.addEventListener("DOMContentLoaded", function(event) { + var toc_inner = document.querySelectorAll('[data-md-component=toc] .md-sidebar__inner')[0]; + var script = document.createElement("script"); + script.src = '//cdn.carbonads.com/carbon.js?serve=CK7DT2QW&placement=vaporcodes'; + script.type = 'text/javascript'; + script.id = '_carbonads_js'; + toc_inner.appendChild(script); +}); \ No newline at end of file diff --git a/3.0/theme/styles/carbon.css b/3.0/theme/styles/carbon.css new file mode 100644 index 00000000..e1af32c4 --- /dev/null +++ b/3.0/theme/styles/carbon.css @@ -0,0 +1,61 @@ +#carbonads { + margin-left: 10px; + margin-top: 12px; + display: block; + overflow: hidden; + max-width: 160px; + border: solid 1px hsla(0, 0%, 0%, .1); + border-radius: 4px; + background-color: hsl(0, 0%, 98%); + text-align: center; + font-size: 12px; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, + Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif; + line-height: 1.5; +} + +#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-bottom: 8px; + max-width: 160px; + line-height: 1; +} + +.carbon-img img { + display: block; + margin: 0 auto; + max-width: 160px !important; + width: 160px; + height: auto; +} + +.carbon-text { + display: block; + padding: 0 1em 8px; +} + +.carbon-poweredby { + display: block; + padding: 10px 12px; + background: repeating-linear-gradient(-45deg, transparent, transparent 5px, hsla(0, 0%, 0%, .025) 5px, hsla(0, 0%, 0%, .025) 10px) hsla(203, 11%, 95%, .4); + text-transform: uppercase; + letter-spacing: .5px; + font-weight: 600; + font-size: 9px; + line-height: 0; +}