diff options
author | Pim van den Berg | 2015-05-16 16:37:53 +0200 |
---|---|---|
committer | Pim van den Berg | 2015-06-21 18:06:05 +0200 |
commit | 727ed753a9c540c71f00bafa6e43ad4cb42321f2 (patch) | |
tree | 2c0b44a62ec658de5ec4b891d72492024189fcf8 /layout | |
parent | responsive: make the host page look nice on all media (diff) | |
download | apt-panopticon_cgp-727ed753a9c540c71f00bafa6e43ad4cb42321f2.zip apt-panopticon_cgp-727ed753a9c540c71f00bafa6e43ad4cb42321f2.tar.gz apt-panopticon_cgp-727ed753a9c540c71f00bafa6e43ad4cb42321f2.tar.bz2 apt-panopticon_cgp-727ed753a9c540c71f00bafa6e43ad4cb42321f2.tar.xz |
responsive: introduce a hamburger navicon to toggle the menu on smaller devices
Diffstat (limited to 'layout')
-rw-r--r-- | layout/style-c.css | 27 | ||||
-rw-r--r-- | layout/style.css | 36 |
2 files changed, 57 insertions, 6 deletions
diff --git a/layout/style-c.css b/layout/style-c.css index 83c64bc..702cc04 100644 --- a/layout/style-c.css +++ b/layout/style-c.css | |||
@@ -1,3 +1,11 @@ | |||
1 | label[for="navicon"] { | ||
2 | display: block; | ||
3 | } | ||
4 | |||
5 | #header h1 { | ||
6 | padding-left: 30px; | ||
7 | } | ||
8 | |||
1 | #content { | 9 | #content { |
2 | padding-left: 5px; | 10 | padding-left: 5px; |
3 | } | 11 | } |
@@ -12,5 +20,24 @@ | |||
12 | } | 20 | } |
13 | 21 | ||
14 | .plugins { | 22 | .plugins { |
23 | position: absolute; | ||
24 | z-index: 0; | ||
15 | display: none; | 25 | display: none; |
16 | } | 26 | } |
27 | |||
28 | .navicon:checked ~ .plugins { | ||
29 | display: block; | ||
30 | } | ||
31 | |||
32 | .graphs { | ||
33 | position: relative; | ||
34 | z-index: 1; | ||
35 | background: #fff; | ||
36 | min-height: 100%; | ||
37 | min-width: 100%; | ||
38 | bottom: 100%; | ||
39 | } | ||
40 | |||
41 | .navicon:checked ~ .graphs { | ||
42 | left: 125px; | ||
43 | } | ||
diff --git a/layout/style.css b/layout/style.css index 156e8c5..768c0c6 100644 --- a/layout/style.css +++ b/layout/style.css | |||
@@ -3,14 +3,41 @@ body { | |||
3 | margin: 0px; | 3 | margin: 0px; |
4 | } | 4 | } |
5 | 5 | ||
6 | label[for="navicon"] { | ||
7 | display: none; | ||
8 | |||
9 | position: absolute; | ||
10 | left: 5px; top: 5px; | ||
11 | z-index: 2; | ||
12 | |||
13 | height: 25px; | ||
14 | width: 25px; | ||
15 | cursor: pointer; | ||
16 | background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' x='0px' y='0px' width='25px' height='25px' viewBox='0 0 25 25' enable-background='new 0 0 25 25' xml:space='preserve'><rect width='25' height='5' style='fill:white'/><rect y='20' width='25' height='5' style='fill:white'/><rect y='10' width='25' height='5' style='fill:white'/></svg>"); | ||
17 | background-size: contain; | ||
18 | } | ||
19 | |||
20 | .navicon { | ||
21 | position: absolute; | ||
22 | clip: rect(0, 0, 0, 0); | ||
23 | } | ||
24 | |||
6 | #header { | 25 | #header { |
7 | background: #4d79b5; | 26 | background: #4d79b5; |
8 | padding-left: 10px; | 27 | padding-left: 10px; |
28 | color: #fff; | ||
29 | } | ||
30 | |||
31 | #header h1 { | ||
32 | position: relative; | ||
33 | display: inline-block; | ||
34 | padding: 8px; | ||
35 | margin: 0; | ||
36 | font-size: 1em; | ||
9 | } | 37 | } |
10 | 38 | ||
11 | #header a{ | 39 | #header a{ |
12 | display: block; | 40 | display: block; |
13 | padding: 8px; | ||
14 | color: #fff; | 41 | color: #fff; |
15 | text-decoration: none; | 42 | text-decoration: none; |
16 | } | 43 | } |
@@ -28,11 +55,7 @@ body { | |||
28 | #footer { | 55 | #footer { |
29 | clear: both; | 56 | clear: both; |
30 | padding: 0px 20px 16px; | 57 | padding: 0px 20px 16px; |
31 | } | 58 | background: #fff; |
32 | |||
33 | h1 { | ||
34 | margin: 0; | ||
35 | font-size: 1em; | ||
36 | } | 59 | } |
37 | 60 | ||
38 | h2 { | 61 | h2 { |
@@ -126,6 +149,7 @@ hr { | |||
126 | .plugins { | 149 | .plugins { |
127 | float: left; | 150 | float: left; |
128 | margin-right: 25px; | 151 | margin-right: 25px; |
152 | width: 100px; | ||
129 | } | 153 | } |
130 | 154 | ||
131 | .plugins ul > li:first-of-type { | 155 | .plugins ul > li:first-of-type { |