Skip to content

Commit bcb1cc5

Browse files
committed
Adds a status class for noting when warnings are present.
The status class, `.has-warning`, provides a hook for other content to adjust their positioning. It's leveraged to push down the absolutely positioned chapter navs far enough so that they clear both the warning message and the icons in the header bar. Fixes #656.
1 parent 3897876 commit bcb1cc5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

second-edition/theme/index.hbs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@
2020
<link rel="stylesheet" href="highlight.css">
2121
<link rel="stylesheet" href="tomorrow-night.css">
2222
<style>
23-
p.warning {
23+
.page-wrapper.has-warning > .nav-chapters {
24+
/* add height for warning content & margin */
25+
top: 120px;
26+
}
27+
28+
p.warning {
2429
background-color: rgb(242, 222, 222);
2530
border-bottom-color: rgb(238, 211, 215);
2631
border-bottom-left-radius: 4px;
@@ -91,7 +96,7 @@
9196
{{#toc}}{{/toc}}
9297
</div>
9398

94-
<div id="page-wrapper" class="page-wrapper">
99+
<div id="page-wrapper" class="page-wrapper has-warning">
95100

96101
<div class="page">
97102
<header><p class="warning">You are reading a <strong>draft</strong> of the next edition of TRPL. For more, go <a href="../index.html">here</a>.</p></header>

0 commit comments

Comments
 (0)