From 6a6ba907fcb7be36d1d1397ee1a30a430c0c3bce Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 25 Feb 2024 15:27:58 +0000 Subject: [PATCH] Ready for deploy --- web/astro.config.mjs | 12 ++++++++++- web/security.txt.html | 0 web/src/components/things/Comments.svelte | 24 +++++++++++++++++++++ web/src/components/things/SectionList.astro | 18 ++++++++++++++++ web/src/env.d.ts | 1 + web/src/utils/fetch-data.ts | 6 ++++-- 6 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 web/security.txt.html create mode 100644 web/src/components/things/Comments.svelte diff --git a/web/astro.config.mjs b/web/astro.config.mjs index da4f2b0..44af674 100644 --- a/web/astro.config.mjs +++ b/web/astro.config.mjs @@ -5,9 +5,19 @@ import sitemap from '@astrojs/sitemap'; import vercel from "@astrojs/vercel/serverless"; // import netlify from "@astrojs/netlify"; +const siteMapConfig = { + entryLimit: 10000, + changefreq: 'weekly', + priority: 0.7, + lastmod: new Date(), + filter: (page) => { // Exclude search result pages + return !page.url.startsWith('/search/') && page.url.split('/').length > 2; + }, +}; + export default defineConfig({ output: 'hybrid', - integrations: [svelte(), partytown(), sitemap()], + integrations: [svelte(), partytown(), sitemap(siteMapConfig)], site: import.meta.env.SITE_URL || 'https://awesome-privacy.xyz', adapter: vercel(), // adapter: netlify(), diff --git a/web/security.txt.html b/web/security.txt.html new file mode 100644 index 0000000..e69de29 diff --git a/web/src/components/things/Comments.svelte b/web/src/components/things/Comments.svelte new file mode 100644 index 0000000..52f5ccc --- /dev/null +++ b/web/src/components/things/Comments.svelte @@ -0,0 +1,24 @@ + + + + +
diff --git a/web/src/components/things/SectionList.astro b/web/src/components/things/SectionList.astro index f802d41..2e2c790 100644 --- a/web/src/components/things/SectionList.astro +++ b/web/src/components/things/SectionList.astro @@ -109,6 +109,24 @@ ul { a { text-decoration: none; color: var(--foreground); + position: relative; + &:after { + background: none repeat scroll 0 0 transparent; + bottom: 0; + content: ""; + display: block; + height: 2px; + left: 50%; + position: absolute; + background: var(--accent-3); + transition: width 0.15s ease 0s, left 0.15s ease 0s; + width: 0; + } + &:hover:after { + text-decoration: underline; + width: 80%; + left: 0; + } } .service-count { color: var(--accent-3); diff --git a/web/src/env.d.ts b/web/src/env.d.ts index f964fe0..acef35f 100644 --- a/web/src/env.d.ts +++ b/web/src/env.d.ts @@ -1 +1,2 @@ +/// /// diff --git a/web/src/utils/fetch-data.ts b/web/src/utils/fetch-data.ts index c5e905b..534f12f 100644 --- a/web/src/utils/fetch-data.ts +++ b/web/src/utils/fetch-data.ts @@ -3,13 +3,15 @@ import yaml from 'js-yaml'; import type { AwesomePrivacy } from '../types/Service'; +const awesomePrivacyData = 'https://raw.githubusercontent.com/Lissy93/awesome-privacy/main/awesome-privacy.yml'; + export const fetchData = async (): Promise => { - return await fetch('http://localhost:4321/awesome-privacy.yml') + return await fetch(awesomePrivacyData) .then((res) => res.text()) .then((data) => yaml.load(data)) .catch((err) => console.error('ah crap', err)) as AwesomePrivacy; } export const slugify = (title: string) => { - return title.toLowerCase().replace(/\s/g, '-'); + return title.toLowerCase().replace(/\s/g, '-');z };