From 3da1f74f98f954348873b9ae8183a8a2c3a987aa Mon Sep 17 00:00:00 2001
From: Neil Brommer 
Date: Thu, 6 Jul 2023 16:24:56 -0700
Subject: [PATCH] Rewrite site with 11ty
---
 .editorconfig                            |    9 +
 .eleventy.js                             |   61 +
 .gitignore                               |   33 +-
 .nova/Configuration.json                 |    3 +
 .nova/Tasks/Eleventy.json                |   21 +
 README.md                                |    6 +-
 archetypes/default.md                    |    6 -
 config.toml                              |    6 -
 content/_index.md                        |   11 -
 content/contact.md                       |   44 -
 content/links.md                         |   11 -
 content/resume.md                        |   91 -
 data/links.toml                          |   54 -
 data/projects.toml                       |   78 -
 data/social.toml                         |    2 -
 layouts/_default/single.html             |   22 -
 layouts/index.html                       |   26 -
 layouts/partials/htmlhead.html           |   41 -
 layouts/partials/linkCard.html           |   11 -
 layouts/partials/navbar.html             |   47 -
 layouts/partials/projectCard.html        |   24 -
 layouts/shortcodes/linkCardList.html     |    9 -
 package-lock.json                        | 4232 ++++++++++++++++++++++
 package.json                             |   25 +
 src/_data/layout.js                      |    1 +
 src/_data/projects.json                  |   46 +
 src/_data/socialLinks.json               |   17 +
 src/_includes/layouts/layout.njk         |   87 +
 src/_sections/Colors.njk                 |   30 +
 src/_sections/Contact.md                 |   11 +
 src/_sections/Projects.njk               |   25 +
 src/_sections/_sections.11tydata.json    |    3 +
 src/_sections/main.md                    |    7 +
 src/css/Components/_base.scss            |   71 +
 src/css/Components/_bootstrap-icons.scss |    5 +
 src/css/Components/_card.scss            |   46 +
 src/css/Components/_code.scss            |   19 +
 src/css/Components/_color-block.scss     |   22 +
 src/css/Components/_columns.scss         |   61 +
 src/css/Components/_headings.scss        |    8 +
 src/css/Components/_lists.scss           |   18 +
 src/css/Components/_mobile-header.scss   |   43 +
 src/css/Components/_navbar.scss          |  117 +
 src/css/Components/_variables.scss       |   95 +
 src/css/site.scss                        |   13 +
 src/index.njk                            |   18 +
 src/js/site.js                           |   48 +
 src/resume.md                            |   48 +
 static/NeilBrommer-WebResume.pdf         |  Bin 146538 -> 0 bytes
 static/contact.php                       |  113 -
 static/css/index.css                     |   26 -
 static/css/main.css                      |  149 -
 static/favicon.ico                       |  Bin 5558 -> 0 bytes
 static/img/trianglify.svg                |    1 -
 static/js/contact.js                     |   65 -
 static/js/main.js                        |   67 -
 56 files changed, 5242 insertions(+), 911 deletions(-)
 create mode 100644 .editorconfig
 create mode 100644 .eleventy.js
 create mode 100644 .nova/Configuration.json
 create mode 100644 .nova/Tasks/Eleventy.json
 delete mode 100644 archetypes/default.md
 delete mode 100644 config.toml
 delete mode 100644 content/_index.md
 delete mode 100644 content/contact.md
 delete mode 100644 content/links.md
 delete mode 100644 content/resume.md
 delete mode 100644 data/links.toml
 delete mode 100644 data/projects.toml
 delete mode 100644 data/social.toml
 delete mode 100644 layouts/_default/single.html
 delete mode 100644 layouts/index.html
 delete mode 100644 layouts/partials/htmlhead.html
 delete mode 100644 layouts/partials/linkCard.html
 delete mode 100644 layouts/partials/navbar.html
 delete mode 100644 layouts/partials/projectCard.html
 delete mode 100644 layouts/shortcodes/linkCardList.html
 create mode 100644 package-lock.json
 create mode 100644 package.json
 create mode 100644 src/_data/layout.js
 create mode 100644 src/_data/projects.json
 create mode 100644 src/_data/socialLinks.json
 create mode 100644 src/_includes/layouts/layout.njk
 create mode 100644 src/_sections/Colors.njk
 create mode 100644 src/_sections/Contact.md
 create mode 100644 src/_sections/Projects.njk
 create mode 100644 src/_sections/_sections.11tydata.json
 create mode 100644 src/_sections/main.md
 create mode 100644 src/css/Components/_base.scss
 create mode 100644 src/css/Components/_bootstrap-icons.scss
 create mode 100644 src/css/Components/_card.scss
 create mode 100644 src/css/Components/_code.scss
 create mode 100644 src/css/Components/_color-block.scss
 create mode 100644 src/css/Components/_columns.scss
 create mode 100644 src/css/Components/_headings.scss
 create mode 100644 src/css/Components/_lists.scss
 create mode 100644 src/css/Components/_mobile-header.scss
 create mode 100644 src/css/Components/_navbar.scss
 create mode 100644 src/css/Components/_variables.scss
 create mode 100644 src/css/site.scss
 create mode 100644 src/index.njk
 create mode 100644 src/js/site.js
 create mode 100644 src/resume.md
 delete mode 100644 static/NeilBrommer-WebResume.pdf
 delete mode 100644 static/contact.php
 delete mode 100644 static/css/index.css
 delete mode 100644 static/css/main.css
 delete mode 100644 static/favicon.ico
 delete mode 100644 static/img/trianglify.svg
 delete mode 100644 static/js/contact.js
 delete mode 100644 static/js/main.js
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..95016e1
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+
+[*.{html,njk,js,scss,css}]
+indent_style = tab
+trim_trailing_whitespace = true
diff --git a/.eleventy.js b/.eleventy.js
new file mode 100644
index 0000000..f246a3f
--- /dev/null
+++ b/.eleventy.js
@@ -0,0 +1,61 @@
+const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
+const eleventySass = require("eleventy-sass");
+const mdDefList = require("markdown-it-deflist");
+
+module.exports = function (eleventyConfig) {
+	eleventyConfig.setBrowserSyncConfig({
+		files: "./_site/css/**/*.css",
+	});
+	eleventyConfig.addPassthroughCopy({
+		"node_modules/bootstrap-icons/bootstrap-icons.svg":
+			"images/bootstrap-icons.svg",
+		"node_modules/@fortawesome/fontawesome-free/sprites":
+			"images/fontawesome",
+		"src/js/site.js": "js/site.js"
+	});
+	eleventyConfig.addPlugin(eleventyNavigationPlugin);
+	eleventyConfig.addPlugin(eleventySass, {
+		sass: {
+			loadPaths: ["node_modules"],
+		},
+	});
+	eleventyConfig.amendLibrary("md", mdLib => mdLib.use(mdDefList));
+
+	eleventyConfig.addFilter("IsNotPage", (collection, url) =>
+		collection.filter(item => item.url != url));
+	eleventyConfig.addFilter("IsMainPageSection", (collection) => {
+		return collection.filter(item => !item.url || item.url.startsWith("/_sections"));
+	});
+	eleventyConfig.addFilter("IsNotMainPageSection", (collection) => {
+		return collection.filter(item => item.url != null && (item.data.tags == null || !item.data.tags.includes("MainPage")));
+	});
+	eleventyConfig.addFilter("orderBySectionOrder", (collection) =>
+		collection.sort((a, b) => a.data.sectionOrder - b.data.sectionOrder)
+	);
+	eleventyConfig.addFilter("filterDrafts", collection => {
+		if (process.env.BUILD_DRAFTS === true) {
+			console.log("Skipping filtering drafts");
+
+			return collection;
+		}
+
+		return collection.filter(item => {
+			console.log(item);
+
+			if (item.data.draft != null) {
+				return !item.data.draft;
+			}
+
+			return true;
+		});
+	});
+	eleventyConfig.addFilter("log", (value) => console.log(value));
+
+	console.log("BUILD_DRAFTS: " + process.env.BUILD_DRAFTS);
+
+	return {
+		dir: {
+			input: "src",
+		},
+	};
+};
diff --git a/.gitignore b/.gitignore
index 8211b42..342af1e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,29 @@
-static/lib/
-static/info.php
-.vscode/
-public/
+# Node.js files
+node_modules/
+
+# Built files
+/_site/
+
+# MacOS files
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
diff --git a/.nova/Configuration.json b/.nova/Configuration.json
new file mode 100644
index 0000000..0db3279
--- /dev/null
+++ b/.nova/Configuration.json
@@ -0,0 +1,3 @@
+{
+
+}
diff --git a/.nova/Tasks/Eleventy.json b/.nova/Tasks/Eleventy.json
new file mode 100644
index 0000000..993b2fc
--- /dev/null
+++ b/.nova/Tasks/Eleventy.json
@@ -0,0 +1,21 @@
+{
+  "actions" : {
+    "build" : {
+      "enabled" : true,
+      "script" : "npm install\nnpm run build"
+    },
+    "clean" : {
+      "enabled" : true,
+      "script" : "rm -r _site\nnpm clean-install"
+    },
+    "run" : {
+      "enabled" : true,
+      "script" : "npm install\nnpm start"
+    }
+  },
+  "environment" : {
+    "BUILD_DRAFTS" : "false"
+  },
+  "openLogOnRun" : "fail",
+  "persistent" : true
+}
diff --git a/README.md b/README.md
index 28c8a1b..2863679 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-# Personal Website
+# Personal Site
 
