File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8686 top : 2rem !important ;
8787}
8888
89- /* Hide drawer hamburger and logo — our topbar has both.
90- Leave the search icon button intact so mobile search still works. */
91- .md-header__button : not ([for = "__search" ]) {
92- display : none !important ;
93- }
94-
95- /* Move palette toggle off-screen — our topbar handles theme switching */
96- .md-header__option {
97- position : absolute !important ;
98- left : -9999px !important ;
99- }
89+ /* NOTE: .md-header__button and .md-header__option hiding is intentionally
90+ NOT here — it is injected by topbar.js only after the topbar is built,
91+ so that a JS failure leaves Material's original navigation intact. */
10092
10193/* ── Org-site only ────────────────────────────────────────────────────────
10294 The org site sets data-utplsql-site="org" on <html> in its template.
Original file line number Diff line number Diff line change 115115 updateThemeIcon ( ) ;
116116 }
117117
118- /* Updates the active class on nav links based on the current URL. */
119118 function injectDrawerNav ( ) {
120119 /* Only needed on mobile — desktop shows links in the topbar itself. */
121120 if ( ! window . matchMedia ( '(max-width: 76.1875em)' ) . matches ) return ;
231230 controls . appendChild ( themeBtn ) ;
232231 bar . appendChild ( controls ) ;
233232
234- /* Inject back-to-top button offset so it clears the topbar + header.
235- topbar.css covers the org site; this covers sub-sites that only load the JS . */
233+ /* Injected only after the topbar is successfully built so that a JS failure
234+ leaves Material's original header navigation intact as a fallback . */
236235 if ( ! document . getElementById ( 'utplsql-topbar-style' ) ) {
237236 var style = document . createElement ( 'style' ) ;
238237 style . id = 'utplsql-topbar-style' ;
239- style . textContent = '.md-top { top: 4.4rem !important; z-index: 11; }' ;
238+ style . textContent =
239+ /* Hide Material's hamburger/logo — our topbar has both */
240+ '.md-header__button:not([for="__search"]) { display: none !important; }' +
241+ /* Move palette toggle off-screen — our topbar handles theme switching */
242+ '.md-header__option { position: absolute !important; left: -9999px !important; }' +
243+ /* Back-to-top button: clear topbar + header */
244+ '.md-top { top: 4.4rem !important; z-index: 11; }' ;
240245 document . head . appendChild ( style ) ;
241246 }
242247
Original file line number Diff line number Diff line change 77
88{% block extrahead %}
99 {{ super() }}
10- < link rel ="stylesheet " href ="https://utplsql.org/assets/topbar.css ">
11- < script src ="https://utplsql.org/assets/topbar.js " defer > </ script >
10+ < link rel ="stylesheet " href ="https://www. utplsql.org/assets/topbar.css ">
11+ < script src ="https://www. utplsql.org/assets/topbar.js " defer > </ script >
1212{% endblock %}
You can’t perform that action at this time.
0 commit comments