use a flexbox for the header sections

this is better than a float because I have always kind of hated how
floating divs work, and this also orders and displays the navs better in
elinks
This commit is contained in:
Brian S. Stephan 2021-02-11 00:23:19 -06:00
parent ad33cf2e83
commit 5e41cde52e
4 changed files with 26 additions and 18 deletions

View File

@ -28,12 +28,15 @@ a:hover, a:active {
border-bottom: 1px dotted #EEE;
}
div.nav, div.styles {
color: #BBB;
div.header {
background: #222;
border-bottom: 1px solid #222;
}
div.nav, div.styles {
color: #BBB;
}
div.nav a, div.styles a {
color: #BBB;
}

View File

@ -28,12 +28,15 @@ a:hover, a:active {
border-bottom: 1px dotted #111;
}
div.nav, div.styles {
color: #666;
div.header {
background: #EEE;
border-bottom: 1px solid #CCC;
}
div.nav, div.styles {
color: #666;
}
div.nav a, div.styles a {
color: #666;
}

View File

@ -63,9 +63,13 @@ a:active {
text-decoration: none;
}
div.header {
display: flex;
justify-content: space-between;
}
div.nav, div.styles {
font-size: 0.75em;
border-bottom: 1px solid #444;
padding: 0.25em 0.5em;
}
@ -73,10 +77,6 @@ div.nav a, div.styles a {
border-bottom: none;
}
div.styles {
float: right;
}
div.content {
font-size: 11pt;

View File

@ -11,15 +11,17 @@
<link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}">
<div class="site-wrap">
<div class="styles">
<a href="?style=dark">[dark]</a>
<a href="?style=light">[light]</a>
</div>
<div class="nav">
{% for nav in navs %}
<a href="{{ nav.1 }}">{{ nav.0 }}</a>
{% if not loop.last %} &raquo; {% endif %}
{% endfor %}
<div class="header">
<div class="nav">
{% for nav in navs %}
<a href="{{ nav.1 }}">{{ nav.0 }}</a>
{% if not loop.last %} &raquo; {% endif %}
{% endfor %}
</div>
<div class="styles">
<a href="?style=dark">[dark]</a>
<a href="?style=light">[light]</a>
</div>
</div>
<div class="content">
{{ content }}