summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorsoutherntofu <southerntofu@squat.net>2019-02-15 11:35:56 +0000
committersoutherntofu <southerntofu@squat.net>2019-02-15 11:35:56 +0000
commitdc41cdf016c4c2022e74e4bdd103094cdefcc513 (patch)
treeb130048a95018ae32fb42b855f41cbc5203cf035 /pages
parent374b125cac18198250fdec4e40e8f570e5c1c95f (diff)
Make header responsive (fix #11)
Diffstat (limited to 'pages')
-rw-r--r--pages/assets/_new.scss62
-rw-r--r--pages/assets/style.scss6
2 files changed, 67 insertions, 1 deletions
diff --git a/pages/assets/_new.scss b/pages/assets/_new.scss
new file mode 100644
index 0000000..7add150
--- /dev/null
+++ b/pages/assets/_new.scss
@@ -0,0 +1,62 @@
+// Variables
+
+$main-v-spacing: 1rem;
+
+// Header variables
+
+// Free one line at the top of the page
+$header-padding: $main-v-spacing 0 0 0;
+$header-bg-color: #555;
+$header-color: #fff;
+$header-title-margin: 1rem 0;
+$header-title-size: inherit;
+
+// Navigation menu variables
+
+$nav-color: $header-color;
+$nav-bg-color: $header-bg-color;
+$nav-item-size: 1.5rem;
+$nav-item-padding: 0.6rem 1.2rem;
+// On smaller screen, choose between horizontal (row) and vertical (column) menu
+$nav-small-direction: column;
+
+// Nav menu
+
+header {
+ grid-area: header;
+ padding: $header-padding;
+ background-color: $header-bg-color;
+ text-align: center;
+
+ @include gradient-vertical(lighten($header-bg-color,8%),$header-bg-color);
+ box-shadow: inset 0 0 8px 1px darken($header-bg-color, 8%);
+ box-shadow-top: 0;
+
+ > h1 {
+ color: $header-color;
+ font-weight: bold;
+ margin: $header-title-margin;
+ }
+}
+
+.nav-menu {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ @media (max-width: $small-screen) {
+ flex-direction: $nav-small-direction;
+ }
+}
+
+// If we don't add the "a" here, on hover styles won't be affected
+a.nav-item {
+ font-size: $nav-item-size;
+ padding: $nav-item-padding;
+ color: $nav-color;
+ background-color: $nav-bg-color;
+ font-weight: bold;
+ &:first-child {
+ background-color: $nav-color;
+ color: $nav-bg-color;
+ }
+}
diff --git a/pages/assets/style.scss b/pages/assets/style.scss
index c3cade1..cce3fd9 100644
--- a/pages/assets/style.scss
+++ b/pages/assets/style.scss
@@ -55,4 +55,8 @@ $well-bg-color: #fff;
$well-border-color: #555;
@import "mixins";
-@import "leap"; \ No newline at end of file
+@import "leap";
+
+// Trying not to break stuff, we just add things for now
+// Then we'll merge _new.scss into _leap.scss
+@import "new";