-The files for my personal site at [neilbrommer.com](https://neilbrommer.com).
+The source for my personal website at [neilbrommer.com](https://neilbrommer.com).
 
-Built using [Hugo](https://gohugo.io/), [Bootstrap 4](https://getbootstrap.com/) and [FontAwesome 5](https://fontawesome.com/).
+Built using [11ty](https://www.11ty.dev/).
diff --git a/archetypes/default.md b/archetypes/default.md
deleted file mode 100644
index 9b13f30..0000000
--- a/archetypes/default.md
+++ /dev/null
@@ -1,6 +0,0 @@
-+++
-title = "{{ replace .Name '-' ' ' | title }}"
-date = {{ .Date }}
-draft = true
-+++
-
diff --git a/config.toml b/config.toml
deleted file mode 100644
index 804519c..0000000
--- a/config.toml
+++ /dev/null
@@ -1,6 +0,0 @@
-languageCode = "en-us"
-title = "Neil Brommer"
-baseURL = "https://neilbrommer.com/"
-enableGitInfo = true
-enableRobotsTXT = true
-googleAnalytics = "UA-105178749-1"
diff --git a/content/_index.md b/content/_index.md
deleted file mode 100644
index 46ed365..0000000
--- a/content/_index.md
+++ /dev/null
@@ -1,11 +0,0 @@
-+++
-title = "Neil Brommer"
-date = 2018-05-12T09:37:22-07:00
-draft = false
-[menu]
-	[menu.main]
-	title = "Home"
-	weight = -100
-+++
-
-Recent graduate from Eastern Washington University with a Bachelor of Science in Computer Science
diff --git a/content/contact.md b/content/contact.md
deleted file mode 100644
index 81a39b8..0000000
--- a/content/contact.md
+++ /dev/null
@@ -1,44 +0,0 @@
-+++
-title = "Contact"
-date = 2018-05-12T11:58:21-07:00
-draft = false
-[menu]
-	[menu.main]
-	weight = -70
-+++
-
-Message sent successfully!
-
-
-
-
-
-
-
diff --git a/content/links.md b/content/links.md
deleted file mode 100644
index c83e167..0000000
--- a/content/links.md
+++ /dev/null
@@ -1,11 +0,0 @@
-+++
-title = "Links"
-date = 2018-05-12T14:28:21-07:00
-draft = false
-description = "A list of links (mostly to articles) that I find useful or interesting."
-[menu]
-	[menu.main]
-	weight = -80
-+++
-
-{{< linkCardList >}}
diff --git a/content/resume.md b/content/resume.md
deleted file mode 100644
index 7c6becc..0000000
--- a/content/resume.md
+++ /dev/null
@@ -1,91 +0,0 @@
-+++
-title = "Resume"
-date = 2018-05-12T11:48:46-07:00
-draft = false
-description = """
-References and more contact information available on request via the [contact page](/contact).
-
-PDF version available [here](/NeilBrommer-WebResume.pdf)"""
-[menu]
-	[menu.main]
-	weight = -90
-+++
-
-## Education
-
-
-	
-		
-			Eastern Washington University
-		
-		
-			Cheney, Washington
-		
-	
-		
-			Bachelor of Science in Computer Science, 3.52 GPA
-		
-		
-			2014 – 2018
-		
-	
-
-	
-		
-			Spokane Community College
-		
-		
-			Spokane, Washington
-		
-	
-		
-			Associate of Applied Science in Network Design and Administration, 3.13 GPA
-		
-		
-			2011 – 2013
-		
-	
-	- Object-Oriented Languages – Java, C#, C++-
- Object-Oriented design patterns-
- GUI Programming – JavaFX, WinForms, WPF-
- Databases – SQL, Database Design-
- Web Development – HTML, CSS, JavaScript, JQuery, PHP, REST APIs-
- Operating Systems – C, Unix, threads and processes, memory management-
- Software Engineering-
- Version Control Systems – Git-
- Network Programming – Network sockets, binary protocols-
- Data Mining-
- Linux Administration – Basic system maintenance, Email, DNS-
- Windows Administration – MS Exchange, Active Directory-
-
-
-## Projects
-
-See the [projects](/#projects) list
-
-
-## Certifications
-
-
-	
CCNA
-	
-		
-			Cisco Certified Network Administrator
-		
-		
-			September 2013 – 2016
-		
-	
-		{{ if isset .Params "description" }}
-			
-				
{{ .Title }}
-
-				{{ .Params.description | markdownify }}
-			
-		{{ else }}
-			
{{ .Title }}
-		{{ end }}
-
-		{{.Content}}
-