Skip to content

Commit

Permalink
moving layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
andrioid committed Sep 14, 2024
1 parent 45dc57f commit 87fa208
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const server = {
contactMe: defineAction({
accept: "form",
input: z.object({
email: z.string(),
email: z.string().email(),
}),
handler: async (input) => {
console.log("EMAIL YEAH" + input.email);
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import Nav from "./Nav.astro";
import Nav from "../components/Nav.astro";
import "../../css/global.css";
---

Expand Down
4 changes: 2 additions & 2 deletions src/pages/blog/[...slug].astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
// Find all blog posts to generate
import { type CollectionEntry } from "astro:content";
import Layout from "../../components/Layout.astro";
import PagesLayout from "../../components/PagesLayout.astro";
import Layout from "../../layout/Layout.astro";
import PagesLayout from "../../layout/PagesLayout.astro";
import { getPost } from "../../lib/cms";
import { IS_DEV } from "../../lib/utils/dev";
Expand Down
4 changes: 2 additions & 2 deletions src/pages/blog/index.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import Card from "../../components/card.astro";
import Layout from "../../components/Layout.astro";
import PagesLayout from "../../components/PagesLayout.astro";
import Layout from "../../layout/Layout.astro";
import PagesLayout from "../../layout/PagesLayout.astro";
import Section from "../../components/Section.astro";
import { getPosts } from "../../lib/cms";
Expand Down
14 changes: 7 additions & 7 deletions src/pages/contact/index.astro
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
import { actions } from "astro:actions";
import Layout from "../../components/Layout.astro";
import PagesLayout from "../../components/PagesLayout.astro";
import Layout from "../../layout/Layout.astro";
import PagesLayout from "../../layout/PagesLayout.astro";
import { isInputError } from "astro:actions";
const result = Astro.getActionResult(actions.contactMe);
console.log("result", result);
const inputErrors = isInputError(result?.error) ? result.error.fields : {}
---

<PagesLayout title="Contact me">
<form method="post" action={actions.contactMe}>
<input class="block rounded-md border py-1 px-2" name="email" type="email" />
{result?.error && (
<p>{result.error.message}</p>
)}
<input class="block rounded-md border py-1 px-2" name="email" type="email" aria-describedby="error"/>
{inputErrors.email && <p id="error">{inputErrors.email.join(',')}</p>}
<button type="submit">Wat</button>
</form>
</PagesLayout>
2 changes: 1 addition & 1 deletion src/pages/da/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import flagIS from "../../../static/img/iceland-flag.svg";
import coffeeAndri from "../../../static/img/coffee-art.jpg";
import cvJSON from "../../../packages/cv/resume.json";
import { dataTransform } from "../../lib/cv";
import Layout from "../../components/Layout.astro";
import Layout from "../../layout/Layout.astro";
import BlogCards from "../../components/blog-cards.astro";
import Icon from "../../components/Icon.astro";
import { Image } from "astro:assets";
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import { Icon } from "astro-icon/components";
import Layout from "../components/Layout.astro";
import Layout from "../layout/Layout.astro";
import cv from "../../packages/cv/resume.json";
import { dataTransform } from "../lib/cv";
import ProfileIcon from "../components/profile-icon.astro";
Expand Down
2 changes: 1 addition & 1 deletion src/pages/is/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import flagIS from "../../../static/img/iceland-flag.svg";
import coffeeAndri from "../../../static/img/coffee-art.jpg";
import cvJSON from "../../../packages/cv/resume.json";
import { dataTransform } from "../../lib/cv";
import Layout from "../../components/Layout.astro";
import Layout from "../../layout/Layout.astro";
import BlogCards from "../../components/blog-cards.astro";
import Icon from "../../components/Icon.astro";
import { Image } from "astro:assets";
Expand Down
2 changes: 1 addition & 1 deletion src/pages/old.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import flagIS from "../../static/img/iceland-flag.svg";
import coffeeAndri from "../../static/img/coffee-art.jpg";
import cvJSON from "../../packages/cv/resume.json";
import { dataTransform } from "../lib/cv";
import Layout from "../components/Layout.astro";
import Layout from "../layout/Layout.astro";
import BlogCards from "../components/blog-cards.astro";
import Icon from "../components/Icon.astro";
import { Image } from "astro:assets";
Expand Down

0 comments on commit 87fa208

Please sign in to comment.