| 1 | /*
|
|---|
| 2 | Copyright (C) 2017 - 2018 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
|
|---|
| 3 |
|
|---|
| 4 | This program is free software: you can redistribute it and/or modify
|
|---|
| 5 | it under the terms of the GNU General Public License as published by
|
|---|
| 6 | the Free Software Foundation, either version 3 of the License, or
|
|---|
| 7 | (at your option) any later version.
|
|---|
| 8 |
|
|---|
| 9 | This program is distributed in the hope that it will be useful,
|
|---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 12 | GNU General Public License for more details.
|
|---|
| 13 |
|
|---|
| 14 | You should have received a copy of the GNU General Public License
|
|---|
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|---|
| 16 | */
|
|---|
| 17 |
|
|---|
| 18 | @import url("GnuBoatColors.css");
|
|---|
| 19 |
|
|---|
| 20 | body {
|
|---|
| 21 | color: #777;
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | .pure-img-responsive {
|
|---|
| 25 | max-width: 100%;
|
|---|
| 26 | height: auto;
|
|---|
| 27 | }
|
|---|
| 28 |
|
|---|
| 29 | /*
|
|---|
| 30 | Add transition to containers so they can push in and out.
|
|---|
| 31 | */
|
|---|
| 32 | #layout,
|
|---|
| 33 | #menu,
|
|---|
| 34 | .menu-link {
|
|---|
| 35 | -webkit-transition: all 0.2s ease-out;
|
|---|
| 36 | -moz-transition: all 0.2s ease-out;
|
|---|
| 37 | -ms-transition: all 0.2s ease-out;
|
|---|
| 38 | -o-transition: all 0.2s ease-out;
|
|---|
| 39 | transition: all 0.2s ease-out;
|
|---|
| 40 | }
|
|---|
| 41 |
|
|---|
| 42 | /*
|
|---|
| 43 | This is the parent `<div>` that contains the menu and the content area.
|
|---|
| 44 | */
|
|---|
| 45 | #layout {
|
|---|
| 46 | position: relative;
|
|---|
| 47 | left: 0;
|
|---|
| 48 | padding-left: 0;
|
|---|
| 49 | }
|
|---|
| 50 | #layout.active #menu {
|
|---|
| 51 | left: 150px;
|
|---|
| 52 | width: 150px;
|
|---|
| 53 | }
|
|---|
| 54 |
|
|---|
| 55 | #layout.active .menu-link {
|
|---|
| 56 | left: 150px;
|
|---|
| 57 | }
|
|---|
| 58 | /*
|
|---|
| 59 | The content `<div>` is where all your content goes.
|
|---|
| 60 | */
|
|---|
| 61 | .content {
|
|---|
| 62 | margin: 0 auto;
|
|---|
| 63 | padding: 0 2em;
|
|---|
| 64 | max-width: 800px;
|
|---|
| 65 | margin-bottom: 50px;
|
|---|
| 66 | line-height: 1.6em;
|
|---|
| 67 | }
|
|---|
| 68 |
|
|---|
| 69 | .header {
|
|---|
| 70 | margin: 0;
|
|---|
| 71 | color: #333;
|
|---|
| 72 | text-align: center;
|
|---|
| 73 | padding: 2.5em 2em 0;
|
|---|
| 74 | border-bottom: 1px solid #eee;
|
|---|
| 75 | }
|
|---|
| 76 | .header h1 {
|
|---|
| 77 | margin: 0.2em 0;
|
|---|
| 78 | font-size: 3em;
|
|---|
| 79 | font-weight: 300;
|
|---|
| 80 | }
|
|---|
| 81 | .header h2 {
|
|---|
| 82 | font-weight: 300;
|
|---|
| 83 | color: #ccc;
|
|---|
| 84 | padding: 0;
|
|---|
| 85 | margin-top: 0;
|
|---|
| 86 | }
|
|---|
| 87 |
|
|---|
| 88 | .content-subhead {
|
|---|
| 89 | margin: 50px 0 20px 0;
|
|---|
| 90 | font-weight: 300;
|
|---|
| 91 | color: #888;
|
|---|
| 92 | }
|
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 | /*
|
|---|
| 97 | The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
|
|---|
| 98 | appears on the left side of the page.
|
|---|
| 99 | */
|
|---|
| 100 |
|
|---|
| 101 | #menu {
|
|---|
| 102 | margin-left: -150px; /* "#menu" width */
|
|---|
| 103 | width: 150px;
|
|---|
| 104 | position: fixed;
|
|---|
| 105 | top: 0;
|
|---|
| 106 | left: 0;
|
|---|
| 107 | bottom: 0;
|
|---|
| 108 | z-index: 1000; /* so the menu or its navicon stays above all content */
|
|---|
| 109 | background: var(--gnuboat-primary-dark);
|
|---|
| 110 | overflow-y: auto;
|
|---|
| 111 | -webkit-overflow-scrolling: touch;
|
|---|
| 112 | }
|
|---|
| 113 | /*
|
|---|
| 114 | All anchors inside the menu should be styled like this.
|
|---|
| 115 | */
|
|---|
| 116 | #menu a {
|
|---|
| 117 | color: #fff;
|
|---|
| 118 | border: none;
|
|---|
| 119 | padding: 0.6em 0 0.6em 0.6em;
|
|---|
| 120 | }
|
|---|
| 121 |
|
|---|
| 122 | /*
|
|---|
| 123 | Remove all background/borders, since we are applying them to #menu.
|
|---|
| 124 | */
|
|---|
| 125 | #menu .pure-menu,
|
|---|
| 126 | #menu .pure-menu ul {
|
|---|
| 127 | border: none;
|
|---|
| 128 | background: transparent;
|
|---|
| 129 | }
|
|---|
| 130 |
|
|---|
| 131 | /*
|
|---|
| 132 | Add that light border to separate items into groups.
|
|---|
| 133 | */
|
|---|
| 134 | #menu .pure-menu ul,
|
|---|
| 135 | #menu .pure-menu .menu-item-divided {
|
|---|
| 136 | border-top: 1px solid var(--gnuboat-primary-light);
|
|---|
| 137 | }
|
|---|
| 138 | /*
|
|---|
| 139 | Change color of the anchor links on hover/focus.
|
|---|
| 140 | */
|
|---|
| 141 | #menu .pure-menu li a:hover,
|
|---|
| 142 | #menu .pure-menu li a:focus {
|
|---|
| 143 | background: var(--gnuboat-primary-light);
|
|---|
| 144 | }
|
|---|
| 145 |
|
|---|
| 146 | /*
|
|---|
| 147 | This styles the selected menu item `<li>`.
|
|---|
| 148 | */
|
|---|
| 149 | #menu .pure-menu-selected,
|
|---|
| 150 | #menu .pure-menu-heading {
|
|---|
| 151 | background: var(--gnuboat-secondary-dark);
|
|---|
| 152 | }
|
|---|
| 153 | /*
|
|---|
| 154 | This styles a link within a selected menu item `<li>`.
|
|---|
| 155 | */
|
|---|
| 156 | #menu .pure-menu-selected a {
|
|---|
| 157 | color: #fff;
|
|---|
| 158 | }
|
|---|
| 159 |
|
|---|
| 160 | /*
|
|---|
| 161 | This styles the menu heading.
|
|---|
| 162 | */
|
|---|
| 163 | #menu .pure-menu-heading {
|
|---|
| 164 | font-size: 110%;
|
|---|
| 165 | color: #fff;
|
|---|
| 166 | margin: 0;
|
|---|
| 167 | }
|
|---|
| 168 |
|
|---|
| 169 | /* -- Dynamic Button For Responsive Menu -------------------------------------*/
|
|---|
| 170 |
|
|---|
| 171 | /*
|
|---|
| 172 | The button to open/close the Menu is custom-made and not part of Pure. Here's
|
|---|
| 173 | how it works:
|
|---|
| 174 | */
|
|---|
| 175 |
|
|---|
| 176 | /*
|
|---|
| 177 | `.menu-link` represents the responsive menu toggle that shows/hides on
|
|---|
| 178 | small screens.
|
|---|
| 179 | */
|
|---|
| 180 | .menu-link {
|
|---|
| 181 | position: fixed;
|
|---|
| 182 | display: block; /* show this only on small screens */
|
|---|
| 183 | top: 0;
|
|---|
| 184 | left: 0; /* "#menu width" */
|
|---|
| 185 | background: #000;
|
|---|
| 186 | background: rgba(0,0,0,0.7);
|
|---|
| 187 | font-size: 10px; /* change this value to increase/decrease button size */
|
|---|
| 188 | z-index: 10;
|
|---|
| 189 | width: 2em;
|
|---|
| 190 | height: auto;
|
|---|
| 191 | padding: 2.1em 1.6em;
|
|---|
| 192 | }
|
|---|
| 193 |
|
|---|
| 194 | .menu-link:hover,
|
|---|
| 195 | .menu-link:focus {
|
|---|
| 196 | background: #000;
|
|---|
| 197 | }
|
|---|
| 198 |
|
|---|
| 199 | .menu-link span {
|
|---|
| 200 | position: relative;
|
|---|
| 201 | display: block;
|
|---|
| 202 | }
|
|---|
| 203 |
|
|---|
| 204 | .menu-link span,
|
|---|
| 205 | .menu-link span:before,
|
|---|
| 206 | .menu-link span:after {
|
|---|
| 207 | background-color: #fff;
|
|---|
| 208 | width: 100%;
|
|---|
| 209 | height: 0.2em;
|
|---|
| 210 | }
|
|---|
| 211 |
|
|---|
| 212 | .menu-link span:before,
|
|---|
| 213 | .menu-link span:after {
|
|---|
| 214 | position: absolute;
|
|---|
| 215 | margin-top: -0.6em;
|
|---|
| 216 | content: " ";
|
|---|
| 217 | }
|
|---|
| 218 |
|
|---|
| 219 | .menu-link span:after {
|
|---|
| 220 | margin-top: 0.6em;
|
|---|
| 221 | }
|
|---|
| 222 |
|
|---|
| 223 |
|
|---|
| 224 | /* -- Responsive Styles (Media Queries) ------------------------------------- */
|
|---|
| 225 |
|
|---|
| 226 | /*
|
|---|
| 227 | Hides the menu at `48em`, but modify this based on your app's needs.
|
|---|
| 228 | */
|
|---|
| 229 | @media (min-width: 99999em) {
|
|---|
| 230 |
|
|---|
| 231 | .header,
|
|---|
| 232 | .content {
|
|---|
| 233 | padding-left: 2em;
|
|---|
| 234 | padding-right: 2em;
|
|---|
| 235 | }
|
|---|
| 236 |
|
|---|
| 237 | #layout {
|
|---|
| 238 | padding-left: 150px; /* left col width "#menu" */
|
|---|
| 239 | left: 0;
|
|---|
| 240 | }
|
|---|
| 241 | #menu {
|
|---|
| 242 | left: 150px;
|
|---|
| 243 | }
|
|---|
| 244 |
|
|---|
| 245 | .menu-link {
|
|---|
| 246 | position: fixed;
|
|---|
| 247 | left: 150px;
|
|---|
| 248 | display: none;
|
|---|
| 249 | }
|
|---|
| 250 |
|
|---|
| 251 | #layout.active .menu-link {
|
|---|
| 252 | left: 150px;
|
|---|
| 253 | }
|
|---|
| 254 | }
|
|---|
| 255 |
|
|---|
| 256 | @media (max-width: 99999em) {
|
|---|
| 257 | /* Only apply this when the window is small. Otherwise, the following
|
|---|
| 258 | case results in extra padding on the left:
|
|---|
| 259 | * Make the window small.
|
|---|
| 260 | * Tap the menu to trigger the active state.
|
|---|
| 261 | * Make the window large again.
|
|---|
| 262 | */
|
|---|
| 263 | #layout.active {
|
|---|
| 264 | position: relative;
|
|---|
| 265 | left: 150px;
|
|---|
| 266 | }
|
|---|
| 267 | }
|
|---|