huge restructure to give flexibility with blog posts and mobile layouts
This commit is contained in:
		
							
								
								
									
										10
									
								
								.eleventy.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								.eleventy.js
									
									
									
									
									
								
							@ -4,6 +4,16 @@ module.exports = function (eleventyConfig) {
 | 
				
			|||||||
  eleventyConfig.addPassthroughCopy("./src/_assets/fonts");
 | 
					  eleventyConfig.addPassthroughCopy("./src/_assets/fonts");
 | 
				
			||||||
  eleventyConfig.addPassthroughCopy("./src/_assets/js");
 | 
					  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 {
 | 
					  return {
 | 
				
			||||||
    passthroughFileCopy: true,
 | 
					    passthroughFileCopy: true,
 | 
				
			||||||
    dir: {
 | 
					    dir: {
 | 
				
			||||||
 | 
				
			|||||||
@ -24,6 +24,10 @@
 | 
				
			|||||||
  /* --text-light: #585858; */
 | 
					  /* --text-light: #585858; */
 | 
				
			||||||
  --border: #6a826a;
 | 
					  --border: #6a826a;
 | 
				
			||||||
  --accent: #aa5757;
 | 
					  --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 {
 | 
					html {
 | 
				
			||||||
@ -36,17 +40,21 @@ html {
 | 
				
			|||||||
/* Format headers */
 | 
					/* Format headers */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
h1 {
 | 
					h1 {
 | 
				
			||||||
  font-size: 2.5rem;
 | 
					  font-size: 1.8rem;
 | 
				
			||||||
 | 
					  margin-top: 15px;
 | 
				
			||||||
 | 
					  margin-bottom: 15px;
 | 
				
			||||||
  color: var(--header-text);
 | 
					  color: var(--header-text);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
h2 {
 | 
					h2 {
 | 
				
			||||||
  font-size: 2rem;
 | 
					  font-size: 1.5rem;
 | 
				
			||||||
  margin-top: 3rem;
 | 
					  margin-top: var(--line-padding);
 | 
				
			||||||
 | 
					  margin-bottom: var(--line-padding);
 | 
				
			||||||
  color: var(--header-text);
 | 
					  color: var(--header-text);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
h3 {
 | 
					h3 {
 | 
				
			||||||
 | 
					  font-size: 1.2rem;
 | 
				
			||||||
  color: var(--header-text);
 | 
					  color: var(--header-text);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -54,20 +62,26 @@ h3 {
 | 
				
			|||||||
a,
 | 
					a,
 | 
				
			||||||
a:visited {
 | 
					a:visited {
 | 
				
			||||||
  color: var(--accent);
 | 
					  color: var(--accent);
 | 
				
			||||||
 | 
					  display: inline-block;
 | 
				
			||||||
 | 
					  transition: transform .07s ease-out;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
a:hover {
 | 
					a:hover {
 | 
				
			||||||
  text-decoration: none;
 | 
					  text-decoration: none;
 | 
				
			||||||
 | 
					  transform: translate(0px,-2px);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					a:has(img):hover {
 | 
				
			||||||
 | 
					  transform: none;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
hr {
 | 
					hr {
 | 
				
			||||||
  border: 1px solid var(--border);
 | 
					  border-top: 5px solid var(--border);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
body {
 | 
					body {
 | 
				
			||||||
  color: var(--text);
 | 
					  color: var(--text);
 | 
				
			||||||
  background: var(--bg);
 | 
					  background: var(--bg);
 | 
				
			||||||
  /* background-image: url("/img/l_ash02_big.jpg"); */
 | 
					 | 
				
			||||||
  background-size: cover;
 | 
					  background-size: cover;
 | 
				
			||||||
  background-attachment: fixed;
 | 
					  background-attachment: fixed;
 | 
				
			||||||
  line-height: 1.3;
 | 
					  line-height: 1.3;
 | 
				
			||||||
@ -75,22 +89,27 @@ body {
 | 
				
			|||||||
  justify-content: center;
 | 
					  justify-content: center;
 | 
				
			||||||
  flex-wrap: wrap;
 | 
					  flex-wrap: wrap;
 | 
				
			||||||
  gap: 20px;
 | 
					  gap: 20px;
 | 
				
			||||||
  margin: 20px;
 | 
					  min-height: 100vh;
 | 
				
			||||||
  height: 100%;
 | 
					 | 
				
			||||||
  /* padding: 0 1em; */
 | 
					 | 
				
			||||||
  /* font-size: 1.15rem; */
 | 
					 | 
				
			||||||
  /* align-items: flex-start; */
 | 
					  /* align-items: flex-start; */
 | 
				
			||||||
 | 
					  /* background-image: url("/img/l_ash02_big.jpg"); */
 | 
				
			||||||
 | 
					  /* font-size: 1.15rem; */
 | 
				
			||||||
 | 
					  /* height: 100vh; */
 | 
				
			||||||
 | 
					  /* margin: 20px; */
 | 
				
			||||||
 | 
					  /* padding: 0 1em; */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
main {
 | 
					main {
 | 
				
			||||||
  /* // margin: 0 auto; */
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  flex-direction: column;
 | 
				
			||||||
 | 
					  justify-content: space-between;
 | 
				
			||||||
  background: var(--container);
 | 
					  background: var(--container);
 | 
				
			||||||
  width: 750px;
 | 
					  width: var(--content-column-width);
 | 
				
			||||||
  padding: 15px;
 | 
					  padding: 15px;
 | 
				
			||||||
  height: min-content;
 | 
					  min-height: max-content;
 | 
				
			||||||
  /* border: 2px solid var(--border); */
 | 
					 | 
				
			||||||
  border-radius: 15px;
 | 
					 | 
				
			||||||
  box-sizing: border-box;
 | 
					  box-sizing: border-box;
 | 
				
			||||||
 | 
					  /* // margin: 0 auto; */
 | 
				
			||||||
 | 
					  /* border: 2px solid var(--border); */
 | 
				
			||||||
 | 
					  /* border-radius: 15px; */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -98,9 +117,9 @@ aside {
 | 
				
			|||||||
  position: sticky;
 | 
					  position: sticky;
 | 
				
			||||||
  height: min-content;
 | 
					  height: min-content;
 | 
				
			||||||
  top: 20px;
 | 
					  top: 20px;
 | 
				
			||||||
  width: 200px;
 | 
					  width: var(--sidebar-column-width);
 | 
				
			||||||
  margin-top: 30px;
 | 
					  margin-top: 30px;
 | 
				
			||||||
  display:flex;
 | 
					  display: flex;
 | 
				
			||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
  align-items: center;
 | 
					  align-items: center;
 | 
				
			||||||
  /* border: 2px solid var(--border); */
 | 
					  /* border: 2px solid var(--border); */
 | 
				
			||||||
@ -108,12 +127,18 @@ aside {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
.profile-img {
 | 
					.profile-img {
 | 
				
			||||||
  width: 100px;
 | 
					  width: 100px;
 | 
				
			||||||
  border-radius: 50px;
 | 
					  border-radius: 60px;
 | 
				
			||||||
 | 
					  border: 5px solid var(--border);
 | 
				
			||||||
  /* top: -70px; */
 | 
					  /* top: -70px; */
 | 
				
			||||||
  z-index: 1;
 | 
					  z-index: 1;
 | 
				
			||||||
  position: relative;
 | 
					  position: relative;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					nav {
 | 
				
			||||||
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  flex-direction: column;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.sidebar-contents {
 | 
					.sidebar-contents {
 | 
				
			||||||
  padding: 65px 15px 15px 15px;
 | 
					  padding: 65px 15px 15px 15px;
 | 
				
			||||||
  border-radius: 15px;
 | 
					  border-radius: 15px;
 | 
				
			||||||
@ -129,23 +154,42 @@ aside {
 | 
				
			|||||||
  body {
 | 
					  body {
 | 
				
			||||||
    flex-direction: column-reverse;
 | 
					    flex-direction: column-reverse;
 | 
				
			||||||
    max-width: 100%;
 | 
					    max-width: 100%;
 | 
				
			||||||
 | 
					    justify-content: start;
 | 
				
			||||||
    /* this is a pretty bad solution */
 | 
					    /* this is a pretty bad solution */
 | 
				
			||||||
    margin: -20px 20px 20px;
 | 
					    margin: -20px 20px 20px;
 | 
				
			||||||
 | 
					    gap: 0;
 | 
				
			||||||
 | 
					    align-items: center;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  main {
 | 
					  main {
 | 
				
			||||||
    max-width: 100%;
 | 
					    max-width: 100%;
 | 
				
			||||||
 | 
					    flex-grow: 1;
 | 
				
			||||||
 | 
					    margin-bottom: -20px;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  aside {
 | 
					  aside {
 | 
				
			||||||
    position: relative;
 | 
					    position: relative;
 | 
				
			||||||
 | 
					    width: 100%;
 | 
				
			||||||
 | 
					    max-width: var(--content-column-width);
 | 
				
			||||||
 | 
					    margin-top: 0;
 | 
				
			||||||
 | 
					    padding-top: 5px;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  .sidebar-contents {
 | 
				
			||||||
 | 
					    border-radius: 0;
 | 
				
			||||||
 | 
					    width: 100%;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* nav {
 | 
					  .sidebar-contents>img{
 | 
				
			||||||
    display: flex;
 | 
					    display: none;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  nav {
 | 
				
			||||||
    flex-direction: row;
 | 
					    flex-direction: row;
 | 
				
			||||||
    gap: 1rem;
 | 
					    flex-wrap: wrap;
 | 
				
			||||||
  } */
 | 
					    gap: 0rem 1rem;
 | 
				
			||||||
 | 
					    width: 100%;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .sidebar-contents {
 | 
					  .sidebar-contents {
 | 
				
			||||||
    /* padding: 15px; */
 | 
					    /* padding: 15px; */
 | 
				
			||||||
@ -153,6 +197,9 @@ aside {
 | 
				
			|||||||
    /* width: min-content; */
 | 
					    /* width: min-content; */
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /* a:hover {
 | 
				
			||||||
 | 
					    transform: none;
 | 
				
			||||||
 | 
					  } */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
article>p {
 | 
					article>p {
 | 
				
			||||||
@ -160,6 +207,15 @@ article>p {
 | 
				
			|||||||
  margin-bottom: 0;
 | 
					  margin-bottom: 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					article>iframe {
 | 
				
			||||||
 | 
					  padding-top: var(--line-padding);
 | 
				
			||||||
 | 
					  padding-bottom: var(--line-padding);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					header>h1 {
 | 
				
			||||||
 | 
					  margin-top: 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* body > footer {
 | 
					/* body > footer {
 | 
				
			||||||
  margin-top: 4rem;
 | 
					  margin-top: 4rem;
 | 
				
			||||||
  padding: 2rem 1rem 1.5rem 1rem;
 | 
					  padding: 2rem 1rem 1.5rem 1rem;
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								src/_assets/img/143.gif
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/_assets/img/143.gif
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 44 KiB  | 
@ -19,14 +19,18 @@
 | 
				
			|||||||
  </head>
 | 
					  </head>
 | 
				
			||||||
  <body>
 | 
					  <body>
 | 
				
			||||||
    <main>
 | 
					    <main>
 | 
				
			||||||
      <header>{% include 'partials/header.njk' %}</header>
 | 
					      <div>
 | 
				
			||||||
      <hr/>
 | 
					        <header>{% include 'partials/header.njk' %}</header>
 | 
				
			||||||
      <article>
 | 
					        <hr/>
 | 
				
			||||||
          <h1>{{ title }}</h1>
 | 
					        <article>
 | 
				
			||||||
          {{ content | safe }}
 | 
					            <h1>{{ title }}</h1>
 | 
				
			||||||
      </article>
 | 
					            {{ content | safe }}
 | 
				
			||||||
      <hr/>
 | 
					        </article>
 | 
				
			||||||
      <footer>{% include 'partials/footer.njk' %}</footer>
 | 
					      </div>
 | 
				
			||||||
 | 
					      <footer>
 | 
				
			||||||
 | 
					        <hr/>
 | 
				
			||||||
 | 
					        {% include 'partials/footer.njk' %}
 | 
				
			||||||
 | 
					      </footer>
 | 
				
			||||||
    </main>
 | 
					    </main>
 | 
				
			||||||
    <aside>{% include 'partials/sidebar.njk' %}</aside>
 | 
					    <aside>{% include 'partials/sidebar.njk' %}</aside>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
<nav>
 | 
					<nav>
 | 
				
			||||||
  <a href="/">/</a><br/>
 | 
					  <a href="/">/</a>
 | 
				
			||||||
  <a href="/pages/">/pages</a><br/>
 | 
					  <a href="/pages/">/pages</a>
 | 
				
			||||||
  <a href="/about/">/about</a><br/>
 | 
					  <a href="/about/">/about</a>
 | 
				
			||||||
  <a href="/links/">/links</a><br/>
 | 
					  <a href="/links/">/links</a>
 | 
				
			||||||
  <a href="/contact/">/contact</a><br/>
 | 
					  <a href="/contact/">/contact</a>
 | 
				
			||||||
  <a href="/blog/">/blog</a><br/>
 | 
					  <a href="/blog/">/blog</a>
 | 
				
			||||||
</nav>
 | 
					</nav>
 | 
				
			||||||
{#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.#}
 | 
					{#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.#}
 | 
				
			||||||
@ -3,4 +3,5 @@
 | 
				
			|||||||
</a>
 | 
					</a>
 | 
				
			||||||
<div class="sidebar-contents">
 | 
					<div class="sidebar-contents">
 | 
				
			||||||
    {% include 'partials/navigation.njk' %}
 | 
					    {% include 'partials/navigation.njk' %}
 | 
				
			||||||
 | 
					    <img src="/_assets/img/143.gif"/>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
							
								
								
									
										4
									
								
								src/anime/anime.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								src/anime/anime.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "layout": "layout/blog",
 | 
				
			||||||
 | 
					    "tags": "anime"
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
@ -3,10 +3,3 @@ title: blog
 | 
				
			|||||||
layout: layout/base.njk
 | 
					layout: layout/base.njk
 | 
				
			||||||
eleventyImport.collections: ["blog"]
 | 
					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 %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<!-- post.data contents are at https://github.com/11ty/eleventy/discussions/2284 -->
 | 
					 | 
				
			||||||
							
								
								
									
										4
									
								
								src/climbing/climbing.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								src/climbing/climbing.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "layout": "layout/blog",
 | 
				
			||||||
 | 
					    "tags": "climbing"
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
							
								
								
									
										4
									
								
								src/games/games.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								src/games/games.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "layout": "layout/blog",
 | 
				
			||||||
 | 
					    "tags": "games"
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
							
								
								
									
										4
									
								
								src/keyboards/keyboards.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								src/keyboards/keyboards.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "layout": "layout/blog",
 | 
				
			||||||
 | 
					    "tags": "keyboards"
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
							
								
								
									
										4
									
								
								src/misc/misc.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								src/misc/misc.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "layout": "layout/blog",
 | 
				
			||||||
 | 
					    "tags": "misc"
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
							
								
								
									
										4
									
								
								src/movies/movies.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								src/movies/movies.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "layout": "layout/blog",
 | 
				
			||||||
 | 
					    "tags": "movies"
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
							
								
								
									
										16
									
								
								src/pages.md
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								src/pages.md
									
									
									
									
									
								
							@ -3,15 +3,9 @@ layout: layout/base.njk
 | 
				
			|||||||
title: pages
 | 
					title: pages
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% if collections.blog.length > 0 %}
 | 
					{% for tag in collections.tagsList %}
 | 
				
			||||||
blog posts
 | 
					  {{tag}}
 | 
				
			||||||
{% endif %}
 | 
					  {% for post in collections[tag] %}
 | 
				
			||||||
{% for post in collections.blog | reverse %}
 | 
					 \- [{{ post.data.title }}](/{{ tag }}/{{ post.data.page.fileSlug }})
 | 
				
			||||||
 \- [{{ post.data.title }}](/blog/{{ post.data.page.fileSlug }})
 | 
					  {% endfor %}
 | 
				
			||||||
{% endfor %}
 | 
					 | 
				
			||||||
{% if collections.music.length > 0 %}
 | 
					 | 
				
			||||||
music
 | 
					 | 
				
			||||||
{% endif %}
 | 
					 | 
				
			||||||
{% for post in collections.music | reverse %}
 | 
					 | 
				
			||||||
 \- [{{ post.data.title }}]({{ post.data.page.fileSlug }})
 | 
					 | 
				
			||||||
{% endfor %}
 | 
					{% endfor %}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user