Skip to content

Commit

Permalink
Further style changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
corigne committed Jul 3, 2024
1 parent 0f0766a commit 27b792d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions frontend/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
@apply bg-base text-text outline outline-1 outline-slate-400 drop-shadow-md transition-colors duration-700
}
h1 {
@apply text-2xl font-bold py-2 mt-10 text-text
@apply text-2xl font-bold py-2 mt-3 mb-1 text-text
}
h2 {
@apply text-xl font-semibold py-2 mt-5 text-subtext0
@apply text-xl font-semibold py-2 mt-3 text-subtext0
}
h3 {
@apply text-lg italic mt-5
Expand All @@ -34,7 +34,7 @@
}
@media (hover: hover) {
a:hover {
@apply invert drop-shadow-2xl transition-all
@apply invert drop-shadow-2xl transition-all duration-300 ease-in
}
}
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/routes/api/posts/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ async function getPosts():Promise<BlogPost[]> {
metadata.published && posts.push(post)
}
}
posts.sort((a: BlogPost, b:BlogPost) => new Date(a.date).getTime() - new Date(b.date).getTime())
return posts
}

Expand Down
8 changes: 6 additions & 2 deletions frontend/src/routes/blog/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
export let data: { posts: BlogPost[] }
</script>

<header>
<h1>Blog Posts</h1>
</header>

<section>
<ul class="posts" >
{#each data.posts as post}
<li class="post">
<a href="/blog/{post.slug}" class="title">{post.title}</a>
<p class="date">{post.date}</p>
<a href="/blog/{post.slug}" class="title text-lg font-bold">{post.title}</a>
<p class="date text-overlay1 italic">Published: {post.date}</p>
<p class="description">{post.description}</p>
</li>
{/each}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { darkMode } from '../stores'
<label for="dark-mode-toggle" />
<button
id="dark-mode-toggle"
class={ "h-8 w-8 p-1 text-sapphire outline outline-1 outline-overlay0 shadow-md transition-all "
class={ "h-8 w-8 p-1 text-sapphire outline outline-1 outline-overlay0 shadow-md transition-all ease-in duration-300 "
+ "font-bold rounded-md [@media(hover:hover)]:hover:bg-sapphire [@media(hover:hover)]:hover:text-base" }
on:click={ () => {darkMode.set(!$darkMode)} }
>
Expand Down

0 comments on commit 27b792d

Please sign in to comment.