Skip to content

Commit

Permalink
run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinsgoodman committed Dec 15, 2024
1 parent 2bd6781 commit 593462c
Show file tree
Hide file tree
Showing 19 changed files with 215 additions and 173 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "astro build",
"preview": "astro preview",
"check": "astro check",
"format": "prettier -w ."
"format": "prettier -w src/."
},
"devDependencies": {
"@astrojs/tailwind": "^5.1.3",
Expand Down
22 changes: 15 additions & 7 deletions src/components/BlogCategorySelector.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@
import { allCategories } from 'src/types/categories';
export type Props = {
activeCategory?: typeof allCategories[number];
activeCategory?: (typeof allCategories)[number];
};
const { activeCategory } = Astro.props;
const visibleCategories = allCategories.filter((category) => category !== activeCategory);
const visibleCategories = allCategories.filter(
(category) => category !== activeCategory
);
---

<div class="flex flex-wrap items-start justify-center">
{visibleCategories.map((category) => (
<a href={`/blog/${category}`} class="bg-black m-2 p-2 rounded text-blue-100 hover:text-blue-300 dark:bg-blue-100 dark:text-blue-900">
{category}
</a>
))}
{
visibleCategories.map((category) => (
<a
href={`/blog/${category}`}
class="bg-black m-2 p-2 rounded text-blue-100 hover:text-blue-300 dark:bg-blue-100 dark:text-blue-900"
>
{category}
</a>
))
}
</div>
17 changes: 8 additions & 9 deletions src/components/BlogIndex.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@ import Pagination from '@/components/Pagination.astro';
import BlogCategorySelector from '@/components/BlogCategorySelector.astro';
export type Props = {
page: Page;
category?: typeof allCategories[number];
}
page: Page;
category?: (typeof allCategories)[number];
};
const { page, category } = Astro.props;
---
<section
class="container mx-auto flex flex-col bg-blue-100 dark:bg-slate-900"
>
<h1 class="my-2 text-center">My Blog</h1>
<BlogCategorySelector activeCategory={category} />

<section class="container mx-auto flex flex-col bg-blue-100 dark:bg-slate-900">
<h1 class="my-2 text-center">My Blog</h1>
<BlogCategorySelector activeCategory={category} />
<div
class="grid grid-cols-1 gap-4 gap-y-6 px-4 my-4 sm:grid-cols-2 md:grid-cols-3"
>
{page.data.map((post) => <BlogPostPreview post={post} />)}
</div>
<Pagination page={page} path="/blog" />
<Pagination page={page} path="/blog" />
</section>
17 changes: 6 additions & 11 deletions src/components/BlogPreviewSection.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,15 @@ type BlogType = CollectionEntry<'blog'>;
<section id="blog" class="bg-blue-100 dark:bg-slate-900">
<div class="container mx-auto max-w-[90%] px-4 py-8">
<h2 class="text-4xl mb-4 text-left">My Latest Posts</h2>
<div
class="grid gap-4 md:grid-cols-2 md:px-0 lg:grid-cols-3"
>
{
blogPosts.map((post: BlogType) => (
<BlogPostPreview
post={post}
/>
))
}
<div class="grid gap-4 md:grid-cols-2 md:px-0 lg:grid-cols-3">
{blogPosts.map((post: BlogType) => <BlogPostPreview post={post} />)}
</div>

