mirror of
https://github.com/SkyfallWasTaken/skyfalldev.git
synced 2024-12-04 22:57:32 +00:00
Formatting
This commit is contained in:
parent
562a36c454
commit
3d317a8a45
26 changed files with 367 additions and 301 deletions
16
.prettierrc.mjs
Normal file
16
.prettierrc.mjs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// .prettierrc.mjs
|
||||||
|
/** @type {import("prettier").Config} */
|
||||||
|
export default {
|
||||||
|
trailingComma: "all",
|
||||||
|
singleQuote: false,
|
||||||
|
|
||||||
|
plugins: ["prettier-plugin-astro"],
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: "*.astro",
|
||||||
|
options: {
|
||||||
|
parser: "astro",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
|
@ -1,11 +1,11 @@
|
||||||
import { defineConfig } from 'astro/config';
|
import { defineConfig } from "astro/config";
|
||||||
import mdx from '@astrojs/mdx';
|
import mdx from "@astrojs/mdx";
|
||||||
import sitemap from '@astrojs/sitemap';
|
import sitemap from "@astrojs/sitemap";
|
||||||
|
|
||||||
import tailwind from "@astrojs/tailwind";
|
import tailwind from "@astrojs/tailwind";
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: 'https://example.com',
|
site: "https://example.com",
|
||||||
integrations: [mdx(), sitemap(), tailwind()]
|
integrations: [mdx(), sitemap(), tailwind()],
|
||||||
});
|
});
|
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
15
package.json
15
package.json
|
@ -7,18 +7,23 @@
|
||||||
"start": "astro dev",
|
"start": "astro dev",
|
||||||
"build": "astro check && astro build",
|
"build": "astro check && astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
|
"format": "prettier --write .",
|
||||||
"astro": "astro"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
"dependencies": { "tailwind-merge": "^2.3.0" },
|
"dependencies": {
|
||||||
|
"tailwind-merge": "^2.3.0"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"tailwindcss": "^3.4.4",
|
|
||||||
"typescript": "^5.5.3",
|
|
||||||
"@catppuccin/tailwindcss": "^0.1.6",
|
|
||||||
"@astrojs/check": "^0.7.0",
|
"@astrojs/check": "^0.7.0",
|
||||||
"@astrojs/mdx": "^3.1.2",
|
"@astrojs/mdx": "^3.1.2",
|
||||||
"@astrojs/rss": "^4.0.7",
|
"@astrojs/rss": "^4.0.7",
|
||||||
"@astrojs/sitemap": "^3.1.6",
|
"@astrojs/sitemap": "^3.1.6",
|
||||||
"@astrojs/tailwind": "^5.1.0",
|
"@astrojs/tailwind": "^5.1.0",
|
||||||
"astro": "^4.11.5"
|
"@catppuccin/tailwindcss": "^0.1.6",
|
||||||
|
"astro": "^4.11.5",
|
||||||
|
"prettier": "^3.3.2",
|
||||||
|
"prettier-plugin-astro": "^0.14.0",
|
||||||
|
"tailwindcss": "^3.4.4",
|
||||||
|
"typescript": "^5.5.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
// Import the global.css file here so that it is included on
|
// Import the global.css file here so that it is included on
|
||||||
// all pages through the use of the <BaseHead /> component.
|
// all pages through the use of the <BaseHead /> component.
|
||||||
import '../styles/global.css';
|
import "../styles/global.css";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -11,7 +11,7 @@ interface Props {
|
||||||
|
|
||||||
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
|
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
|
||||||
|
|
||||||
const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props;
|
const { title, description, image = "/blog-placeholder-1.jpg" } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Global Metadata -->
|
<!-- Global Metadata -->
|
||||||
|
@ -21,8 +21,20 @@ const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props;
|
||||||
<meta name="generator" content={Astro.generator} />
|
<meta name="generator" content={Astro.generator} />
|
||||||
|
|
||||||
<!-- Font preloads -->
|
<!-- Font preloads -->
|
||||||
<link rel="preload" href="/fonts/atkinson-regular.woff" as="font" type="font/woff" crossorigin />
|
<link
|
||||||
<link rel="preload" href="/fonts/atkinson-bold.woff" as="font" type="font/woff" crossorigin />
|
rel="preload"
|
||||||
|
href="/fonts/atkinson-regular.woff"
|
||||||
|
as="font"
|
||||||
|
type="font/woff"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="/fonts/atkinson-bold.woff"
|
||||||
|
as="font"
|
||||||
|
type="font/woff"
|
||||||
|
crossorigin
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- Canonical URL -->
|
<!-- Canonical URL -->
|
||||||
<link rel="canonical" href={canonicalURL} />
|
<link rel="canonical" href={canonicalURL} />
|
||||||
|
|
|
@ -8,10 +8,10 @@ const { date } = Astro.props;
|
||||||
|
|
||||||
<time datetime={date.toISOString()}>
|
<time datetime={date.toISOString()}>
|
||||||
{
|
{
|
||||||
date.toLocaleDateString('en-us', {
|
date.toLocaleDateString("en-us", {
|
||||||
year: 'numeric',
|
year: "numeric",
|
||||||
month: 'short',
|
month: "short",
|
||||||
day: 'numeric',
|
day: "numeric",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</time>
|
</time>
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
---
|
---
|
||||||
import HeaderLink from './HeaderLink.astro';
|
import HeaderLink from "./HeaderLink.astro";
|
||||||
import { SITE_TITLE } from '../consts';
|
import { SITE_TITLE } from "../consts";
|
||||||
import Twitter from './socialIcons/Twitter.astro';
|
import Twitter from "./socialIcons/Twitter.astro";
|
||||||
import GitHub from './socialIcons/GitHub.astro';
|
import GitHub from "./socialIcons/GitHub.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<header class="w-full">
|
<header class="w-full">
|
||||||
<nav class="px-3 py-2 flex items-center gap-2 w-full border-b-[2px] border-surface0 shadow-sm bg-crust text-text">
|
<nav
|
||||||
|
class="px-3 py-2 flex items-center gap-2 w-full border-b-[2px] border-surface0 shadow-sm bg-crust text-text"
|
||||||
|
>
|
||||||
<h2 class="font-semibold mx-3"><a href="/">{SITE_TITLE}</a></h2>
|
<h2 class="font-semibold mx-3"><a href="/">{SITE_TITLE}</a></h2>
|
||||||
<div class="flex flew-row gap-3">
|
<div class="flex flew-row gap-3">
|
||||||
<HeaderLink href="/">Home</HeaderLink>
|
<HeaderLink href="/">Home</HeaderLink>
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
---
|
---
|
||||||
import type { HTMLAttributes } from 'astro/types';
|
import type { HTMLAttributes } from "astro/types";
|
||||||
|
|
||||||
type Props = HTMLAttributes<'a'>;
|
type Props = HTMLAttributes<"a">;
|
||||||
|
|
||||||
const { href, class: className, ...props } = Astro.props;
|
const { href, class: className, ...props } = Astro.props;
|
||||||
|
|
||||||
const { pathname } = Astro.url;
|
const { pathname } = Astro.url;
|
||||||
const subpath = pathname.match(/[^\/]+/g);
|
const subpath = pathname.match(/[^\/]+/g);
|
||||||
const isActive = href === pathname || href === '/' + subpath?.[0];
|
const isActive = href === pathname || href === "/" + subpath?.[0];
|
||||||
---
|
---
|
||||||
|
|
||||||
<a href={href} class:list={[className, { active: isActive }]} {...props}>
|
<a href={href} class:list={[className, { active: isActive }]} {...props}>
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
---
|
---
|
||||||
import {twMerge} from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
const { class: className, ...rest } = Astro.props;
|
const { class: className, ...rest } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<button class={twMerge("shadow-sm px-3 py-2 rounded-md bg-surface0 hover:bg-surface1 transition", className)} {...rest}>
|
<button
|
||||||
<slot/>
|
class={twMerge(
|
||||||
|
"shadow-sm px-3 py-2 rounded-md bg-surface0 hover:bg-surface1 transition",
|
||||||
|
className,
|
||||||
|
)}
|
||||||
|
{...rest}
|
||||||
|
>
|
||||||
|
<slot />
|
||||||
</button>
|
</button>
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'First post'
|
title: "First post"
|
||||||
description: 'Lorem ipsum dolor sit amet'
|
description: "Lorem ipsum dolor sit amet"
|
||||||
pubDate: 'Jul 08 2022'
|
pubDate: "Jul 08 2022"
|
||||||
heroImage: '/blog-placeholder-3.jpg'
|
heroImage: "/blog-placeholder-3.jpg"
|
||||||
---
|
---
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'Markdown Style Guide'
|
title: "Markdown Style Guide"
|
||||||
description: 'Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.'
|
description: "Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro."
|
||||||
pubDate: 'Jul 01 2022'
|
pubDate: "Jul 01 2022"
|
||||||
heroImage: '/blog-placeholder-1.jpg'
|
heroImage: "/blog-placeholder-1.jpg"
|
||||||
---
|
---
|
||||||
|
|
||||||
Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.
|
Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'Second post'
|
title: "Second post"
|
||||||
description: 'Lorem ipsum dolor sit amet'
|
description: "Lorem ipsum dolor sit amet"
|
||||||
pubDate: 'Jul 15 2022'
|
pubDate: "Jul 15 2022"
|
||||||
heroImage: '/blog-placeholder-4.jpg'
|
heroImage: "/blog-placeholder-4.jpg"
|
||||||
---
|
---
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'Third post'
|
title: "Third post"
|
||||||
description: 'Lorem ipsum dolor sit amet'
|
description: "Lorem ipsum dolor sit amet"
|
||||||
pubDate: 'Jul 22 2022'
|
pubDate: "Jul 22 2022"
|
||||||
heroImage: '/blog-placeholder-2.jpg'
|
heroImage: "/blog-placeholder-2.jpg"
|
||||||
---
|
---
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'Using MDX'
|
title: "Using MDX"
|
||||||
description: 'Lorem ipsum dolor sit amet'
|
description: "Lorem ipsum dolor sit amet"
|
||||||
pubDate: 'Jul 02 2022'
|
pubDate: "Jul 02 2022"
|
||||||
heroImage: '/blog-placeholder-5.jpg'
|
heroImage: "/blog-placeholder-5.jpg"
|
||||||
---
|
---
|
||||||
|
|
||||||
This theme comes with the [@astrojs/mdx](https://docs.astro.build/en/guides/integrations-guide/mdx/) integration installed and configured in your `astro.config.mjs` config file. If you prefer not to use MDX, you can disable support by removing the integration from your config file.
|
This theme comes with the [@astrojs/mdx](https://docs.astro.build/en/guides/integrations-guide/mdx/) integration installed and configured in your `astro.config.mjs` config file. If you prefer not to use MDX, you can disable support by removing the integration from your config file.
|
||||||
|
@ -18,7 +18,7 @@ If you have existing content authored in MDX, this integration will hopefully ma
|
||||||
Here is how you import and use a UI component inside of MDX.
|
Here is how you import and use a UI component inside of MDX.
|
||||||
When you open this page in the browser, you should see the clickable button below.
|
When you open this page in the browser, you should see the clickable button below.
|
||||||
|
|
||||||
import HeaderLink from '../../components/HeaderLink.astro';
|
import HeaderLink from "../../components/HeaderLink.astro";
|
||||||
|
|
||||||
<HeaderLink href="#" onclick="alert('clicked!')">
|
<HeaderLink href="#" onclick="alert('clicked!')">
|
||||||
Embedded component in MDX
|
Embedded component in MDX
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { defineCollection, z } from 'astro:content';
|
import { defineCollection, z } from "astro:content";
|
||||||
|
|
||||||
const blog = defineCollection({
|
const blog = defineCollection({
|
||||||
type: 'content',
|
type: "content",
|
||||||
// Type-check frontmatter using a schema
|
// Type-check frontmatter using a schema
|
||||||
schema: z.object({
|
schema: z.object({
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
---
|
---
|
||||||
import type { CollectionEntry } from 'astro:content';
|
import type { CollectionEntry } from "astro:content";
|
||||||
import BaseHead from '../components/BaseHead.astro';
|
import BaseHead from "../components/BaseHead.astro";
|
||||||
import Header from '../components/Header.astro';
|
import Header from "../components/Header.astro";
|
||||||
import Footer from '../components/Footer.astro';
|
import Footer from "../components/Footer.astro";
|
||||||
import FormattedDate from '../components/FormattedDate.astro';
|
import FormattedDate from "../components/FormattedDate.astro";
|
||||||
|
|
||||||
type Props = CollectionEntry<'blog'>['data'];
|
type Props = CollectionEntry<"blog">["data"];
|
||||||
|
|
||||||
const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
|
const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
|
||||||
---
|
---
|
||||||
|
@ -40,7 +40,17 @@ const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
|
||||||
<main class="max-w-full m-0">
|
<main class="max-w-full m-0">
|
||||||
<article>
|
<article>
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
{heroImage && <img width={1020} height={510} src={heroImage} class="block m-0 rounded-md shadow-sm" alt="" />}
|
{
|
||||||
|
heroImage && (
|
||||||
|
<img
|
||||||
|
width={1020}
|
||||||
|
height={510}
|
||||||
|
src={heroImage}
|
||||||
|
class="block m-0 rounded-md shadow-sm"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="w-[720px] m-auto p-1">
|
<div class="w-[720px] m-auto p-1">
|
||||||
<div class="mb-1 text-center">
|
<div class="mb-1 text-center">
|
||||||
|
|
|
@ -1,62 +1,72 @@
|
||||||
---
|
---
|
||||||
import Layout from '../layouts/BlogPost.astro';
|
import Layout from "../layouts/BlogPost.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout
|
<Layout
|
||||||
title="About Me"
|
title="About Me"
|
||||||
description="Lorem ipsum dolor sit amet"
|
description="Lorem ipsum dolor sit amet"
|
||||||
pubDate={new Date('August 08 2021')}
|
pubDate={new Date("August 08 2021")}
|
||||||
heroImage="/blog-placeholder-about.jpg"
|
heroImage="/blog-placeholder-about.jpg"
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
||||||
labore et dolore magna aliqua. Vitae ultricies leo integer malesuada nunc vel risus commodo
|
tempor incididunt ut labore et dolore magna aliqua. Vitae ultricies leo
|
||||||
viverra. Adipiscing enim eu turpis egestas pretium. Euismod elementum nisi quis eleifend quam
|
integer malesuada nunc vel risus commodo viverra. Adipiscing enim eu turpis
|
||||||
adipiscing. In hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat. Netus
|
egestas pretium. Euismod elementum nisi quis eleifend quam adipiscing. In
|
||||||
et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu non diam phasellus
|
hac habitasse platea dictumst vestibulum. Sagittis purus sit amet volutpat.
|
||||||
vestibulum lorem. Varius sit amet mattis vulputate enim. Habitasse platea dictumst quisque
|
Netus et malesuada fames ac turpis egestas. Eget magna fermentum iaculis eu
|
||||||
sagittis. Integer quis auctor elit sed vulputate mi. Dictumst quisque sagittis purus sit amet.
|
non diam phasellus vestibulum lorem. Varius sit amet mattis vulputate enim.
|
||||||
|
Habitasse platea dictumst quisque sagittis. Integer quis auctor elit sed
|
||||||
|
vulputate mi. Dictumst quisque sagittis purus sit amet.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Morbi tristique senectus et netus. Id semper risus in hendrerit gravida rutrum quisque non
|
Morbi tristique senectus et netus. Id semper risus in hendrerit gravida
|
||||||
tellus. Habitasse platea dictumst quisque sagittis purus sit amet. Tellus molestie nunc non
|
rutrum quisque non tellus. Habitasse platea dictumst quisque sagittis purus
|
||||||
blandit massa. Cursus vitae congue mauris rhoncus. Accumsan tortor posuere ac ut. Fringilla urna
|
sit amet. Tellus molestie nunc non blandit massa. Cursus vitae congue mauris
|
||||||
porttitor rhoncus dolor. Elit ullamcorper dignissim cras tincidunt lobortis. In cursus turpis
|
rhoncus. Accumsan tortor posuere ac ut. Fringilla urna porttitor rhoncus
|
||||||
massa tincidunt dui ut ornare lectus. Integer feugiat scelerisque varius morbi enim nunc.
|
dolor. Elit ullamcorper dignissim cras tincidunt lobortis. In cursus turpis
|
||||||
Bibendum neque egestas congue quisque egestas diam. Cras ornare arcu dui vivamus arcu felis
|
massa tincidunt dui ut ornare lectus. Integer feugiat scelerisque varius
|
||||||
bibendum. Dignissim suspendisse in est ante in nibh mauris. Sed tempus urna et pharetra pharetra
|
morbi enim nunc. Bibendum neque egestas congue quisque egestas diam. Cras
|
||||||
massa massa ultricies mi.
|
ornare arcu dui vivamus arcu felis bibendum. Dignissim suspendisse in est
|
||||||
|
ante in nibh mauris. Sed tempus urna et pharetra pharetra massa massa
|
||||||
|
ultricies mi.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Mollis nunc sed id semper risus in. Convallis a cras semper auctor neque. Diam sit amet nisl
|
Mollis nunc sed id semper risus in. Convallis a cras semper auctor neque.
|
||||||
suscipit. Lacus viverra vitae congue eu consequat ac felis donec. Egestas integer eget aliquet
|
Diam sit amet nisl suscipit. Lacus viverra vitae congue eu consequat ac
|
||||||
nibh praesent tristique magna sit amet. Eget magna fermentum iaculis eu non diam. In vitae
|
felis donec. Egestas integer eget aliquet nibh praesent tristique magna sit
|
||||||
turpis massa sed elementum. Tristique et egestas quis ipsum suspendisse ultrices. Eget lorem
|
amet. Eget magna fermentum iaculis eu non diam. In vitae turpis massa sed
|
||||||
dolor sed viverra ipsum. Vel turpis nunc eget lorem dolor sed viverra. Posuere ac ut consequat
|
elementum. Tristique et egestas quis ipsum suspendisse ultrices. Eget lorem
|
||||||
semper viverra nam. Laoreet suspendisse interdum consectetur libero id faucibus. Diam phasellus
|
dolor sed viverra ipsum. Vel turpis nunc eget lorem dolor sed viverra.
|
||||||
vestibulum lorem sed risus ultricies tristique. Rhoncus dolor purus non enim praesent elementum
|
Posuere ac ut consequat semper viverra nam. Laoreet suspendisse interdum
|
||||||
facilisis. Ultrices tincidunt arcu non sodales neque. Tempus egestas sed sed risus pretium quam
|
consectetur libero id faucibus. Diam phasellus vestibulum lorem sed risus
|
||||||
vulputate. Viverra suspendisse potenti nullam ac tortor vitae purus faucibus ornare. Fringilla
|
ultricies tristique. Rhoncus dolor purus non enim praesent elementum
|
||||||
urna porttitor rhoncus dolor purus non. Amet dictum sit amet justo donec enim.
|
facilisis. Ultrices tincidunt arcu non sodales neque. Tempus egestas sed sed
|
||||||
|
risus pretium quam vulputate. Viverra suspendisse potenti nullam ac tortor
|
||||||
|
vitae purus faucibus ornare. Fringilla urna porttitor rhoncus dolor purus
|
||||||
|
non. Amet dictum sit amet justo donec enim.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Mattis ullamcorper velit sed ullamcorper morbi tincidunt. Tortor posuere ac ut consequat semper
|
Mattis ullamcorper velit sed ullamcorper morbi tincidunt. Tortor posuere ac
|
||||||
viverra. Tellus mauris a diam maecenas sed enim ut sem viverra. Venenatis urna cursus eget nunc
|
ut consequat semper viverra. Tellus mauris a diam maecenas sed enim ut sem
|
||||||
scelerisque viverra mauris in. Arcu ac tortor dignissim convallis aenean et tortor at. Curabitur
|
viverra. Venenatis urna cursus eget nunc scelerisque viverra mauris in. Arcu
|
||||||
gravida arcu ac tortor dignissim convallis aenean et tortor. Egestas tellus rutrum tellus
|
ac tortor dignissim convallis aenean et tortor at. Curabitur gravida arcu ac
|
||||||
pellentesque eu. Fusce ut placerat orci nulla pellentesque dignissim enim sit amet. Ut enim
|
tortor dignissim convallis aenean et tortor. Egestas tellus rutrum tellus
|
||||||
blandit volutpat maecenas volutpat blandit aliquam etiam. Id donec ultrices tincidunt arcu. Id
|
pellentesque eu. Fusce ut placerat orci nulla pellentesque dignissim enim
|
||||||
cursus metus aliquam eleifend mi.
|
sit amet. Ut enim blandit volutpat maecenas volutpat blandit aliquam etiam.
|
||||||
|
Id donec ultrices tincidunt arcu. Id cursus metus aliquam eleifend mi.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Tempus quam pellentesque nec nam aliquam sem. Risus at ultrices mi tempus imperdiet. Id porta
|
Tempus quam pellentesque nec nam aliquam sem. Risus at ultrices mi tempus
|
||||||
nibh venenatis cras sed felis eget velit. Ipsum a arcu cursus vitae. Facilisis magna etiam
|
imperdiet. Id porta nibh venenatis cras sed felis eget velit. Ipsum a arcu
|
||||||
tempor orci eu lobortis elementum. Tincidunt dui ut ornare lectus sit. Quisque non tellus orci
|
cursus vitae. Facilisis magna etiam tempor orci eu lobortis elementum.
|
||||||
ac. Blandit libero volutpat sed cras. Nec tincidunt praesent semper feugiat nibh sed pulvinar
|
Tincidunt dui ut ornare lectus sit. Quisque non tellus orci ac. Blandit
|
||||||
proin gravida. Egestas integer eget aliquet nibh praesent tristique magna.
|
libero volutpat sed cras. Nec tincidunt praesent semper feugiat nibh sed
|
||||||
|
pulvinar proin gravida. Egestas integer eget aliquet nibh praesent tristique
|
||||||
|
magna.
|
||||||
</p>
|
</p>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
---
|
---
|
||||||
import { type CollectionEntry, getCollection } from 'astro:content';
|
import { type CollectionEntry, getCollection } from "astro:content";
|
||||||
import BlogPost from '../../layouts/BlogPost.astro';
|
import BlogPost from "../../layouts/BlogPost.astro";
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const posts = await getCollection('blog');
|
const posts = await getCollection("blog");
|
||||||
return posts.map((post) => ({
|
return posts.map((post) => ({
|
||||||
params: { slug: post.slug },
|
params: { slug: post.slug },
|
||||||
props: post,
|
props: post,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
type Props = CollectionEntry<'blog'>;
|
type Props = CollectionEntry<"blog">;
|
||||||
|
|
||||||
const post = Astro.props;
|
const post = Astro.props;
|
||||||
const { Content } = await post.render();
|
const { Content } = await post.render();
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
---
|
---
|
||||||
import BaseHead from '../../components/BaseHead.astro';
|
import BaseHead from "../../components/BaseHead.astro";
|
||||||
import Header from '../../components/Header.astro';
|
import Header from "../../components/Header.astro";
|
||||||
import Footer from '../../components/Footer.astro';
|
import Footer from "../../components/Footer.astro";
|
||||||
import { SITE_TITLE, SITE_DESCRIPTION } from '../../consts';
|
import { SITE_TITLE, SITE_DESCRIPTION } from "../../consts";
|
||||||
import { getCollection } from 'astro:content';
|
import { getCollection } from "astro:content";
|
||||||
import FormattedDate from '../../components/FormattedDate.astro';
|
import FormattedDate from "../../components/FormattedDate.astro";
|
||||||
|
|
||||||
const posts = (await getCollection('blog')).sort(
|
const posts = (await getCollection("blog")).sort(
|
||||||
(a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf()
|
(a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf(),
|
||||||
);
|
);
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -25,7 +25,12 @@ const posts = (await getCollection('blog')).sort(
|
||||||
posts.map((post) => (
|
posts.map((post) => (
|
||||||
<li>
|
<li>
|
||||||
<a href={`/blog/${post.slug}/`}>
|
<a href={`/blog/${post.slug}/`}>
|
||||||
<img width={720} height={360} src={post.data.heroImage} alt="" />
|
<img
|
||||||
|
width={720}
|
||||||
|
height={360}
|
||||||
|
src={post.data.heroImage}
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
<h4 class="title">{post.data.title}</h4>
|
<h4 class="title">{post.data.title}</h4>
|
||||||
<p class="date">
|
<p class="date">
|
||||||
<FormattedDate date={post.data.pubDate} />
|
<FormattedDate date={post.data.pubDate} />
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
---
|
---
|
||||||
import BaseHead from '../components/BaseHead.astro';
|
import BaseHead from "../components/BaseHead.astro";
|
||||||
import Header from '../components/Header.astro';
|
import Header from "../components/Header.astro";
|
||||||
import Footer from '../components/Footer.astro';
|
import Footer from "../components/Footer.astro";
|
||||||
import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
|
import { SITE_TITLE, SITE_DESCRIPTION } from "../consts";
|
||||||
import Button from '../components/ui/Button.astro';
|
import Button from "../components/ui/Button.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
|
@ -17,10 +17,10 @@ import Button from '../components/ui/Button.astro';
|
||||||
<div class="flex flex-col gap-4 w-1/3">
|
<div class="flex flex-col gap-4 w-1/3">
|
||||||
<h1 class="text-5xl font-bold">Hi there! 👋</h1>
|
<h1 class="text-5xl font-bold">Hi there! 👋</h1>
|
||||||
<p>
|
<p>
|
||||||
Hey there! I'm Mahad, a software engineer and a tech enthusiast.
|
Hey there! I'm Mahad, a software engineer and a tech enthusiast. I
|
||||||
I love to build things and share my knowledge with others!
|
love to build things and share my knowledge with others! I'm currently
|
||||||
I'm currently working on a few projects and writing blog posts about them.
|
working on a few projects and writing blog posts about them. Stay
|
||||||
Stay tuned!
|
tuned!
|
||||||
</p>
|
</p>
|
||||||
<div class="flex flex-row gap-2">
|
<div class="flex flex-row gap-2">
|
||||||
<Button>
|
<Button>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import rss from '@astrojs/rss';
|
import rss from "@astrojs/rss";
|
||||||
import { getCollection } from 'astro:content';
|
import { getCollection } from "astro:content";
|
||||||
import { SITE_TITLE, SITE_DESCRIPTION } from '../consts';
|
import { SITE_TITLE, SITE_DESCRIPTION } from "../consts";
|
||||||
|
|
||||||
export async function GET(context) {
|
export async function GET(context) {
|
||||||
const posts = await getCollection('blog');
|
const posts = await getCollection("blog");
|
||||||
return rss({
|
return rss({
|
||||||
title: SITE_TITLE,
|
title: SITE_TITLE,
|
||||||
description: SITE_DESCRIPTION,
|
description: SITE_DESCRIPTION,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
export default {
|
export default {
|
||||||
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
|
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {},
|
extend: {},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
require("@catppuccin/tailwindcss")({
|
require("@catppuccin/tailwindcss")({
|
||||||
defaultFlavour: "macchiato"
|
defaultFlavour: "macchiato",
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
}
|
};
|
||||||
|
|
Loading…
Reference in a new issue