Skip to content

Commit 3c9dbed

Browse files
author
Jacek Gębal
committed
Add topbar setting for all sub-sites
1 parent 72dc4db commit 3c9dbed

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

docs/assets/topbar.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,15 @@
200200
controls.appendChild(themeBtn);
201201
bar.appendChild(controls);
202202

203+
/* Inject back-to-top button offset so it clears the topbar + header.
204+
topbar.css covers the org site; this covers sub-sites that only load the JS. */
205+
if (!document.getElementById('utplsql-topbar-style')) {
206+
var style = document.createElement('style');
207+
style.id = 'utplsql-topbar-style';
208+
style.textContent = '.md-top { top: 4.4rem !important; }';
209+
document.head.appendChild(style);
210+
}
211+
203212
savedBar = bar;
204213
document.body.insertBefore(bar, document.body.firstChild);
205214
updateActiveLink();

0 commit comments

Comments
 (0)