diff --git a/.eleventy.js b/.eleventy.js index 5426c05f2decf67d40b91238fa33dc7f22a73eaf..9a3421699285ce8b5f614436312600e21d86c5e5 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -13,9 +13,11 @@ module.exports = function(eleventyConfig) { eleventyConfig.addLayoutAlias("page", "layouts/page.liquid"); eleventyConfig.addPassthroughCopy("favicon.ico"); - eleventyConfig.addPassthroughCopy("assets"); + eleventyConfig.addPassthroughCopy("resume.pdf"); eleventyConfig.addPassthroughCopy({"assets/images": "images"}); eleventyConfig.addPassthroughCopy({"assets/files": "files"}); + eleventyConfig.addPassthroughCopy({"assets/css": "css"}); + eleventyConfig.addPassthroughCopy({"assets/js": "js"}); const markdownItRenderer = new _markdown({ html: true }) .use(require('markdown-it-prism'), { plugins: ["autoloader"] }) diff --git a/Makefile b/Makefile index df5fafc6830162eab6c9f0074e317c9117c415f1..48f437c58c5a4d05d78c182b9e3e289f1995a903 100644 --- a/Makefile +++ b/Makefile @@ -31,8 +31,9 @@ deploy: prune install assets/css/styles.css ${NPX} @11ty/eleventy git add -f _site/ git commit -m 'deploy' - git subtree split --prefix _site -b main - git push -f deploy main:main + git subtree split --prefix _site -b temp + git push -f deploy temp:main + git branch -D temp git reset HEAD~ prune: diff --git a/_includes/head.liquid b/_includes/head.liquid index 98174ddcd9a78e677711eea71409c8ec9e93a321..5e261a702891d58b7b556627d6c098cf9da349db 100644 --- a/_includes/head.liquid +++ b/_includes/head.liquid @@ -51,7 +51,7 @@ - + diff --git a/assets/js/utils.js b/assets/js/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..282f8efe221d0e52f50e61fd68b4d31b15fd3e10 --- /dev/null +++ b/assets/js/utils.js @@ -0,0 +1,61 @@ +var ElementUtil = {}; + +ElementUtil.createElement = function(html) { + var fragment = document.createDocumentFragment(); + var temp = document.createElement('div'); + temp.innerHTML = html; + while (temp.firstChild) { + fragment.appendChild(temp.firstChild); + } + + return fragment; +}; + +ElementUtil.clearElement = function(element) { + while (element.firstChild) { + element.removeChild(element.firstChild); + } +}; + +var StringUtil = {}; + +StringUtil.format = function(string, value) { + return string.replace(/\${}/g, value); +}; + +StringUtil.titleize = function(string) { + return string.split("_").join(" ") + .split("-").join(" ") + .replace(/([a-z])([A-Z])/g, "$1 $2") + .replace(/([A-Z])([A-Z][a-z])/g, "$1 $2"); +}; + +var UrlUtil = {}; + +UrlUtil.stringToArguments = function(args) { + var array = args.split("&"); + var args = {}; + for (var i = 0; i < array.length; i++) { + if (array[i].indexOf("=") >= 0) { + var argArray = array[i].split("="); + args[argArray[0]] = argArray[1]; + } else args[array[i]] = true; + } + + return args; +}; + +UrlUtil.argumentsToString = function(args) { + var string = ""; + for (var i in args) { + string += i + "=" + args[i] + "&"; + } + + return string.substring(0, string.length - 1); +}; + +UrlUtil.getCurrentArguments = function() { + if (window.location.search) + return UrlUtil.stringToArguments(window.location.search.replace("?", "")); + else return {}; +}; diff --git a/meta/CNAME.njk b/meta/CNAME.njk new file mode 100644 index 0000000000000000000000000000000000000000..eeddbd0bad70b6b5ce9111e9baa23c9f2671f4ea --- /dev/null +++ b/meta/CNAME.njk @@ -0,0 +1,5 @@ +--- +permalink: /CNAME +eleventyExcludeFromCollections: true +--- +{{ meta.domainurl.split('/') | last }} \ No newline at end of file diff --git a/pages/index.html b/pages/index.html index b70924b979b1555d458e5ccceabe40cbff1b2553..d18bf1710360a61392466b5cbb29618b19770577 100644 --- a/pages/index.html +++ b/pages/index.html @@ -17,7 +17,7 @@ permalink: /

The main purpose of this site is to document my work in order to make it more accessible to the public. It also serves as a basic portfolio - if you are interested in hiring me, you can find - my resume here, along with a few ways to contact me. + my resume here, along with a few ways to contact me.

{% assign links = "twitter fediverse github linkedin" | split: " " %} diff --git a/assets/files/resume.pdf b/resume.pdf similarity index 100% rename from assets/files/resume.pdf rename to resume.pdf