mirror of
https://codeberg.org/andyscott-pages/andyscott-dot-me.git
synced 2024-11-09 13:50:49 -05:00
changing files to baseLayout
This commit is contained in:
parent
9cb339941c
commit
ebefc34e23
11 changed files with 47 additions and 35 deletions
32
README.md
32
README.md
|
@ -1,2 +1,34 @@
|
||||||
# astro-personal-website
|
# astro-personal-website
|
||||||
Personal Website template with blog and themes made with Astro
|
Personal Website template with blog and themes made with Astro
|
||||||
|
|
||||||
|
## Project Strucutre
|
||||||
|
|
||||||
|
``` php
|
||||||
|
├── src/
|
||||||
|
│ ├── components/
|
||||||
|
│ │ ├── cs/
|
||||||
|
│ │ │ ├── TimeLine
|
||||||
|
│ │ ├── BaseHead.astro
|
||||||
|
│ │ ├── Card.astro
|
||||||
|
│ │ ├── Footer.astro
|
||||||
|
│ │ ├── Header.astro
|
||||||
|
│ │ └-─ HorizontalCard.jsx
|
||||||
|
│ │ └-─ SideBar.jsx
|
||||||
|
│ ├── layouts/
|
||||||
|
│ │ └-─ BaseLayout.astro
|
||||||
|
│ │ └-─ PostLayout.astro
|
||||||
|
│ └── pages/
|
||||||
|
│ │ ├── posts/
|
||||||
|
│ │ │ ├── post1.md
|
||||||
|
│ │ │ ├── post2.md
|
||||||
|
│ │ │ └── post3.md
|
||||||
|
│ │ └── index.astro
|
||||||
|
│ └── styles/
|
||||||
|
│ └-─ global.css
|
||||||
|
├── public/
|
||||||
|
│ ├── favicon.svg
|
||||||
|
│ └-─ social-image.png
|
||||||
|
├── astro.config.mjs
|
||||||
|
├── package.json
|
||||||
|
└── tsconfig.json
|
||||||
|
```
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
---
|
|
||||||
export interface Props extends astroHTML.JSX.AnchorHTMLAttributes {}
|
|
||||||
|
|
||||||
const { href, class: className, ...props } = Astro.props;
|
|
||||||
const isActive = href === Astro.url.pathname.replace(/\/$/, '');
|
|
||||||
---
|
|
||||||
|
|
||||||
<a href={href} class:list={[className, { active: isActive }]} {...props}>
|
|
||||||
<slot />
|
|
||||||
</a>
|
|
||||||
<style>
|
|
||||||
a {
|
|
||||||
display: inline-block;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
a.active {
|
|
||||||
font-weight: bolder;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
import BaseHead from "../components/BaseHead.astro";
|
import BaseHead from "../components/BaseHead.astro";
|
||||||
import PageLayout from "./Base.astro";
|
import BaseLayout from "./BaseLayout.astro";
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
content: {
|
content: {
|
||||||
|
@ -17,7 +17,7 @@ const {
|
||||||
} = Astro.props;
|
} = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout title={title} description={description} image={heroImage}>
|
<BaseLayout title={title} description={description} image={heroImage}>
|
||||||
<main class="flex justify-center">
|
<main class="flex justify-center">
|
||||||
<article class="prose prose-lg max-w-[750px] prose-img:mx-auto">
|
<article class="prose prose-lg max-w-[750px] prose-img:mx-auto">
|
||||||
{heroImage && <img src={heroImage} alt={title} class="w-full mb-6" />}
|
{heroImage && <img src={heroImage} alt={title} class="w-full mb-6" />}
|
||||||
|
@ -35,4 +35,4 @@ const {
|
||||||
<slot />
|
<slot />
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
</PageLayout>
|
</BaseLayout>
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
import PageLayout from "../../layouts/Base.astro";
|
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||||||
import HorizontalCard from "../../components/HorizontalCard.astro";
|
import HorizontalCard from "../../components/HorizontalCard.astro";
|
||||||
|
|
||||||
export async function getStaticPaths({ paginate }) {
|
export async function getStaticPaths({ paginate }) {
|
||||||
|
@ -12,7 +12,7 @@ export async function getStaticPaths({ paginate }) {
|
||||||
const { page } = Astro.props;
|
const { page } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout>
|
<BaseLayout>
|
||||||
<ul>
|
<ul>
|
||||||
<!--List the array of astronaut info-->
|
<!--List the array of astronaut info-->
|
||||||
{page.data.map(( post ) => (
|
{page.data.map(( post ) => (
|
||||||
|
@ -34,4 +34,4 @@ const { page } = Astro.props;
|
||||||
{page.url.next ? <a href={page.url.next} class="btn btn-ghost my-10 mx-5">Older Posts <svg class="h-6 w-6 fill-current md:h-8 md:w-8" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> <path d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"></path></svg></a> : <div></div>}
|
{page.url.next ? <a href={page.url.next} class="btn btn-ghost my-10 mx-5">Older Posts <svg class="h-6 w-6 fill-current md:h-8 md:w-8" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> <path d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"></path></svg></a> : <div></div>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</PageLayout>
|
</BaseLayout>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
---
|
---
|
||||||
import PageLayout from "../layouts/Base.astro";
|
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||||
import TimeLineElement from "../components/cv/TimeLine.astro";
|
import TimeLineElement from "../components/cv/TimeLine.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout>
|
<BaseLayout>
|
||||||
<div class="mb-5">
|
<div class="mb-5">
|
||||||
<div class="text-3xl w-full font-bold">Profile</div>
|
<div class="text-3xl w-full font-bold">Profile</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -118,4 +118,4 @@ import TimeLineElement from "../components/cv/TimeLine.astro";
|
||||||
<li>Adobe Photoshop</li>
|
<li>Adobe Photoshop</li>
|
||||||
<li>KdenLive</li>
|
<li>KdenLive</li>
|
||||||
</ul>
|
</ul>
|
||||||
</PageLayout>
|
</BaseLayout>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
import PageLayout from "../layouts/Base.astro";
|
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||||
import HorizontalCard from "../components/HorizontalCard.astro";
|
import HorizontalCard from "../components/HorizontalCard.astro";
|
||||||
|
|
||||||
const posts = (await Astro.glob("./blog/*.{md,mdx}")).sort(
|
const posts = (await Astro.glob("./blog/*.{md,mdx}")).sort(
|
||||||
|
@ -9,7 +9,7 @@ const posts = (await Astro.glob("./blog/*.{md,mdx}")).sort(
|
||||||
const last_posts = posts.slice(0, 3);
|
const last_posts = posts.slice(0, 3);
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout>
|
<BaseLayout>
|
||||||
|
|
||||||
<div class="pb-12 mt-5">
|
<div class="pb-12 mt-5">
|
||||||
<div class="text-xl py-1">Hey there 👋</div>
|
<div class="text-xl py-1">Hey there 👋</div>
|
||||||
|
@ -71,4 +71,4 @@ const last_posts = posts.slice(0, 3);
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
</PageLayout>
|
</BaseLayout>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
---
|
---
|
||||||
import PageLayout from "../layouts/Base.astro";
|
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||||
import HorizontalCard from "../components/HorizontalCard.astro";
|
import HorizontalCard from "../components/HorizontalCard.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout>
|
<BaseLayout>
|
||||||
<div>
|
<div>
|
||||||
<div class="text-3xl w-full font-bold mb-5">Applications</div>
|
<div class="text-3xl w-full font-bold mb-5">Applications</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,4 +62,4 @@ import HorizontalCard from "../components/HorizontalCard.astro";
|
||||||
url="https://github.com/manuelernestog/joplin-minimalist-light-theme"
|
url="https://github.com/manuelernestog/joplin-minimalist-light-theme"
|
||||||
badge="FOSS"
|
badge="FOSS"
|
||||||
/>
|
/>
|
||||||
</PageLayout>
|
</BaseLayout>
|
||||||
|
|
Loading…
Reference in a new issue