diff --git a/config/jsdoc/api/template/static/scripts/main.js b/config/jsdoc/api/template/static/scripts/main.js index 64a36cd6e4..22bcad9dff 100644 --- a/config/jsdoc/api/template/static/scripts/main.js +++ b/config/jsdoc/api/template/static/scripts/main.js @@ -112,7 +112,7 @@ $(function () { var branchSearch = url.match(/\/([^\/]*)\/apidoc\//); var cookieText = 'dismissed=-' + latestVersion + '-'; var dismissed = document.cookie.indexOf(cookieText) != -1; - if (!dismissed && /^v[0-9\.]*$/.test(branchSearch[1]) && currentVersion != latestVersion) { + if (branchSearch && !dismissed && /^v[0-9\.]*$/.test(branchSearch[1]) && currentVersion != latestVersion) { var link = url.replace(branchSearch[0], '/latest/apidoc/'); fetch(link, {method: 'head'}).then(function(response) { var a = document.getElementById('latest-link'); diff --git a/config/jsdoc/api/template/static/styles/site.css b/config/jsdoc/api/template/static/styles/site.css new file mode 100644 index 0000000000..7628c8d674 --- /dev/null +++ b/config/jsdoc/api/template/static/styles/site.css @@ -0,0 +1,77 @@ +/* Carbon adds (see https://sell.buysellads.com) */ + +#ad { + margin-left: 1em; + float: right; + width: 330px; + min-height: 125px; +} + +#carbonads { + font-family: "Quattrocento Sans", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; +} + +#carbonads { + display: flex; +} + +#carbonads a { + color: inherit; + text-decoration: none; +} + +#carbonads a:hover { + color: inherit; +} + +#carbonads span { + position: relative; + display: block; + overflow: hidden; +} + +#carbonads .carbon-wrap { + display: flex; +} + +.carbon-img { + display: block; + margin: 0; + line-height: 1; +} + +.carbon-img img { + display: block; +} + +.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: 600; + font-size: 9px; + line-height: 1; +} + +#carbonads a.carbon-poweredby { + color: #aaa; +} + +/* Clear the float after the advertisement. */ + +.container-overview { + clear: both; +} + +pre.source { + clear: both; +} diff --git a/config/jsdoc/api/template/tmpl/container.tmpl b/config/jsdoc/api/template/tmpl/container.tmpl index baca743283..ad8c4f3e13 100644 --- a/config/jsdoc/api/template/tmpl/container.tmpl +++ b/config/jsdoc/api/template/tmpl/container.tmpl @@ -41,6 +41,9 @@
import from '';
+