feat: now using flex for the 11ty-nav

This commit is contained in:
Laureηt 2021-10-08 18:32:15 +02:00
parent a5ca24deeb
commit 51ebee945e
No known key found for this signature in database
GPG key ID: D88C6B294FD40994
6 changed files with 15 additions and 23 deletions

View file

@ -1,6 +1,5 @@
const pluginNavigation = require("@11ty/eleventy-navigation") const pluginNavigation = require("@11ty/eleventy-navigation")
const htmlmin = require("html-minifier"); const htmlmin = require("html-minifier");
const markdownIt = require("markdown-it"); const markdownIt = require("markdown-it");
const markdownItAttrs = require('markdown-it-attrs'); const markdownItAttrs = require('markdown-it-attrs');
const options = { const options = {

4
.vscode/launch.json vendored
View file

@ -4,9 +4,9 @@
{ {
"type": "node", "type": "node",
"request": "launch", "request": "launch",
"name": "Launch via NPM", "name": "Serve the website",
"console": "integratedTerminal", "console": "integratedTerminal",
"runtimeExecutable": "npm", "runtimeExecutable": "yarn",
"runtimeArgs": [ "runtimeArgs": [
"run", "run",
"start" "start"

View file

@ -6,7 +6,7 @@
"scripts": { "scripts": {
"watch:sass": "sass --no-source-map --watch src/scss:_site/css", "watch:sass": "sass --no-source-map --watch src/scss:_site/css",
"watch:eleventy": "eleventy --serve", "watch:eleventy": "eleventy --serve",
"build:sass": "sass --no-source-map src/scss:_site/css", "build:sass": "sass --no-source-map --style compressed src/scss:_site/css",
"build:eleventy": "ELEVENTY_ENV=prod eleventy", "build:eleventy": "ELEVENTY_ENV=prod eleventy",
"start": "npm-run-all build:sass --parallel watch:*", "start": "npm-run-all build:sass --parallel watch:*",
"build": "npm-run-all build:sass build:eleventy" "build": "npm-run-all build:sass build:eleventy"

View file

@ -23,8 +23,12 @@ username: Laureηt
<i class="blink" style="display:inline;">_</i> <i class="blink" style="display:inline;">_</i>
</header> </header>
<nav id="11ty-nav" role="navigation"> <nav role="navigation">
{{ collections.all | eleventyNavigation | eleventyNavigationToHtml | safe }} <div class="11ty-nav">
{% for entry in collections.all | eleventyNavigation %}
<a href="{{ entry.url | url }}">{{ entry.title }}</a>
{% endfor %}
</div>
<hr> <hr>
</nav> </nav>

View file

@ -4,7 +4,13 @@ hr {
} }
nav { nav {
div {
display: flex;
gap: 1rem;
}
hr { hr {
margin: 0.5rem 0 2rem 0;
visibility: visible; visibility: visible;
} }
} }

View file

@ -85,23 +85,6 @@ video {
margin: 0 auto; margin: 0 auto;
} }
nav {
ul {
list-style: none;
padding: 0;
margin: 1em 0 0 0;
li {
display: inline;
margin-right: .5em;
}
}
hr {
margin: 0.5rem 0 2rem 0;
}
}
@media only screen and (max-width: 64rem) { @media only screen and (max-width: 64rem) {
body { body {
width: calc(100% - 4rem); width: calc(100% - 4rem);