Sorting out images and tags

This commit is contained in:
Andrew Lee 2024-02-01 23:05:41 -05:00
parent 606bbf0cd1
commit 2c2bdccd64
Signed by: andrew
SSH key fingerprint: SHA256:bbGg1DYG5CuKl2jo1DqzvUsaTeyvhM3tjCsej5lYMg4
4 changed files with 20 additions and 3 deletions

View file

@ -41,7 +41,7 @@ import Navbar from '../components/Navbar.vue';
<div transition:name="main" transition:animate="fade"> <div transition:name="main" transition:animate="fade">
<slot /> <slot />
<footer> <footer>
<p>Made with {Astro.generator} and Hosted on Vercel</p> <p><a href="https://github.com/Alee14/personal-website">Made with {Astro.generator} and Hosted on Vercel</a></p>
<p>Copyright &copy; 2024 Andrew Lee</p> <p>Copyright &copy; 2024 Andrew Lee</p>
</footer> </footer>
</div> </div>

View file

@ -24,3 +24,10 @@ const { Content } = await entry.render();
</article> </article>
</main> </main>
</Page> </Page>
<style>
img {
width: 20%;
height: 50%;
}
</style>

View file

@ -13,7 +13,9 @@ const allBlogPosts = (await getCollection('blog')).sort((a, b) => b.data.date.va
<h1><a href={`/blog/${post.slug}`}>{post.data.title}</a></h1> <h1><a href={`/blog/${post.slug}`}>{post.data.title}</a></h1>
<small>{formatDate(post.data.date)}</small> <small>{formatDate(post.data.date)}</small>
<p>{post.data.description}</p> <p>{post.data.description}</p>
<a href={`/blog/${post.slug}`}>Read more</a> <div class="tags">
<a href={`/blog/${post.slug}`}>tag1</a>
</div>
</article> </article>
)) ))
} }
@ -26,6 +28,12 @@ const allBlogPosts = (await getCollection('blog')).sort((a, b) => b.data.date.va
margin-bottom: 2px; margin-bottom: 2px;
} }
.tags {
display: flex;
flex-direction: row;
gap: 1em;
}
article { article {
background-color: #3B513B; background-color: #3B513B;
padding: 1.2em; padding: 1.2em;

View file

@ -12,7 +12,8 @@ import projects from "../data/projects.json";
<p>{project.description}</p> <p>{project.description}</p>
{project.links.map((link) => { {project.links.map((link) => {
return ( return (
<a href={link.url} target={link.external ? "_blank" : ""}>{link.name}</a> ) <a href={link.url} target={link.external ? "_blank" : ""}>{link.name}</a>
)
})} })}
</div> </div>
) )
@ -39,6 +40,7 @@ import projects from "../data/projects.json";
.cards h1 { .cards h1 {
padding: 0; padding: 0;
margin: 0; margin: 0;
font-size: 1.8em;
} }
.cards p { .cards p {