Skip to content

Commit

Permalink
QOL improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwaler committed Feb 14, 2021
1 parent df7c118 commit e4b48a6
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = (config) => {
config.addPassthroughCopy({ 'src/assets': 'assets' })
config.addPassthroughCopy({ 'public': './' })
config.setBrowserSyncConfig({
files: ['dist/**/*'],
open: true,
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions src/_bundle/main.pcss
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
@import "tailwindcss/base";
@import "./styles/base.pcss";

@import "tailwindcss/components";
@import "./styles/components.pcss";

@import "tailwindcss/utilities";
@import "./styles/utilities.pcss";
1 change: 1 addition & 0 deletions src/_bundle/styles/base.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* Custom Base Styles Go Here. */
1 change: 1 addition & 0 deletions src/_bundle/styles/components.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* Custom Components Go Here. */
1 change: 1 addition & 0 deletions src/_bundle/styles/utilities.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* Custom Utilities Go Here. */
4 changes: 4 additions & 0 deletions src/_data/navigation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = [
{ name: 'Home', route: '/' },
{ name: 'About', route: '/about/' },
]
21 changes: 8 additions & 13 deletions src/_includes/header.njk
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
<nav class="bg-gray-100">
<div class="container py-4 space-x-2">
<a
class="{{ 'font-black' if page.url == '/' }}"
href="/"
>
Home
</a>
<a
class="{{ 'font-black' if page.url == '/about/' }}"
href="/about"
>
About
</a>

{% for item in navigation %}
<a
class="{{ 'font-black' if page.url == item.route }}"
href="{{ item.route }}"
>
{{ item.name }}
</a>
{% endfor %}
</div>
</nav>
6 changes: 5 additions & 1 deletion src/_includes/layout.njk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
</head>
<body class="{{ 'debug-screens' if env.devMode }}">
{% include 'header.njk' %}
{% block body %}{% endblock %}
{% block body %}
<div class="container py-8">
{{ content | safe }}
</div>
{% endblock %}
</body>
</html>
9 changes: 9 additions & 0 deletions src/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: About
layout: layout.njk
---

<!-- This page is written in markdown! -->

# This is the {{ title }} page.

8 changes: 0 additions & 8 deletions src/about.njk

This file was deleted.

2 changes: 2 additions & 0 deletions src/index.njk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{# This page is built with nunjucks! #}

{% set title = 'Home' %}
{% extends "layout.njk" %}

Expand Down

0 comments on commit e4b48a6

Please sign in to comment.