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
-
-
- Networking with Cisco switches and routers, with basic Windows and Linux administration
-
-
-
-## Relevant Coursework and Skills
-
-
- - 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
-
-
- Cisco’s second level of computer networking certifications. Focuses on designing and managing routed and switched networks.
-
diff --git a/data/links.toml b/data/links.toml
deleted file mode 100644
index f480bfb..0000000
--- a/data/links.toml
+++ /dev/null
@@ -1,54 +0,0 @@
-[[link]]
- title = "Ok→Cancel versus Cancel→Ok"
- description = "A look at button ordering in GUIs from the Factorio blog"
- URL = "https://www.factorio.com/blog/post/fff-246"
-
-[[link]]
- title = "Principles of Lighting and Rendering with John Carmack at QuakeCon 2013"
- description = "John Carmack talking about various 3D rendering concepts."
- URL = "https://www.youtube.com/watch?v=IyUgHPs86XM"
-
-[[link]]
- title = "Why the Flash Crash Really Matters"
- description = "An article on the flash crash of 2010 and the high-frequency trading programs that caused it."
- URL = "http://nautil.us/issue/23/dominoes/why-the-flash-crash-really-matters"
-
-[[link]]
- title = "Algorithms and Bias: Q. and A. With Cynthia Dwork"
- description = "An interview with Cynthia Dwork of Microsoft Research on how algorithms show bias and where those biases come from."
- URL = "https://www.nytimes.com/2015/08/11/upshot/algorithms-and-bias-q-and-a-with-cynthia-dwork.html?abt=0002&abg=1"
-
-[[link]]
- title = "Origin of Quake3’s Fast InvSqrt()"
- description = "An article on the inverse square root function in Quake 3 looking into how it works and its history."
- URL = "https://www.beyond3d.com/content/articles/8/"
-
-[[link]]
- title = "Real Time Rendering: An Overview for Artists"
- description = "A look at various aspects of real time 3D rendering, especially in video games."
- URL = "https://jesshiderue4.wordpress.com/real-time-rendering-an-overview-for-artists/"
-
-[[link]]
- title = "Entering the Quantum Era—How Firefox got fast again and where it’s going to get faster"
- description = "An article that looks at various architectural changes to Firefox in version 57 and changes planned for future versions."
- URL = "https://hacks.mozilla.org/2017/11/entering-the-quantum-era-how-firefox-got-fast-again-and-where-its-going-to-get-faster/"
-
-[[link]]
- title = "The whole web at maximum FPS: How WebRender gets rid of jank "
- description = " An article that gives a high level description how Firefox’s new rendering engine works."
- URL = "https://hacks.mozilla.org/2017/10/the-whole-web-at-maximum-fps-how-webrender-gets-rid-of-jank/"
-
-[[link]]
- title = "Inside a super fast CSS engine: Quantum CSS (aka Stylo)"
- description = "A high level overview of how Firefox’s new CSS engine Stylo works."
- URL = "https://hacks.mozilla.org/2017/08/inside-a-super-fast-css-engine-quantum-css-aka-stylo/"
-
-[[link]]
- title = "The Judge’s Code"
- description = "An article on Judge William Alsup, who was the judge for the first Oracle v. Google case over whether an API can be copywritten, and is now the judge for the Waymo (Google) v. Uber."
- URL = "https://www.theverge.com/2017/10/19/16503076/oracle-vs-google-judge-william-alsup-interview-waymo-uber"
-
-[[link]]
- title = "LinkedIn Dark Patterns"
- description = "An in depth blog post detailing how LinkedIn used dark patterns to trick users."
- URL = "https://schlosser.io/writing/linkedin-dark-patterns/"
diff --git a/data/projects.toml b/data/projects.toml
deleted file mode 100644
index de57137..0000000
--- a/data/projects.toml
+++ /dev/null
@@ -1,78 +0,0 @@
-[[project]]
- title = "Growing Neighbors"
- incomplete = false
- description = "The website for the Growing Neighbors organization in Spokane, WA. I worked as part of a team building this site."
- [[project.links]]
- title = "Site"
- external = true
- URL = "https://growingneighbors.org/"
-
-[[project]]
- title = "Snippets"
- incomplete = true
- description = "A web based tool for managing reusable pieces of code and useful programming resources"
- [[project.links]]
- title = "Web Client"
- external = true
- URL = "https://snippets.neilbrommer.com/"
- [[project.links]]
- title = "Documentation"
- external = true
- URL = "https://snippets.neilbrommer.com/documentation.html"
- [[project.links]]
- title = "Source Code"
- external = true
- URL = "https://github.com/NeilBrommer/SnippetManager"
-
-[[project]]
- title = "Start"
- incomplete = false
- description = "A new tab page that displays lists of links using the browser's indexedDB to store all data"
- [[project.links]]
- title = "Site"
- external = true
- URL = "https://start.neilbrommer.com/"
- [[project.links]]
- title = "Source Code"
- external = true
- URL = "https://github.com/NeilBrommer/NewTabPage"
-
-[[project]]
- title = "Picture Viewer"
- incomplete = false
- description = "A Windows program for viewing image files written using C# and WPF"
- [[project.links]]
- title = "Source Code"
- external = true
- URL = "https://github.com/NeilBrommer/PictureViewer"
-
-[[project]]
- title = "Website"
- incomplete = false
- description = "The source code for this website"
- [[project.links]]
- title = "Source Code"
- external = true
- URL = "https://github.com/NeilBrommer/Personal-Site"
-
-[[project]]
- title = "Resume"
- incomplete = false
- description = "My [Resume](resume)"
- [[project.links]]
- title = "PDF"
- external = true
- URL = "/NeilBrommer-WebResume.pdf"
- [[project.links]]
- title = "Source Code"
- external = true
- URL = "https://github.com/NeilBrommer/Resume"
-
-[[project]]
- title = "Auto Dark"
- incomplete = false
- description = "A small utility for setting/toggling the Windows 10 dark theme. Useful in combination with the Windows Task Scheduler to automatically change the theme."
- [[project.links]]
- title = "Source Code"
- external = true
- URL = "https://github.com/NeilBrommer/WindowsAutoDark"
diff --git a/data/social.toml b/data/social.toml
deleted file mode 100644
index abe4eae..0000000
--- a/data/social.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-github = "https://github.com/NeilBrommer"
-linkedin = "https://www.linkedin.com/in/neilbrommer/"
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
deleted file mode 100644
index a1c5417..0000000
--- a/layouts/_default/single.html
+++ /dev/null
@@ -1,22 +0,0 @@
-{{ partial "htmlhead" . }}
-
-
-
- {{ partial "navbar" .}}
-
-
- {{ if isset .Params "description" }}
-
-
{{ .Title }}
-
- {{ .Params.description | markdownify }}
-
- {{ else }}
-
{{ .Title }}
- {{ end }}
-
- {{.Content}}
-
-
-
-