diff --git a/src/components/blogList.astro b/src/components/blogList.astro index d027c8d..d4227bd 100644 --- a/src/components/blogList.astro +++ b/src/components/blogList.astro @@ -1,17 +1,30 @@ --- -const allPosts = await Astro.glob('../pages/blog/*.md*') -//@ts-ignore -const posts = allPosts.map(item => (Object.assign({}, item.frontmatter, {url: item.url}))).sort((a, b) => new Date(b.pubDate) - new Date(a.pubDate)); +const allPosts = await Astro.glob("../pages/blog/*.md*"); +const posts = allPosts + .map((item) => Object.assign({}, item.frontmatter, { url: item.url })) + //@ts-expect-error cease this bitch crying, what do you mean i shouldn't implicitly convert Dates to Numbers + .sort((a, b) => new Date(b.pubDate) - new Date(a.pubDate)); ---
-{posts.map((post) => { - if (!post.wip || process.env.NODE_ENV === "development") { return ( - -
-
{post.title} - {post.pubDate}
- {post.description} -
-
-)}})} + { + posts.map((post) => { + if (!post.wip || process.env.NODE_ENV === "development") { + return ( + +
+
+ {post.title} - {post.pubDate} +
+
+ {post.description} +
+
+ ); + } + }) + }
diff --git a/src/components/chapterList.astro b/src/components/chapterList.astro new file mode 100644 index 0000000..77ec7da --- /dev/null +++ b/src/components/chapterList.astro @@ -0,0 +1,25 @@ +--- +const allFicChapters = await Astro.glob(`../pages/fanfic/**/*.md*`); +const sortedChapters = allFicChapters + .filter(v => v.file.includes(Astro.props.name + "/")) + .map((item) => Object.assign({}, item.frontmatter, { url: item.url })) + //@ts-expect-error cease this bitch crying, what do you mean i shouldn't implicitly convert Dates to Numbers + .sort((a, b) => new Date(b.pubDate) - new Date(a.pubDate)); +let i = 1 +--- + +
+ { + sortedChapters.map((chapter) => ( + +
+ Chapter {i++} - {chapter.title} + {chapter.pubDate} +
+
+ )) + } +
diff --git a/src/css/base.scss b/src/css/base.scss index 857555b..a510017 100644 --- a/src/css/base.scss +++ b/src/css/base.scss @@ -13,10 +13,10 @@ align-items: center; justify-content: center; text-align: center; - @media (max-width: 470px) { + @media (max-width: 520px) { margin-bottom: 132px; } - @media (min-width: 470px) { + @media (min-width: 520px) { margin-bottom: 3.4375em; } } @@ -33,12 +33,12 @@ position: fixed; display: flex; flex-grow: 1; - @media (max-width: 470px) { //mobile + @media (max-width: 520px) { //mobile justify-content: flex-end; align-items: center; flex-direction: row; } - @media (min-width: 470px) { //desktop + @media (min-width: 520px) { //desktop justify-content: center; align-items: center; flex-direction: row; @@ -51,14 +51,14 @@ .img-container { display: flex; flex-direction: row; - @media (max-width: 470px) { + @media (max-width: 520px) { flex-direction: column; } img { display: flex; height: 45px; margin-right: 0.625em; - @media (max-width: 470px) { //even smoler mobile + @media (max-width: 520px) { //even smoler mobile height: 30px; margin-top: 0.3125em; margin-bottom: 0.3125em; diff --git a/src/layout/Base.astro b/src/layout/Base.astro index 2cf2420..a040067 100644 --- a/src/layout/Base.astro +++ b/src/layout/Base.astro @@ -8,6 +8,7 @@ import Footer from '../components/footer.astro'; const {title} = Astro.props; --- + @@ -20,6 +21,7 @@ const {title} = Astro.props;