Skip to content

Commit 6a2125b

Browse files
author
Lars Selstad
committed
Centering content on large screens and added menu link on small screens
1 parent 77a0255 commit 6a2125b

File tree

3 files changed

+38
-27
lines changed

3 files changed

+38
-27
lines changed

‎_includes/navbar.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<divclass="navbar">
1+
<divid="navbar" class="navbar">
22
<ul>
33
<li><ahref="/">Home</a>
44
<li><ahref="/about.html">About</a>

‎_layouts/default.html‎

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,23 @@
1010

1111
<body>
1212

13-
{% include navbar.html %}
13+
<divid="wrapper">
1414

15-
<divclass="site">
16-
<divclass="header">
17-
<!-- nothing yet -->
18-
</div>
15+
{% include navbar.html %}
1916

20-
{{content }}
17+
<divclass="site">
18+
<divclass="header">
19+
<!-- nothing yet -->
20+
</div>
2121

22-
<divclass="footer">
23-
<!-- nothing yet -->
24-
</div>
25-
</div>
22+
{{content }}
23+
24+
<divclass="footer">
25+
<!-- nothing yet -->
26+
</div>
27+
</div>
2628

29+
<divid="menuLinkBar"><ahref="#navbar">Menu</a></div>
30+
</div>
2731
</body>
2832
</html>

‎css/main.css‎

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,28 @@ body{
4343
padding:2em;
4444
}
4545

46-
@media (max-width:700px){
47-
body{
48-
flex-direction:column;
49-
}
50-
51-
.navbar{
52-
width:100%;
53-
54-
order:2;
46+
#menuLinkBar{
47+
background-color:#a09a93;
48+
text-align: right;
49+
padding:0.3em2em;
50+
order:1;
51+
display: none;
5552
}
53+
54+
@media (max-width:700px){
55+
#wrapper{
56+
flex-direction: column;
57+
}
58+
.site{
59+
order:2;
60+
}
61+
.navbar{
62+
width:100%;
63+
order:3;
64+
}
65+
#menuLinkBar{
66+
display: block;
67+
}
5668
}
5769

5870
ol,ul{
@@ -91,11 +103,8 @@ body{
91103
line-height:22px;
92104
font-family:"adelle", Georgia,"Times New Roman", serif;
93105
color:#4e443c;
94-
display: flex;
95106
margin:0;
96107
padding:0;
97-
width:100%;
98-
height:100%;
99108
}
100109

101110
.windows.chromebody,
@@ -1503,13 +1512,11 @@ pre.sh_sourceCode .sh_value{
15031512

15041513

15051514
#wrapper{
1506-
overflow: hidden;
1507-
*zoom:1;
1515+
display: flex;
15081516
margin:0 auto;
1509-
width:940px;
1517+
max-width:940px;
15101518
}
15111519

1512-
15131520
header{
15141521
margin-top:20px;
15151522
position: relative;

0 commit comments

Comments
(0)