diff --git a/src/components/Container.astro b/src/components/Container.astro
new file mode 100644
index 0000000..aa748a3
--- /dev/null
+++ b/src/components/Container.astro
@@ -0,0 +1,16 @@
+
+
+
diff --git a/src/components/HomePosts.astro b/src/components/HomePosts.astro
index 859d8c7..3e5b829 100644
--- a/src/components/HomePosts.astro
+++ b/src/components/HomePosts.astro
@@ -17,7 +17,7 @@ let posts = allPosts
new Date(b.data.updated || b.data.added).valueOf() -
new Date(a.data.updated || a.data.added).valueOf(),
)
- .slice(0, 6);
+ .slice(0, 8);
---
diff --git a/src/components/PostGrid.astro b/src/components/PostGrid.astro
index 845f00f..ebcb12c 100644
--- a/src/components/PostGrid.astro
+++ b/src/components/PostGrid.astro
@@ -47,7 +47,7 @@ function getTiltDegrees() {
gap: 1em;
@media (min-width: 1024px) {
- grid-template-columns: repeat(2, 1fr);
+ grid-template-columns: repeat(4, 1fr);
}
}
diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro
index 0c3ade2..0751099 100644
--- a/src/layouts/BlogPost.astro
+++ b/src/layouts/BlogPost.astro
@@ -4,62 +4,63 @@ import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
import ColorScript from "../components/ColorScript.astro";
import Tags from "../components/Tags.astro";
+import Container from "../components/Container.astro";
let {
- content: { title, description, added, updated, tags, heroImage },
+ content: { title, description, added, updated, tags, heroImage },
} = Astro.props;
-added = new Date(added).toLocaleDateString(
- "eu",
- {
- year: "numeric",
- month: "short",
- day: "numeric",
- }
-);
+added = new Date(added).toLocaleDateString("eu", {
+ year: "numeric",
+ month: "short",
+ day: "numeric",
+});
if (updated) {
- updated = new Date(updated).toLocaleDateString(
- "eu",
- {
- year: "numeric",
- month: "short",
- day: "numeric",
- }
- );
+ updated = new Date(updated).toLocaleDateString("eu", {
+ year: "numeric",
+ month: "short",
+ day: "numeric",
+ });
}
---
-
+
-
-
-
-
- {heroImage &&
}
- {title}
- {updated ?
- , azken eguneraketa:
- :
- {added && }
- }
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {heroImage &&
}
+ {title}
+ {
+ updated ? (
+
+ , azken eguneraketa:
+
+ ) : (
+ {added && }
+ )
+ }
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/404.astro b/src/pages/404.astro
index 20fd2a9..3fad6c5 100644
--- a/src/pages/404.astro
+++ b/src/pages/404.astro
@@ -7,6 +7,7 @@ import ColorScript from "../components/ColorScript.astro";
import Tags from "../components/Tags.astro";
import { SITE_TITLE, SITE_DESCRIPTION } from "../config";
import getTags from "../scripts/getTags";
+import Container from "../components/Container.astro";
const posts = await getCollection("posts");
const tags = getTags(posts);
@@ -14,15 +15,17 @@ const tags = getTags(posts);
-
-
-
-
- 404: Ez da orria aurkitu
+
+
+
+
+
+ 404: Ez da orria aurkitu
-
-
-
-
-
+
+
+
+
+
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 47f07b5..4b33911 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -9,6 +9,7 @@ import Tags from "../components/Tags.astro";
import { SITE_TITLE, SITE_DESCRIPTION } from "../config";
import { Content as About } from "./about.md";
import getTags from "../scripts/getTags";
+import Container from "../components/Container.astro";
const posts = await getCollection("posts");
const tags = getTags(posts);
@@ -16,22 +17,30 @@ const tags = getTags(posts);
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
- Honatx nire azken postak
+ Honatx nire azken postak
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/post/index.astro b/src/pages/post/index.astro
index c1b4bcf..5d6bdfc 100644
--- a/src/pages/post/index.astro
+++ b/src/pages/post/index.astro
@@ -7,6 +7,7 @@ import Post from "../../components/Post.astro";
import ColorScript from "../../components/ColorScript.astro";
import { SITE_TITLE, SITE_DESCRIPTION } from "../../config";
+import Container from "../../components/Container.astro";
let posts = await getCollection("posts");
@@ -21,15 +22,17 @@ posts = posts.sort(
-
-
-
-
- {posts.map((post) => )}
-
-
-
-
-
+
+
+
+
+
+ {posts.map((post) => )}
+
+
+
+
+
diff --git a/src/pages/tag/[tag].astro b/src/pages/tag/[tag].astro
index f97e817..bf73951 100644
--- a/src/pages/tag/[tag].astro
+++ b/src/pages/tag/[tag].astro
@@ -7,56 +7,58 @@ import Post from "../../components/Post.astro";
import ColorScript from "../../components/ColorScript.astro";
import { SITE_TITLE, SITE_DESCRIPTION } from "../../config";
+import Container from "../../components/Container.astro";
export async function getStaticPaths() {
- const posts = await getCollection("posts");
- const tags = posts.reduce[]>>((allTags, post) => {
- const postTags = post.data.tags;
- if (postTags) {
- postTags.forEach((tag) => {
- if (!allTags[tag]) {
- allTags[tag] = [];
- }
- allTags[tag].push(post);
- });
- }
- return allTags;
- }, {});
+ const posts = await getCollection("posts");
+ const tags = posts.reduce[]>>(
+ (allTags, post) => {
+ const postTags = post.data.tags;
+ if (postTags) {
+ postTags.forEach((tag) => {
+ if (!allTags[tag]) {
+ allTags[tag] = [];
+ }
+ allTags[tag].push(post);
+ });
+ }
+ return allTags;
+ },
+ {},
+ );
- return Object.keys(tags).map((t) => {
- return {
- params: { tag: t },
- props: { tag: tags[t] },
- };
- });
+ return Object.keys(tags).map((t) => {
+ return {
+ params: { tag: t },
+ props: { tag: tags[t] },
+ };
+ });
}
const { tag } = Astro.props;
const { tag: currentTag } = Astro.params;
let sortedPosts = tag.sort(
- (a, b) => new Date(b.data.added).valueOf() - new Date(a.data.added).valueOf(),
+ (a, b) => new Date(b.data.added).valueOf() - new Date(a.data.added).valueOf(),
);
---
-
+
-
-
-
-
-
- "{currentTag}" etiketa daukaten postak
-
-
-
-
-
-
+
+
+
+
+
+
+ "{currentTag}" etiketa daukaten postak
+
+
+
+
+
+
+
diff --git a/src/style/global.css b/src/style/global.css
index 539f8b2..8be9757 100644
--- a/src/style/global.css
+++ b/src/style/global.css
@@ -28,7 +28,6 @@
body {
margin: auto;
padding: 20px;
- max-width: 70ch;
background-color: var(--white);
word-wrap: break-word;
overflow-wrap: break-word;