Skip to content

Commit

Permalink
Menu + yarn upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
jvdlaar committed Aug 6, 2020
1 parent 49756d6 commit 6d1c601
Show file tree
Hide file tree
Showing 10 changed files with 1,221 additions and 1,240 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10",
"webpack-merge": "^4.1.4"
}
},
"dependencies": {}
}
7 changes: 4 additions & 3 deletions site/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@

<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<base href="{{ if getenv "CONTEXT" }}{{ cond (eq "production" (getenv "CONTEXT")) (getenv "URL") (getenv "DEPLOY_PRIME_URL") }}{{ else }}{{ $.Site.BaseURL }}{{ end }}">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<base href="{{ if getenv "CONTEXT" }}{{ cond (eq "production" (getenv "CONTEXT")) (getenv "URL") (getenv "DEPLOY_PRIME_URL") }}{{ else }}{{ $.Site.BaseURL }}{{ end }}">

<link href="https://fonts.googleapis.com/css?family=Nunito+Sans:400,700" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet">

<!-- Favicons -->
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
Expand All @@ -31,4 +32,4 @@
{{ if .IsHome }}
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
{{ end }}
</head>
</head>
23 changes: 14 additions & 9 deletions site/layouts/partials/nav.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
<nav class="flex justify-between items-center center bg-white divider-grey relative">

<!-- Logo -->
<a href="/" class="pa3 db mr4 h-100 w8 flex-none">
<img src="/img/logo.png" alt="vvSchijf logo" class="br0 db mb0 w4-m w3"/>
</a>

<!-- Primary Nav -->
<ul class="flex b primary">
<li><a href="/lidmaatschap" class="pa3 no-underline db">Lidmaatschap</a></li>

<li><a href="/afgelastingen" class="pa3 no-underline db">Afgelastingen</a></li>
<!-- burger menu controlled by invisible checkbox -->
<input type="checkbox" id="burger" class="dn">
<label for="burger" class="dn-l bg-primary pa2 mv2 white b">
<i class="fa fa-bars"></i> Menu
</label>
<div class="menu db-l dn">
<!-- Primary Nav -->
<ul class="flex-l b primary">
<li><a href="/lidmaatschap" class="pa3 no-underline db">Lidmaatschap</a></li>

<li><a href="/oud-papier" class="pa3 no-underline db">Oud papier</a></li>
<li><a href="/afgelastingen" class="pa3 no-underline db">Afgelastingen</a></li>

<li><a href="/contact" class="pa3 no-underline db">Contact</a></li>
</ul>
<li><a href="/oud-papier" class="pa3 no-underline db">Oud papier</a></li>

<li><a href="/contact" class="pa3 no-underline db">Contact</a></li>
</ul>
</div>
</nav>
2 changes: 1 addition & 1 deletion src/css/imports/_forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ input, textarea {
line-height: normal;
}

label
form label
{
font-size: .875rem;
font-weight: 800;
Expand Down
16 changes: 16 additions & 0 deletions src/css/imports/_nav.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.menu {
transition: max-height 0.5s; /* show/hide menu transition */
}

/* when checkbox is checked, display menu (sibling element) */
#burger:checked ~ .menu {
display: block;
}

#burger ~ label {
cursor: pointer;
}

#burger:hover ~ label {
background-color: var(--primary-light);
}
1 change: 1 addition & 0 deletions src/css/imports/_variables.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:root {
/* Colors */
--primary: rgba(255, 0, 0, 1);
--primary-light: rgba(255, 90, 90, 1);
--vvschijf-yellow: rgba(255, 252, 0, 1);
--highlight: rgba(254, 213, 198, 1);
--white: rgba(255, 255, 255, 1);
Expand Down
1 change: 1 addition & 0 deletions src/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
@import './imports/_buttons';
@import './imports/_svg';
@import './imports/_cms';
@import './imports/_nav';

/* Variables */
/* Importing here will allow you to override any variables in the modules */
Expand Down
3 changes: 0 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// JS Goes here - ES6 supported

import "./css/main.css";

// Say hello
console.log("🦊 Hello! Edit me in src/index.js");
1 change: 1 addition & 0 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
entry: {
main: path.join(__dirname, "src", "index.js"),
cms: path.join(__dirname, "src", "js", "cms.js"),
app: path.join(__dirname, "src", "js", "app.js"),
},

output: {
Expand Down
Loading

0 comments on commit 6d1c601

Please sign in to comment.