From 612d7d0e775cba1c6632b77901ab47e8782b3b4d Mon Sep 17 00:00:00 2001 From: tree Date: Mon, 12 Feb 2024 12:57:08 +0100 Subject: [PATCH] update --- utils/build.js | 2 +- web/src/components/WeekNews.astro | 32 +++++++++++++++++++++++++++---- web/src/config.yaml | 6 +++++- web/src/layouts/base.astro | 5 +++-- web/src/pages/issue/[week].astro | 2 +- web/src/styles/base.css | 11 +++++++++++ 6 files changed, 49 insertions(+), 9 deletions(-) diff --git a/utils/build.js b/utils/build.js index 64777df..cc9fcd7 100644 --- a/utils/build.js +++ b/utils/build.js @@ -8,7 +8,7 @@ const SRC_DIR = "./data"; const DEST_DIR = "./dist"; async function build() { - const issues = []; + let issues = []; for await (const dirEntry of Deno.readDir(SRC_DIR)) { if (!dirEntry.isDirectory || !dirEntry.name.match(/^\d{4}$/)) { continue; diff --git a/web/src/components/WeekNews.astro b/web/src/components/WeekNews.astro index c5ce699..0042679 100644 --- a/web/src/components/WeekNews.astro +++ b/web/src/components/WeekNews.astro @@ -1,6 +1,7 @@ --- import { setWeek, nextMonday, format, addDays } from 'date-fns'; -const { issue } = Astro.props; +const { issue, isFull } = Astro.props; +import config from '../config.yaml'; const [ year, week ] = issue.week.split('-'); const current = false; @@ -10,16 +11,16 @@ const current = false;
-
+
-

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

+

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

{format(issue.period[0], "MMM d")} - {format(issue.period[1], "MMM d, yyyy")}
{!issue.published &&
🚧 Future edition
}
-
+
{issue.published && Paragraph } @@ -30,4 +31,27 @@ const current = false;
+ + {!issue.published && isFull && +
+
+
Release helper
+ + + + + + + + + + + + + +
Title
Slug
Post preview
+
+
+ + }
\ No newline at end of file diff --git a/web/src/config.yaml b/web/src/config.yaml index 7df07f2..54ffa49 100644 --- a/web/src/config.yaml +++ b/web/src/config.yaml @@ -1,5 +1,9 @@ +name: Week in the Privacy News cats: events: title: Events gov: - title: Government \ No newline at end of file + title: Government +template: + preview: | + Weekly newsletter with round-up of the most important news happening around privacy in Web3. \ No newline at end of file diff --git a/web/src/layouts/base.astro b/web/src/layouts/base.astro index 43b532b..d0cc820 100644 --- a/web/src/layouts/base.astro +++ b/web/src/layouts/base.astro @@ -1,5 +1,6 @@ --- import '../styles/base.css'; +import config from '../config.yaml'; --- @@ -8,14 +9,14 @@ import '../styles/base.css'; - Week in the Privacy News | Web3Privacy Now + {config.name} | Web3Privacy Now
-

Week in the Privacy News

+

{config.name}

diff --git a/web/src/pages/issue/[week].astro b/web/src/pages/issue/[week].astro index ced8cac..496998d 100644 --- a/web/src/pages/issue/[week].astro +++ b/web/src/pages/issue/[week].astro @@ -20,5 +20,5 @@ const issue = issues.find(item => item.week === week); - + \ No newline at end of file diff --git a/web/src/styles/base.css b/web/src/styles/base.css index 3d074ad..d2376d4 100644 --- a/web/src/styles/base.css +++ b/web/src/styles/base.css @@ -37,6 +37,17 @@ .news-content li { @apply ml-6 mb-2; } + + .release-helper { + @apply m-4; + } + .release-helper th { + @apply pr-4 text-right; + + } + .release-helper textarea { + @apply text-white bg-black p-2; + } } .w3pn-logo {