diff --git a/data/2024/week07.md b/data/2024/week07.md new file mode 100644 index 0000000..8c95ac3 --- /dev/null +++ b/data/2024/week07.md @@ -0,0 +1,3 @@ +--- +curator: Mykola +--- \ No newline at end of file diff --git a/web/src/components/WeekNews.astro b/web/src/components/WeekNews.astro index ddc70bb..34ce358 100644 --- a/web/src/components/WeekNews.astro +++ b/web/src/components/WeekNews.astro @@ -12,10 +12,10 @@ const current = false;
-

Week {issue.week.split('-').join('/')}

+

Week {issue.week.split('-').join('/')}

{format(issue.period[0], "MMM d")} - {format(issue.period[1], "MMM d, yyyy")}
{!issue.published && -
🚧 Current week
+
🚧 Future edition
}
diff --git a/web/src/layouts/base.astro b/web/src/layouts/base.astro index ac73a39..0e202a4 100644 --- a/web/src/layouts/base.astro +++ b/web/src/layouts/base.astro @@ -19,13 +19,16 @@ import '../styles/base.css';
- Documentation - Source code + Subscribe now!
+
+ Documentation + Source code +
\ No newline at end of file diff --git a/web/src/pages/index.astro b/web/src/pages/index.astro index 581dcc6..7058f09 100644 --- a/web/src/pages/index.astro +++ b/web/src/pages/index.astro @@ -7,9 +7,6 @@ import issues from '../issues.json'; --- -
- Subscribe now! -
{issues.map((issue) => ( ))} diff --git a/web/src/pages/issue/[week].astro b/web/src/pages/issue/[week].astro new file mode 100644 index 0000000..ced8cac --- /dev/null +++ b/web/src/pages/issue/[week].astro @@ -0,0 +1,24 @@ +--- +import BaseLayout from '../../layouts/base.astro'; +import WeekNews from '../../components/WeekNews.astro'; +import issues from '../../issues.json'; + +export function getStaticPaths() { + return issues.map(issue => { + return { + params: { week: issue.week } + } + }) +} + +const { week } = Astro.params; +const issue = issues.find(item => item.week === week); + +--- + + + + + \ No newline at end of file