design tweaks

This commit is contained in:
2024-03-01 23:11:17 -05:00
parent 4cdc973448
commit 605af08295
27 changed files with 88 additions and 73 deletions
+6 -10
View File
@@ -1,5 +1,6 @@
---
import FormattedDate from '@components/FormattedDate.astro';
import { format, add } from 'date-fns';
import { Icon } from 'astro-icon/components';
interface Props {
title: String;
@@ -15,18 +16,12 @@ const { title, date, slug } = Astro.props;
{slug ? <a href={`/posts/${slug}`}>{title}</a> : title}
</h2>
<h3>
🗓️ <FormattedDate date={date} />
<Icon size={24} class="calendar-icon" name="calendar" />
<span>{format(add(new Date(date), { hours: 6 }), 'MMM do, y')}</span>
</h3>
</div>
<style>
a {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
h2,
h2 a {
font-size: 1.4rem;
@@ -36,6 +31,7 @@ const { title, date, slug } = Astro.props;
display: flex;
align-items: center;
gap: 6px;
font-size: 0.9rem;
font-weight: lighter;
font-size: 0.3em;
}
</style>
+2
View File
@@ -1,5 +1,7 @@
---
const year = new Date().getFullYear();
interface Props {}
---
<footer>
-11
View File
@@ -1,11 +0,0 @@
---
import { format, add } from 'date-fns';
interface Props {
date: Date;
}
const { date } = Astro.props;
---
<span>{format(add(new Date(date), { hours: 6 }), 'MMM do, y')}</span>
+8 -4
View File
@@ -1,12 +1,15 @@
---
import { Icon } from 'astro-icon/components';
import type { NavLink } from 'src/types';
const { pathname } = Astro.url;
interface Props {}
const navLinks: NavLink[] = [
{ label: '📝 Blog', path: '/' },
{ label: '👤 About', path: '/about/' },
{ label: '🕐 Now', path: '/now/' },
{ label: 'Blog', icon: 'pen', path: '/' },
{ label: 'About', icon: 'person', path: '/about/' },
{ label: 'Now', icon: 'clock', path: '/now/' },
];
---
@@ -21,6 +24,7 @@ const navLinks: NavLink[] = [
class={pathname === link.path ? 'active-nav' : null}
href={link.path}
>
<Icon size={26} name={link.icon} />
<span>{link.label}</span>
</a>
</li>
@@ -76,7 +80,7 @@ const navLinks: NavLink[] = [
}
nav ul li a::before {
content: '';
content: '';
position: absolute;
left: -12px;
color: var(--blue);
+1 -1
View File
@@ -1,5 +1,5 @@
---
import { Tag } from 'src/content/config';
import { Tag } from 'src/types';
import BlogHeader from '@components/BlogHeader.astro';
import Tags from '@components/Tags.astro';
+1 -1
View File
@@ -1,5 +1,5 @@
---
import { Tag } from 'src/content/config';
import { Tag } from 'src/types';
interface Props {
tags: Tag[];