From 42e71df3c65f8cffab4fdcf18f6deb7d7aac417d Mon Sep 17 00:00:00 2001 From: Ayo Date: Sun, 4 Jun 2023 14:03:28 +0200 Subject: [PATCH 1/3] feat: initial use of cache api --- src/components/Library.astro | 30 ++++++++++++++++++++++++++++++ src/pages/index.astro | 3 +++ 2 files changed, 33 insertions(+) create mode 100644 src/components/Library.astro diff --git a/src/components/Library.astro b/src/components/Library.astro new file mode 100644 index 0000000..55761ed --- /dev/null +++ b/src/components/Library.astro @@ -0,0 +1,30 @@ +
+ + \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index 59577ea..c2cf81c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,6 +3,7 @@ import { extract } from "@extractus/article-extractor"; import AddressBar from "../components/AddressBar.astro"; import Post from "../components/Post.astro"; import Layout from "../layouts/Layout.astro"; +import Library from "../components/Library.astro"; const params = Astro.url.searchParams; const url = params.get('url') || ''; @@ -16,8 +17,10 @@ try { content: "

The article extractor did not get any result.

", }; } + --- + {url && } From c8672fc4eb0e8c1adce09279281c673682ae85ed Mon Sep 17 00:00:00 2001 From: Ayo Date: Sun, 4 Jun 2023 14:56:04 +0200 Subject: [PATCH 2/3] feat: render cached post to page --- README.md | 6 +++--- src/components/Library.astro | 35 ++++++++++++++++++++++++++++------- src/components/post.astro | 4 ++-- src/pages/index.astro | 2 +- 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d004758..86cd9f8 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ Cozy is your modern-day reading assistant. ## Roadmap | Feature | Status | | --- | --- | -| Remove distractions| Done | -| Save to a Reading Library | In-Progress | -| PWA: Offline access to library | | +| Remove distractions| ✅ DONE | +| Save to a Reading Library | ✅ DONE | +| PWA: Offline access to library | 🛠️ In-progress | | AI insights | | | Browser Extensions | | diff --git a/src/components/Library.astro b/src/components/Library.astro index 55761ed..f9aa478 100644 --- a/src/components/Library.astro +++ b/src/components/Library.astro @@ -1,20 +1,26 @@ +--- +export interface Props { + postDivSelector: string +} + +const {postDivSelector} = Astro.props; +---
+ + \ No newline at end of file diff --git a/src/components/post.astro b/src/components/post.astro index 7e39808..f09a26a 100644 --- a/src/components/post.astro +++ b/src/components/post.astro @@ -26,11 +26,6 @@ const datePublished = } +