<div class="my-4 text-center">
<a href="/blog" class="inline-block border-2 rounded-lg px-6 py-4 font-bold uppercase text-white dark:text-slate-900 dark:hover:text-slate-100 hover:text-blue-700 bg-blue-600 dark:bg-blue-100 hover:bg-blue-200 dark:hover:bg-blue-600 border-blue-600 dark:border-blue-100 hover:border-blue-700 dark:hover:border-blue-600">
<a
href="/blog"
class="inline-block border-2 rounded-lg px-6 py-4 font-bold uppercase text-white dark:text-slate-900 dark:hover:text-slate-100 hover:text-blue-700 bg-blue-600 dark:bg-blue-100 hover:bg-blue-200 dark:hover:bg-blue-600 border-blue-600 dark:border-blue-100 hover:border-blue-700 dark:hover:border-blue-600"
>
View All
</a>
</div>
Expand Down
22 changes: 12 additions & 10 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ import { socialLinks } from '@/utils/constants';
class="flex items-center justify-center bg-white px-4 py-4 text-center dark:bg-black sm:px-8"
>
<div class="flex items-center space-x-2">
{socialLinks.map(({ href, label, icon: Icon }) => (
<FooterLink
href={href}
target="_blank"
aria-label={label}
rel="noopener noreferrer"
>
<Icon />
</FooterLink>
))}
{
socialLinks.map(({ href, label, icon: Icon }) => (
<FooterLink
href={href}
target="_blank"
aria-label={label}
rel="noopener noreferrer"
>
<Icon />
</FooterLink>
))
}
</div>
</footer>
</div>
3 changes: 1 addition & 2 deletions src/components/Head.astro
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ const {
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-HEVHRVL93N"
is:inline
></script>
is:inline></script>
<script is:inline>
window.dataLayer = window.dataLayer || [];
function gtag() {
Expand Down
6 changes: 4 additions & 2 deletions src/components/Icons/BlueskyIcon.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
export type Props = {
className?: string;
}
};
const { className } = Astro.props;
---
Expand All @@ -16,5 +16,7 @@ const { className } = Astro.props;
role="img"
>
<title>Bluesky Logo</title>
<path d="M180 141.964C163.699 110.262 119.308 51.1817 78.0347 22.044C38.4971 -5.86834 23.414 -1.03207 13.526 3.43594C2.08093 8.60755 0 26.1785 0 36.5164C0 46.8542 5.66748 121.272 9.36416 133.694C21.5786 174.738 65.0603 188.607 105.104 184.156C107.151 183.852 109.227 183.572 111.329 183.312C109.267 183.642 107.19 183.924 105.104 184.156C46.4204 192.847 -5.69621 214.233 62.6582 290.33C137.848 368.18 165.705 273.637 180 225.702C194.295 273.637 210.76 364.771 295.995 290.33C360 225.702 313.58 192.85 254.896 184.158C252.81 183.926 250.733 183.645 248.671 183.315C250.773 183.574 252.849 183.855 254.896 184.158C294.94 188.61 338.421 174.74 350.636 133.697C354.333 121.275 360 46.8568 360 36.519C360 26.1811 357.919 8.61012 346.474 3.43851C336.586 -1.02949 321.503 -5.86576 281.965 22.0466C240.692 51.1843 196.301 110.262 180 141.964Z"></path>
<path
d="M180 141.964C163.699 110.262 119.308 51.1817 78.0347 22.044C38.4971 -5.86834 23.414 -1.03207 13.526 3.43594C2.08093 8.60755 0 26.1785 0 36.5164C0 46.8542 5.66748 121.272 9.36416 133.694C21.5786 174.738 65.0603 188.607 105.104 184.156C107.151 183.852 109.227 183.572 111.329 183.312C109.267 183.642 107.19 183.924 105.104 184.156C46.4204 192.847 -5.69621 214.233 62.6582 290.33C137.848 368.18 165.705 273.637 180 225.702C194.295 273.637 210.76 364.771 295.995 290.33C360 225.702 313.58 192.85 254.896 184.158C252.81 183.926 250.733 183.645 248.671 183.315C250.773 183.574 252.849 183.855 254.896 184.158C294.94 188.61 338.421 174.74 350.636 133.697C354.333 121.275 360 46.8568 360 36.519C360 26.1811 357.919 8.61012 346.474 3.43851C336.586 -1.02949 321.503 -5.86576 281.965 22.0466C240.692 51.1843 196.301 110.262 180 141.964Z"
></path>
</svg>
10 changes: 7 additions & 3 deletions src/components/Icons/DevToIcon.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
export type Props = {
className?: string;
}
};
const { className } = Astro.props;
---
Expand All @@ -16,6 +16,10 @@ const { className } = Astro.props;
role="img"
>
<title>DevTo Logo</title>
<path d="M15.7 15.5c-.4-.3-.7-.4-1.1-.4h-1.7v10.1h1.7c.4 0 .8-.1 1.1-.4.4-.3.6-.7.6-1.3v-6.7c0-.6-.2-1-.6-1.3z" />
<path d="M47 0H3C1.3 0 0 1.3 0 3v34c0 1.7 1.3 3 3 3h44c1.7 0 3-1.3 3-3V3c0-1.7-1.3-3-3-3zM19.1 23.5c0 1.3-.4 2.4-1.3 3.2-.8.9-1.9 1.3-3.3 1.3h-4.4V12.3h4.5c1.3 0 2.4.4 3.2 1.3.8.8 1.3 1.9 1.3 3.2v6.7zm9.1-8.4h-5.1v3.6h3.1v2.8h-3.1v3.7h5.1V28h-5.9c-.6 0-1-.2-1.4-.6-.4-.4-.6-.8-.6-1.4V14.2c0-.6.2-1 .6-1.4.4-.4.8-.6 1.4-.6h5.9v2.9zM37.5 26c-.6 1.3-1.3 2-2.2 2-.9 0-1.7-.7-2.2-2l-3.7-13.8h3.1L35.3 23l2.8-10.8h3.1L37.5 26z" />
<path
d="M15.7 15.5c-.4-.3-.7-.4-1.1-.4h-1.7v10.1h1.7c.4 0 .8-.1 1.1-.4.4-.3.6-.7.6-1.3v-6.7c0-.6-.2-1-.6-1.3z"
></path>
<path
d="M47 0H3C1.3 0 0 1.3 0 3v34c0 1.7 1.3 3 3 3h44c1.7 0 3-1.3 3-3V3c0-1.7-1.3-3-3-3zM19.1 23.5c0 1.3-.4 2.4-1.3 3.2-.8.9-1.9 1.3-3.3 1.3h-4.4V12.3h4.5c1.3 0 2.4.4 3.2 1.3.8.8 1.3 1.9 1.3 3.2v6.7zm9.1-8.4h-5.1v3.6h3.1v2.8h-3.1v3.7h5.1V28h-5.9c-.6 0-1-.2-1.4-.6-.4-.4-.6-.8-.6-1.4V14.2c0-.6.2-1 .6-1.4.4-.4.8-.6 1.4-.6h5.9v2.9zM37.5 26c-.6 1.3-1.3 2-2.2 2-.9 0-1.7-.7-2.2-2l-3.7-13.8h3.1L35.3 23l2.8-10.8h3.1L37.5 26z"
></path>
</svg>
8 changes: 5 additions & 3 deletions src/components/Icons/GithubIcon.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
export type Props = {
className?: string;
}
};
const { className } = Astro.props;
---
Expand All @@ -16,6 +16,8 @@ const { className } = Astro.props;
role="img"
>
<title>GitHub Logo</title>
<path fill="none" d="M0 0h24v24H0z" />
<path d="M12 2C6.475 2 2 6.475 2 12a9.994 9.994 0 0 0 6.838 9.488c.5.087.687-.213.687-.476 0-.237-.013-1.024-.013-1.862-2.512.463-3.162-.612-3.362-1.175-.113-.288-.6-1.175-1.025-1.413-.35-.187-.85-.65-.013-.662.788-.013 1.35.725 1.538 1.025.9 1.512 2.338 1.087 2.912.825.088-.65.35-1.087.638-1.337-2.225-.25-4.55-1.113-4.55-4.938 0-1.088.387-1.987 1.025-2.688-.1-.25-.45-1.275.1-2.65 0 0 .837-.262 2.75 1.026a9.28 9.28 0 0 1 2.5-.338c.85 0 1.7.112 2.5.337 1.912-1.3 2.75-1.024 2.75-1.024.55 1.375.2 2.4.1 2.65.637.7 1.025 1.587 1.025 2.687 0 3.838-2.337 4.688-4.562 4.938.362.312.675.912.675 1.85 0 1.337-.013 2.412-.013 2.75 0 .262.188.574.688.474A10.016 10.016 0 0 0 22 12c0-5.525-4.475-10-10-10z" />
<path fill="none" d="M0 0h24v24H0z"></path>
<path
d="M12 2C6.475 2 2 6.475 2 12a9.994 9.994 0 0 0 6.838 9.488c.5.087.687-.213.687-.476 0-.237-.013-1.024-.013-1.862-2.512.463-3.162-.612-3.362-1.175-.113-.288-.6-1.175-1.025-1.413-.35-.187-.85-.65-.013-.662.788-.013 1.35.725 1.538 1.025.9 1.512 2.338 1.087 2.912.825.088-.65.35-1.087.638-1.337-2.225-.25-4.55-1.113-4.55-4.938 0-1.088.387-1.987 1.025-2.688-.1-.25-.45-1.275.1-2.65 0 0 .837-.262 2.75 1.026a9.28 9.28 0 0 1 2.5-.338c.85 0 1.7.112 2.5.337 1.912-1.3 2.75-1.024 2.75-1.024.55 1.375.2 2.4.1 2.65.637.7 1.025 1.587 1.025 2.687 0 3.838-2.337 4.688-4.562 4.938.362.312.675.912.675 1.85 0 1.337-.013 2.412-.013 2.75 0 .262.188.574.688.474A10.016 10.016 0 0 0 22 12c0-5.525-4.475-10-10-10z"
></path>
</svg>
7 changes: 5 additions & 2 deletions src/components/Icons/LinkedInIcon.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
export type Props = {
className?: string;
}
};
const { className } = Astro.props;
---

