Posts
-
-
-
+ {#if tags}
+
+ {/if}
- {#each posts.slice(1) as post (post.title)}
-
+ {#if !selectedTags.length || selectedTags.find(tag => posts[0].categories.includes(tag))}
+
+
+
+ {/if}
+
+
+ {#each filteredPosts as post (post.title)}
+
{/each}
@@ -53,6 +85,27 @@
max-width: 700px;
padding: 0 20px;
}
+ .tags {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.5rem;
+ }
+ .dark .tag {
+ background: rgb(77, 77, 77);
+ }
+ .tag {
+ background:rgb(173, 173, 173);
+ padding: 5px 10px;
+ border-radius: 99px;
+ cursor: pointer;
+ user-select: none;
+ }
+ .dark .tag.selected {
+ background: rgb(0, 108, 170);
+ }
+ .tag.selected {
+ background: rgb(0, 162, 255);
+ }
h1 {
margin: 0;
padding: 0;