Skip to content

Commit

Permalink
Adds a status class for noting when warnings are present.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jnf committed May 2, 2017
1 parent 3897876 commit bcb1cc5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions second-edition/theme/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<style>
p.warning {
.page-wrapper.has-warning > .nav-chapters {
/* add height for warning content & margin */
top: 120px;
}
p.warning {
background-color: rgb(242, 222, 222);
border-bottom-color: rgb(238, 211, 215);
border-bottom-left-radius: 4px;
Expand Down Expand Up @@ -91,7 +96,7 @@
{{#toc}}{{/toc}}
</div>

<div id="page-wrapper" class="page-wrapper">
<div id="page-wrapper" class="page-wrapper has-warning">

<div class="page">
<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>
Expand Down

0 comments on commit bcb1cc5

Please sign in to comment.