|
1 | | -<style> |
2 | | - :root { |
3 | | - --under-construction-banner-height: 43px; |
4 | | - --vp-layout-top-height: var(--under-construction-banner-height); |
5 | | - } |
6 | | - |
7 | | - #under-construction-banner { |
8 | | - position: fixed; |
9 | | - top: 0; |
10 | | - left: 0; |
11 | | - right: 0; |
12 | | - z-index: 1000; |
13 | | - background-color: #fff8c5; |
14 | | - border-bottom: 1px solid #e6a817; |
15 | | - padding: 10px 20px; |
16 | | - text-align: center; |
17 | | - font-size: 0.9rem; |
18 | | - color: #7c5000; |
19 | | - } |
20 | | - |
21 | | - html.dark #under-construction-banner { |
22 | | - background-color: #3a2d00; |
23 | | - border-bottom-color: #8a6b00; |
24 | | - color: #f5d87a; |
25 | | - } |
26 | | - |
27 | | - /* Remove the old body padding hack */ |
28 | | - body { |
29 | | - padding-top: 0 !important; |
30 | | - } |
31 | | -</style> |
32 | | - |
33 | 1 | <script> |
34 | 2 | (function () { |
35 | 3 | function syncSidebarNavGroups() { |
|
47 | 15 | }); |
48 | 16 | })(); |
49 | 17 |
|
50 | | - (function () { |
51 | | - function init() { |
52 | | - if (document.getElementById('under-construction-banner')) return; |
53 | | - |
54 | | - var banner = document.createElement('div'); |
55 | | - banner.id = 'under-construction-banner'; |
56 | | - banner.innerHTML = |
57 | | - '<strong>Under Construction</strong> — The contents of this documentation site are currently being re-built from various upstream sources. Links may be broken and some version information may be out of date. Pardon the mess as we get things cleaned up!'; |
58 | | - |
59 | | - document.body.prepend(banner); |
60 | | - |
61 | | - function updateHeight() { |
62 | | - var height = banner.offsetHeight + 'px'; |
63 | | - document.documentElement.style.setProperty('--under-construction-banner-height', height); |
64 | | - document.documentElement.style.setProperty('--vp-layout-top-height', height); |
65 | | - } |
66 | | - |
67 | | - updateHeight(); |
68 | | - window.addEventListener('resize', updateHeight); |
69 | | - } |
70 | | - |
71 | | - if (document.readyState === 'loading') { |
72 | | - document.addEventListener('DOMContentLoaded', init); |
73 | | - } else { |
74 | | - init(); |
75 | | - } |
76 | | - })(); |
77 | 18 | </script> |
0 commit comments