<svg
class={className}
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -15,5 +16,7 @@ const { className } = Astro.props;
role="img"
>
<title>LinkedIn Logo</title>
<path d="M6.94048 4.99993C6.94011 5.81424 6.44608 6.54702 5.69134 6.85273C4.9366 7.15845 4.07187 6.97605 3.5049 6.39155C2.93793 5.80704 2.78195 4.93715 3.1105 4.19207C3.43906 3.44699 4.18654 2.9755 5.00048 2.99993C6.08155 3.03238 6.94097 3.91837 6.94048 4.99993ZM7.00048 8.47993H3.00048V20.9999H7.00048V8.47993ZM13.3205 8.47993H9.34048V20.9999H13.2805V14.4299C13.2805 10.7699 18.0505 10.4299 18.0505 14.4299V20.9999H22.0005V13.0699C22.0005 6.89993 14.9405 7.12993 13.2805 10.1599L13.3205 8.47993Z"></path>
<path
d="M6.94048 4.99993C6.94011 5.81424 6.44608 6.54702 5.69134 6.85273C4.9366 7.15845 4.07187 6.97605 3.5049 6.39155C2.93793 5.80704 2.78195 4.93715 3.1105 4.19207C3.43906 3.44699 4.18654 2.9755 5.00048 2.99993C6.08155 3.03238 6.94097 3.91837 6.94048 4.99993ZM7.00048 8.47993H3.00048V20.9999H7.00048V8.47993ZM13.3205 8.47993H9.34048V20.9999H13.2805V14.4299C13.2805 10.7699 18.0505 10.4299 18.0505 14.4299V20.9999H22.0005V13.0699C22.0005 6.89993 14.9405 7.12993 13.2805 10.1599L13.3205 8.47993Z"
></path>
</svg>
8 changes: 5 additions & 3 deletions src/components/Icons/MicIcon.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
export type Props = {
className?: string;
}
};
const { className } = Astro.props;
---
Expand All @@ -16,6 +16,8 @@ const { className } = Astro.props;
role="img"
>
<title>Microphone Icon</title>
<path fill="none" d="M0 0h24v24H0z" />
<path d="M12 3a3 3 0 0 0-3 3v4a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3zm0-2a5 5 0 0 1 5 5v4a5 5 0 0 1-10 0V6a5 5 0 0 1 5-5zM3.055 11H5.07a7.002 7.002 0 0 0 13.858 0h2.016A9.004 9.004 0 0 1 13 18.945V23h-2v-4.055A9.004 9.004 0 0 1 3.055 11z" />
<path fill="none" d="M0 0h24v24H0z"></path>
<path
d="M12 3a3 3 0 0 0-3 3v4a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3zm0-2a5 5 0 0 1 5 5v4a5 5 0 0 1-10 0V6a5 5 0 0 1 5-5zM3.055 11H5.07a7.002 7.002 0 0 0 13.858 0h2.016A9.004 9.004 0 0 1 13 18.945V23h-2v-4.055A9.004 9.004 0 0 1 3.055 11z"
></path>
</svg>
8 changes: 5 additions & 3 deletions src/components/Icons/PencilIcon.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
export type Props = {
className?: string;
}
};
const { className } = Astro.props;
---
Expand All @@ -16,6 +16,8 @@ const { className } = Astro.props;
role="img"
>
<title>Pencil Icon</title>
<path fill="none" d="M0 0h24v24H0z" />
<path d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z" />
<path fill="none" d="M0 0h24v24H0z"></path>
<path
d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"
></path>
</svg>
6 changes: 4 additions & 2 deletions src/components/Icons/TeamIcon.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
export type Props = {
className?: string;
}
};
const { className } = Astro.props;
---
Expand All @@ -16,5 +16,7 @@ const { className } = Astro.props;
role="img"
>
<title>Group of People Icon</title>
<path d="M12 10C14.2091 10 16 8.20914 16 6 16 3.79086 14.2091 2 12 2 9.79086 2 8 3.79086 8 6 8 8.20914 9.79086 10 12 10ZM5.5 13C6.88071 13 8 11.8807 8 10.5 8 9.11929 6.88071 8 5.5 8 4.11929 8 3 9.11929 3 10.5 3 11.8807 4.11929 13 5.5 13ZM21 10.5C21 11.8807 19.8807 13 18.5 13 17.1193 13 16 11.8807 16 10.5 16 9.11929 17.1193 8 18.5 8 19.8807 8 21 9.11929 21 10.5ZM12 11C14.7614 11 17 13.2386 17 16V22H7V16C7 13.2386 9.23858 11 12 11ZM5 15.9999C5 15.307 5.10067 14.6376 5.28818 14.0056L5.11864 14.0204C3.36503 14.2104 2 15.6958 2 17.4999V21.9999H5V15.9999ZM22 21.9999V17.4999C22 15.6378 20.5459 14.1153 18.7118 14.0056 18.8993 14.6376 19 15.307 19 15.9999V21.9999H22Z"></path>
<path
d="M12 10C14.2091 10 16 8.20914 16 6 16 3.79086 14.2091 2 12 2 9.79086 2 8 3.79086 8 6 8 8.20914 9.79086 10 12 10ZM5.5 13C6.88071 13 8 11.8807 8 10.5 8 9.11929 6.88071 8 5.5 8 4.11929 8 3 9.11929 3 10.5 3 11.8807 4.11929 13 5.5 13ZM21 10.5C21 11.8807 19.8807 13 18.5 13 17.1193 13 16 11.8807 16 10.5 16 9.11929 17.1193 8 18.5 8 19.8807 8 21 9.11929 21 10.5ZM12 11C14.7614 11 17 13.2386 17 16V22H7V16C7 13.2386 9.23858 11 12 11ZM5 15.9999C5 15.307 5.10067 14.6376 5.28818 14.0056L5.11864 14.0204C3.36503 14.2104 2 15.6958 2 17.4999V21.9999H5V15.9999ZM22 21.9999V17.4999C22 15.6378 20.5459 14.1153 18.7118 14.0056 18.8993 14.6376 19 15.307 19 15.9999V21.9999H22Z"
></path>
</svg>
8 changes: 5 additions & 3 deletions src/components/Icons/TwitchIcon.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
export type Props = {
className?: string;
}
};
const { className } = Astro.props;
---
Expand All @@ -16,6 +16,8 @@ const { className } = Astro.props;
role="img"
>
<title>Twitch Logo</title>
<path fill="none" d="M0 0h24v24H0z" />
<path d="M21 3v11.74l-4.696 4.695h-3.913l-2.437 2.348H6.913v-2.348H3V6.13L4.227 3H21zm-1.565 1.565H6.13v11.74h3.13v2.347l2.349-2.348h4.695l3.13-3.13V4.565zm-3.13 3.13v4.696h-1.566V7.696h1.565zm-3.914 0v4.696h-1.565V7.696h1.565z" />
<path fill="none" d="M0 0h24v24H0z"></path>
<path
d="M21 3v11.74l-4.696 4.695h-3.913l-2.437 2.348H6.913v-2.348H3V6.13L4.227 3H21zm-1.565 1.565H6.13v11.74h3.13v2.347l2.349-2.348h4.695l3.13-3.13V4.565zm-3.13 3.13v4.696h-1.566V7.696h1.565zm-3.914 0v4.696h-1.565V7.696h1.565z"
></path>
</svg>
6 changes: 4 additions & 2 deletions src/components/Icons/TwitterIcon.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
export type Props = {
className?: string;
}
};
const { className } = Astro.props;
---
Expand All @@ -16,5 +16,7 @@ const { className } = Astro.props;
role="img"
>
<title>X, formerly Twitter, Logo</title>
<path d="M8 2H1L9.26086 13.0145L1.44995 21.9999H4.09998L10.4883 14.651L16 22H23L14.3917 10.5223L21.8001 2H19.1501L13.1643 8.88578L8 2ZM17 20L5 4H7L19 20H17Z" fill="currentColor"></path>
<path
d="M8 2H1L9.26086 13.0145L1.44995 21.9999H4.09998L10.4883 14.651L16 22H23L14.3917 10.5223L21.8001 2H19.1501L13.1643 8.88578L8 2ZM17 20L5 4H7L19 20H17Z"
fill="currentColor"></path>
</svg>
Loading

0 comments on commit 593462c

Please sign in to comment.