diff --git a/.eleventy.js b/.eleventy.js index 10409af..b81d36b 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -4,6 +4,16 @@ module.exports = function (eleventyConfig) { eleventyConfig.addPassthroughCopy("./src/_assets/fonts"); eleventyConfig.addPassthroughCopy("./src/_assets/js"); + eleventyConfig.addCollection("tagsList", function(collectionApi) { + const tagsList = new Set(); + collectionApi.getAll().map( item => { + if (item.data.tags) { // handle pages that don't have tags + item.data.tags.map( tag => tagsList.add(tag)) + } + }); + return tagsList; + }); + return { passthroughFileCopy: true, dir: { diff --git a/src/_assets/css/styles.css b/src/_assets/css/styles.css index cd7c843..7ea76d1 100644 --- a/src/_assets/css/styles.css +++ b/src/_assets/css/styles.css @@ -24,6 +24,10 @@ /* --text-light: #585858; */ --border: #6a826a; --accent: #aa5757; + --content-column-width: 750px; + /* this width was 200 but i stretched it out to fit the gif */ + --sidebar-column-width: 287px; + --line-padding: 8px; } html { @@ -36,17 +40,21 @@ html { /* Format headers */ h1 { - font-size: 2.5rem; + font-size: 1.8rem; + margin-top: 15px; + margin-bottom: 15px; color: var(--header-text); } h2 { - font-size: 2rem; - margin-top: 3rem; + font-size: 1.5rem; + margin-top: var(--line-padding); + margin-bottom: var(--line-padding); color: var(--header-text); } h3 { + font-size: 1.2rem; color: var(--header-text); } @@ -54,20 +62,26 @@ h3 { a, a:visited { color: var(--accent); + display: inline-block; + transition: transform .07s ease-out; } a:hover { text-decoration: none; + transform: translate(0px,-2px); +} + +a:has(img):hover { + transform: none; } hr { - border: 1px solid var(--border); + border-top: 5px solid var(--border); } body { color: var(--text); background: var(--bg); - /* background-image: url("/img/l_ash02_big.jpg"); */ background-size: cover; background-attachment: fixed; line-height: 1.3; @@ -75,22 +89,27 @@ body { justify-content: center; flex-wrap: wrap; gap: 20px; - margin: 20px; - height: 100%; - /* padding: 0 1em; */ - /* font-size: 1.15rem; */ + min-height: 100vh; /* align-items: flex-start; */ + /* background-image: url("/img/l_ash02_big.jpg"); */ + /* font-size: 1.15rem; */ + /* height: 100vh; */ + /* margin: 20px; */ + /* padding: 0 1em; */ } main { - /* // margin: 0 auto; */ + display: flex; + flex-direction: column; + justify-content: space-between; background: var(--container); - width: 750px; + width: var(--content-column-width); padding: 15px; - height: min-content; - /* border: 2px solid var(--border); */ - border-radius: 15px; + min-height: max-content; box-sizing: border-box; + /* // margin: 0 auto; */ + /* border: 2px solid var(--border); */ + /* border-radius: 15px; */ } @@ -98,9 +117,9 @@ aside { position: sticky; height: min-content; top: 20px; - width: 200px; + width: var(--sidebar-column-width); margin-top: 30px; - display:flex; + display: flex; flex-direction: column; align-items: center; /* border: 2px solid var(--border); */ @@ -108,12 +127,18 @@ aside { .profile-img { width: 100px; - border-radius: 50px; + border-radius: 60px; + border: 5px solid var(--border); /* top: -70px; */ z-index: 1; position: relative; } +nav { + display: flex; + flex-direction: column; +} + .sidebar-contents { padding: 65px 15px 15px 15px; border-radius: 15px; @@ -129,23 +154,42 @@ aside { body { flex-direction: column-reverse; max-width: 100%; + justify-content: start; /* this is a pretty bad solution */ margin: -20px 20px 20px; + gap: 0; + align-items: center; } main { max-width: 100%; + flex-grow: 1; + margin-bottom: -20px; } aside { position: relative; + width: 100%; + max-width: var(--content-column-width); + margin-top: 0; + padding-top: 5px; + } + + .sidebar-contents { + border-radius: 0; + width: 100%; } - /* nav { - display: flex; + .sidebar-contents>img{ + display: none; + } + + nav { flex-direction: row; - gap: 1rem; - } */ + flex-wrap: wrap; + gap: 0rem 1rem; + width: 100%; + } .sidebar-contents { /* padding: 15px; */ @@ -153,6 +197,9 @@ aside { /* width: min-content; */ } + /* a:hover { + transform: none; + } */ } article>p { @@ -160,6 +207,15 @@ article>p { margin-bottom: 0; } +article>iframe { + padding-top: var(--line-padding); + padding-bottom: var(--line-padding); +} + +header>h1 { + margin-top: 0; +} + /* body > footer { margin-top: 4rem; padding: 2rem 1rem 1.5rem 1rem; diff --git a/src/_assets/img/143.gif b/src/_assets/img/143.gif new file mode 100644 index 0000000..3a9a251 Binary files /dev/null and b/src/_assets/img/143.gif differ diff --git a/src/_includes/layout/base.njk b/src/_includes/layout/base.njk index 62f6c97..f60826f 100644 --- a/src/_includes/layout/base.njk +++ b/src/_includes/layout/base.njk @@ -19,14 +19,18 @@
-
{% include 'partials/header.njk' %}
-
-
-

{{ title }}

- {{ content | safe }} -
-
- +
+
{% include 'partials/header.njk' %}
+
+
+

{{ title }}

+ {{ content | safe }} +
+
+
diff --git a/src/_includes/partials/navigation.njk b/src/_includes/partials/navigation.njk index fd3e60e..b8a5105 100644 --- a/src/_includes/partials/navigation.njk +++ b/src/_includes/partials/navigation.njk @@ -1,9 +1,9 @@ {#INFO: It's important to stucture your links with the slashes / on either side of the href /about/ to ensure the links are always from the root of the site.#} \ No newline at end of file diff --git a/src/_includes/partials/sidebar.njk b/src/_includes/partials/sidebar.njk index d7214b1..acaa36f 100644 --- a/src/_includes/partials/sidebar.njk +++ b/src/_includes/partials/sidebar.njk @@ -3,4 +3,5 @@ \ No newline at end of file diff --git a/src/anime/anime.json b/src/anime/anime.json new file mode 100644 index 0000000..0a4bc45 --- /dev/null +++ b/src/anime/anime.json @@ -0,0 +1,4 @@ +{ + "layout": "layout/blog", + "tags": "anime" + } \ No newline at end of file diff --git a/src/blog.md b/src/blog.md index 83c6ef8..00d07eb 100644 --- a/src/blog.md +++ b/src/blog.md @@ -3,10 +3,3 @@ title: blog layout: layout/base.njk eleventyImport.collections: ["blog"] --- - -These are all of my amazing blog posts, enjoy! - {% for post in collections.blog | reverse %} - - [{{ post.data.title }}]({{ post.data.page.fileSlug }}) - {% endfor %} - - \ No newline at end of file diff --git a/src/climbing/climbing.json b/src/climbing/climbing.json new file mode 100644 index 0000000..f1cf5e7 --- /dev/null +++ b/src/climbing/climbing.json @@ -0,0 +1,4 @@ +{ + "layout": "layout/blog", + "tags": "climbing" + } \ No newline at end of file diff --git a/src/games/games.json b/src/games/games.json new file mode 100644 index 0000000..1b4d6ea --- /dev/null +++ b/src/games/games.json @@ -0,0 +1,4 @@ +{ + "layout": "layout/blog", + "tags": "games" + } \ No newline at end of file diff --git a/src/keyboards/keyboards.json b/src/keyboards/keyboards.json new file mode 100644 index 0000000..5675094 --- /dev/null +++ b/src/keyboards/keyboards.json @@ -0,0 +1,4 @@ +{ + "layout": "layout/blog", + "tags": "keyboards" + } \ No newline at end of file diff --git a/src/misc/misc.json b/src/misc/misc.json new file mode 100644 index 0000000..6a5b3d9 --- /dev/null +++ b/src/misc/misc.json @@ -0,0 +1,4 @@ +{ + "layout": "layout/blog", + "tags": "misc" + } \ No newline at end of file diff --git a/src/movies/movies.json b/src/movies/movies.json new file mode 100644 index 0000000..d834d4c --- /dev/null +++ b/src/movies/movies.json @@ -0,0 +1,4 @@ +{ + "layout": "layout/blog", + "tags": "movies" + } \ No newline at end of file diff --git a/src/pages.md b/src/pages.md index a740bd1..9b4dd2f 100644 --- a/src/pages.md +++ b/src/pages.md @@ -3,15 +3,9 @@ layout: layout/base.njk title: pages --- -{% if collections.blog.length > 0 %} -blog posts -{% endif %} -{% for post in collections.blog | reverse %} - \- [{{ post.data.title }}](/blog/{{ post.data.page.fileSlug }}) -{% endfor %} -{% if collections.music.length > 0 %} -music -{% endif %} -{% for post in collections.music | reverse %} - \- [{{ post.data.title }}]({{ post.data.page.fileSlug }}) +{% for tag in collections.tagsList %} + {{tag}} + {% for post in collections[tag] %} + \- [{{ post.data.title }}](/{{ tag }}/{{ post.data.page.fileSlug }}) + {% endfor %} {% endfor %} \ No newline at end of file