Commit 61fd569e7a

61fd569e7a981560f83af9c7bab27b1e443688df

parent: 2b1b4d306b

Unsigned

Alicia Sykes <alicia@omg.lol> · 2026-03-28 10:09 UTC

Fixes formatting

Layout: unified · split

web/src/components/Hero.astro +5 −3
@@ -9,14 +9,17 @@ import FontAwesome from '@components/form/FontAwesome.svelte';
9 popular software and services. 9 popular software and services.
10 </p> 10 </p>
11 <div class="github-link-wrap"> 11 <div class="github-link-wrap">
12 <a href="https://github.com/lissy93/awesome-privacy" target="_blank" rel="noopener noreferrer"> 12 <a
13 href="https://github.com/lissy93/awesome-privacy"
14 target="_blank"
15 rel="noopener noreferrer"
16 >
13 <FontAwesome iconName="github" /> 17 <FontAwesome iconName="github" />
14 View on GitHub 18 View on GitHub
15 </a> 19 </a>
16 </div> 20 </div>
17</div> 21</div>
18 22
19
20<style lang="scss"> 23<style lang="scss">
21 .hero { 24 .hero {
22 color: var(--accent-fg); 25 color: var(--accent-fg);
@@ -94,5 +97,4 @@ import FontAwesome from '@components/form/FontAwesome.svelte';
94 } 97 }
95 } 98 }
96 } 99 }
97
98</style> 100</style>
web/src/components/scafold/Footer.astro +8 −5
@@ -5,12 +5,15 @@ const year = new Date().getFullYear();
5<footer> 5<footer>
6 <a href="/about">Awesome Privacy</a> is licensed under <a 6 <a href="/about">Awesome Privacy</a> is licensed under <a
7 href="https://github.com/Lissy93/awesome-privacy/blob/main/LICENSE" 7 href="https://github.com/Lissy93/awesome-privacy/blob/main/LICENSE"
8 target="_blank" rel="noopener noreferrer">CC0 1.0 Universal</a 8 target="_blank"
9 rel="noopener noreferrer">CC0 1.0 Universal</a
9 > 10 >
10 © <a href="https://aliciasykes.com" target="_blank" rel="noopener noreferrer">Alicia Sykes</a> 2018 - { 11 © <a href="https://aliciasykes.com" target="_blank" rel="noopener noreferrer"
11 year || 'Present' 12 >Alicia Sykes</a
12 } | Source code available on <a 13 > 2018 - {year || 'Present'} | Source code available on <a
13 href="https://github.com/Lissy93/awesome-privacy" target="_blank" rel="noopener noreferrer">GitHub</a 14 href="https://github.com/Lissy93/awesome-privacy"
15 target="_blank"
16 rel="noopener noreferrer">GitHub</a
14 > 17 >
15</footer> 18</footer>
16 19
web/src/components/scafold/NavBar.astro +78 −35
@@ -3,13 +3,17 @@ import FontAwesome from '@components/form/FontAwesome.svelte';
3import ThemeSwitcher from '@components/form/ThemeSwitcher.svelte'; 3import ThemeSwitcher from '@components/form/ThemeSwitcher.svelte';
4 4
5const navLinks = [ 5const navLinks = [
6 { label: 'View All', href: '/all' }, 6 { label: 'View All', href: '/all' },
7 { label: 'Search', href: '/search' }, 7 { label: 'Search', href: '/search' },
8 { label: 'Changelog', href: '/changelog' }, 8 { label: 'Changelog', href: '/changelog' },
9 { label: 'API', href: '/api' }, 9 { label: 'API', href: '/api' },
10 { label: 'Saved', href: '/inventory', id: 'saved-nav-link', hidden: true }, 10 { label: 'Saved', href: '/inventory', id: 'saved-nav-link', hidden: true },
11 { label: 'About', href: '/about' }, 11 { label: 'About', href: '/about' },
12 { label: 'GitHub', href: 'https://github.com/lissy93/awesome-privacy', external: true }, 12 {
13 label: 'GitHub',
14 href: 'https://github.com/lissy93/awesome-privacy',
15 external: true,
16 },
13]; 17];
14--- 18---
15 19
@@ -25,22 +29,25 @@ const navLinks = [
25 aria-expanded="false" 29 aria-expanded="false"
26 aria-controls="nav-menu" 30 aria-controls="nav-menu"
27 > 31 >
28 <span class="burger-line" /><span class="burger-line" /><span class="burger-line" /> 32 <span class="burger-line"></span><span class="burger-line"></span><span
33 class="burger-line"></span>
29 </button> 34 </button>
30 <nav id="nav-menu" aria-label="Main navigation"> 35 <nav id="nav-menu" aria-label="Main navigation">
31 {navLinks.map((link) => ( 36 {
32 <a 37 navLinks.map((link) => (
33 href={link.href} 38 <a
34 class="nav-link" 39 href={link.href}
35 id={link.id} 40 class="nav-link"
36 style={link.hidden ? 'display:none' : undefined} 41 id={link.id}
37 target={link.external ? '_blank' : undefined} 42 style={link.hidden ? 'display:none' : undefined}
38 rel={link.external ? 'noopener noreferrer' : undefined} 43 target={link.external ? '_blank' : undefined}
39 > 44 rel={link.external ? 'noopener noreferrer' : undefined}
40 {link.label} 45 >
41 {link.external && <span class="sr-only">(opens in new tab)</span>} 46 {link.label}
42 </a> 47 {link.external && <span class="sr-only">(opens in new tab)</span>}
43 ))} 48 </a>
49 ))
50 }
44 <div class="theme-switcher"> 51 <div class="theme-switcher">
45 <ThemeSwitcher client:load /> 52 <ThemeSwitcher client:load />
46 </div> 53 </div>
@@ -81,7 +88,9 @@ const navLinks = [
81 const saved = JSON.parse(localStorage.getItem('savedServices') || '[]'); 88 const saved = JSON.parse(localStorage.getItem('savedServices') || '[]');
82 const el = document.getElementById('saved-nav-link'); 89 const el = document.getElementById('saved-nav-link');
83 if (el && saved.length > 0) el.style.display = ''; 90 if (el && saved.length > 0) el.style.display = '';
84 } catch { /* ignore parse errors */ } 91 } catch {
92 /* ignore parse errors */
93 }
85 }); 94 });
86</script> 95</script>
87 96
@@ -137,9 +146,15 @@ const navLinks = [
137 transition: var(--transition-fast); 146 transition: var(--transition-fast);
138 } 147 }
139 &.is-active .burger-line { 148 &.is-active .burger-line {
140 &:nth-child(1) { transform: translateY(7px) rotate(45deg); } 149 &:nth-child(1) {
141 &:nth-child(2) { opacity: 0; } 150 transform: translateY(7px) rotate(45deg);
142 &:nth-child(3) { transform: translateY(-7px) rotate(-45deg); } 151 }
152 &:nth-child(2) {
153 opacity: 0;
154 }
155 &:nth-child(3) {
156 transform: translateY(-7px) rotate(-45deg);
157 }
143 } 158 }
144 } 159 }
145 160
@@ -154,13 +169,25 @@ const navLinks = [
154 font-weight: bold; 169 font-weight: bold;
155 color: var(--foreground); 170 color: var(--foreground);
156 text-decoration: none; 171 text-decoration: none;
157 transition: background 0.3s ease-in-out, color 0.3s ease-in-out; 172 transition:
173 background 0.3s ease-in-out,
174 color 0.3s ease-in-out;
158 &:hover { 175 &:hover {
159 color: var(--accent-fg); 176 color: var(--accent-fg);
160 &:nth-child(4n+1) { background: var(--accent); } 177 &:nth-child(4n + 1) {
161 &:nth-child(4n+2) { background: var(--accent-2); color: var(--foreground); } 178 background: var(--accent);
162 &:nth-child(4n+3) { background: var(--accent-3); } 179 }
163 &:nth-child(4n+4) { background: var(--accent-4); color: var(--foreground); } 180 &:nth-child(4n + 2) {
181 background: var(--accent-2);
182 color: var(--foreground);
183 }
184 &:nth-child(4n + 3) {
185 background: var(--accent-3);
186 }
187 &:nth-child(4n + 4) {
188 background: var(--accent-4);
189 color: var(--foreground);
190 }
164 } 191 }
165 } 192 }
166 .theme-switcher { 193 .theme-switcher {
@@ -175,7 +202,9 @@ const navLinks = [
175 font-size: var(--text-base); 202 font-size: var(--text-base);
176 } 203 }
177 .logo { 204 .logo {
178 span { font-size: var(--text-3xl); } 205 span {
206 font-size: var(--text-3xl);
207 }
179 } 208 }
180 } 209 }
181 210
@@ -183,10 +212,20 @@ const navLinks = [
183 flex-wrap: wrap; 212 flex-wrap: wrap;
184 .logo { 213 .logo {
185 margin: 0 auto; 214 margin: 0 auto;
186 :global(svg) { @media (max-width: 428px) { display: none; } } 215 :global(svg) {
187 span { @media (max-width: 428px) { font-size: var(--text-2xl); } } 216 @media (max-width: 428px) {
217 display: none;
218 }
219 }
220 span {
221 @media (max-width: 428px) {
222 font-size: var(--text-2xl);
223 }
224 }
225 }
226 .burger {
227 display: flex;
188 } 228 }
189 .burger { display: flex; }
190 nav { 229 nav {
191 display: none; 230 display: none;
192 flex-direction: column; 231 flex-direction: column;
@@ -198,14 +237,18 @@ const navLinks = [
198 border-bottom: 2px solid var(--accent-3); 237 border-bottom: 2px solid var(--accent-3);
199 z-index: 100; 238 z-index: 100;
200 height: auto; 239 height: auto;
201 &.open { display: flex; } 240 &.open {
241 display: flex;
242 }
202 .nav-link { 243 .nav-link {
203 width: 100%; 244 width: 100%;
204 text-align: center; 245 text-align: center;
205 padding: var(--space-md) var(--space-lg); 246 padding: var(--space-md) var(--space-lg);
206 border-bottom: 1px solid var(--accent-3-translucent); 247 border-bottom: 1px solid var(--accent-3-translucent);
207 } 248 }
208 .theme-switcher { display: none; } 249 .theme-switcher {
250 display: none;
251 }
209 } 252 }
210 } 253 }
211 } 254 }
web/src/components/things/DataActions.svelte +7 −3
@@ -91,9 +91,13 @@
91{#if lineNumbers} 91{#if lineNumbers}
92 <h4>Edit {serviceName} Data</h4> 92 <h4>Edit {serviceName} Data</h4>
93 <p> 93 <p>
94 You can edit {serviceName}'s entry in <a href={getGitHubSrcFile()}> this section </a> of <code>awesome-privacy.yml</code> by submitting a PR to our GitHub repo.<br> 94 You can edit {serviceName}'s entry in
95 Note that some of the information shown above has been aggregated from external sources, 95 <a href={getGitHubSrcFile()}> this section </a>
96 a list of these can be found <a href="/about#our-data">data documentation</a>. 96 of <code>awesome-privacy.yml</code> by submitting a PR to our GitHub repo.<br
97 />
98 Note that some of the information shown above has been aggregated from external
99 sources, a list of these can be found
100 <a href="/about#our-data">data documentation</a>.
97 </p> 101 </p>
98 102
99 <h4>Origin Data</h4> 103 <h4>Origin Data</h4>
web/src/components/things/ListingHero.astro +178 −62
@@ -14,9 +14,21 @@ interface Props {
14 14
15const { service, parentSection, categoryName, privacyPolicyLink } = Astro.props; 15const { service, parentSection, categoryName, privacyPolicyLink } = Astro.props;
16const { 16const {
17 name, description, url, github, tosdrId, iosApp, androidApp, 17 name,
18 discordInvite, subreddit, icon, followWith, links, 18 description,
19 securityAudited, openSource, acceptsCrypto, 19 url,
20 github,
21 tosdrId,
22 iosApp,
23 androidApp,
24 discordInvite,
25 subreddit,
26 icon,
27 followWith,
28 links,
29 securityAudited,
30 openSource,
31 acceptsCrypto,
20} = service; 32} = service;
21 33
22const catSlug = slugify(categoryName); 34const catSlug = slugify(categoryName);
@@ -28,23 +40,81 @@ const otherServices = parentSection.services.filter(
28 40
29const infoLinks = [ 41const infoLinks = [
30 url && { label: 'Homepage', href: url, text: formatLink(url) }, 42 url && { label: 'Homepage', href: url, text: formatLink(url) },
31 github && { label: 'GitHub', href: `https://github.com/${github}`, text: `github.com/${github}` }, 43 github && {
32 tosdrId && { label: 'Privacy', href: privacyPolicyLink, text: formatLink(privacyPolicyLink || '') }, 44 label: 'GitHub',
45 href: `https://github.com/${github}`,
46 text: `github.com/${github}`,
47 },
48 tosdrId && {
49 label: 'Privacy',
50 href: privacyPolicyLink,
51 text: formatLink(privacyPolicyLink || ''),
52 },
33 iosApp && { label: 'iOS App', href: iosApp, text: formatLink(iosApp) }, 53 iosApp && { label: 'iOS App', href: iosApp, text: formatLink(iosApp) },
34 androidApp && { label: 'Android App', href: `https://play.google.com/store/apps/details?id=${androidApp}`, text: `play.google.com/.../${androidApp}` }, 54 androidApp && {
35 discordInvite && { label: 'Discord', href: `https://discord.com/invite/${discordInvite}`, text: discordInvite }, 55 label: 'Android App',
36 subreddit && { label: 'Subreddit', href: `https://reddit.com/r/${subreddit}`, text: `r/${subreddit}` }, 56 href: `https://play.google.com/store/apps/details?id=${androidApp}`,
37 url && { label: 'Web info', href: `https://web-check.xyz/check/${formatLink(url)}`, text: `web-check.xyz/check/${formatLink(url).split('/')[0]}` }, 57 text: `play.google.com/.../${androidApp}`,
38 ...(links || []).map((link) => ({ label: link.title, href: link.url, text: link.url })), 58 },
59 discordInvite && {
60 label: 'Discord',
61 href: `https://discord.com/invite/${discordInvite}`,
62 text: discordInvite,
63 },
64 subreddit && {
65 label: 'Subreddit',
66 href: `https://reddit.com/r/${subreddit}`,
67 text: `r/${subreddit}`,
68 },
69 url && {
70 label: 'Web info',
71 href: `https://web-check.xyz/check/${formatLink(url)}`,
72 text: `web-check.xyz/check/${formatLink(url).split('/')[0]}`,
73 },
74 ...(links || []).map((link) => ({
75 label: link.title,
76 href: link.url,
77 text: link.url,
78 })),
39].filter(Boolean) as { label: string; href: string | null; text: string }[]; 79].filter(Boolean) as { label: string; href: string | null; text: string }[];
40 80
41const highlights = [ 81const highlights = [
42 securityAudited && { icon: 'securityAudited', text: 'Security Audited', cls: 'great', title: `${name} has been security audited by an accredited auditor, with results published publicly` }, 82 securityAudited && {
43 acceptsCrypto && { icon: 'cryptoAccepted', text: 'Crypto Payments Accepted', cls: 'great', title: `${name} accepts anonymous payment methods` }, 83 icon: 'securityAudited',
44 securityAudited === false && { icon: 'notSecurityAudited', text: 'No Security Audit', cls: 'warning', title: `${name} has not been audited` }, 84 text: 'Security Audited',
45 openSource === false && { icon: 'closedSource', text: 'Not Open Source', cls: 'warning', title: `${name} is not open source` }, 85 cls: 'great',
46 (openSource || (github && openSource !== false)) && { icon: 'openSource', text: 'Open Source', cls: 'great', title: `${name} is open source` }, 86 title: `${name} has been security audited by an accredited auditor, with results published publicly`,
47].filter(Boolean) as { icon: string; text: string; cls: string; title: string }[]; 87 },
88 acceptsCrypto && {
89 icon: 'cryptoAccepted',
90 text: 'Crypto Payments Accepted',
91 cls: 'great',
92 title: `${name} accepts anonymous payment methods`,
93 },
94 securityAudited === false && {
95 icon: 'notSecurityAudited',
96 text: 'No Security Audit',
97 cls: 'warning',
98 title: `${name} has not been audited`,
99 },
100 openSource === false && {
101 icon: 'closedSource',
102 text: 'Not Open Source',
103 cls: 'warning',
104 title: `${name} is not open source`,
105 },
106 (openSource || (github && openSource !== false)) && {
107 icon: 'openSource',
108 text: 'Open Source',
109 cls: 'great',
110 title: `${name} is open source`,
111 },
112].filter(Boolean) as {
113 icon: string;
114 text: string;
115 cls: string;
116 title: string;
117}[];
48--- 118---
49 119
50<section class="hero-section"> 120<section class="hero-section">
@@ -86,45 +156,63 @@ const highlights = [
86 <div> 156 <div>
87 <p class="description" set:html={parseMarkdown(description)} /> 157 <p class="description" set:html={parseMarkdown(description)} />
88 <ul> 158 <ul>
89 {infoLinks.map((link) => ( 159 {
90 <li> 160 infoLinks.map((link) => (
91 <b>{link.label}:</b> 161 <li>
92 <a href={link.href} target="_blank" rel="noopener noreferrer">{link.text}</a> 162 <b>{link.label}:</b>
93 </li> 163 <a href={link.href} target="_blank" rel="noopener noreferrer">
94 ))} 164 {link.text}
165 </a>
166 </li>
167 ))
168 }
95 </ul> 169 </ul>
96 <div class="related"> 170 <div class="related">
97 {(parentSection.alternativeTo || []).length > 0 && ( 171 {
98 <div class="related-group"> 172 (parentSection.alternativeTo || []).length > 0 && (
99 <h4 class="avoid"><FontAwesome iconName="faceBad" /> Avoid</h4> 173 <div class="related-group">
100 <ul> 174 <h4 class="avoid">
101 {(parentSection.alternativeTo || []).map((alt: string) => ( 175 <FontAwesome iconName="faceBad" /> Avoid
102 <li><span>{alt}</span></li> 176 </h4>
103 ))} 177 <ul>
104 </ul> 178 {(parentSection.alternativeTo || []).map((alt: string) => (
105 </div> 179 <li>
106 )} 180 <span>{alt}</span>
107 {otherServices.length > 0 && ( 181 </li>
108 <div class="related-group"> 182 ))}
109 <h4 class="consider"><FontAwesome iconName="faceGood" /> Also Consider</h4> 183 </ul>
110 <ul> 184 </div>
111 {otherServices.map((s: Service) => ( 185 )
112 <li> 186 }
113 <a href={`/${catSlug}/${secSlug}/${slugify(s.name)}`}>{s.name}</a> 187 {
114 </li> 188 otherServices.length > 0 && (
115 ))} 189 <div class="related-group">
116 </ul> 190 <h4 class="consider">
117 </div> 191 <FontAwesome iconName="faceGood" /> Also Consider
118 )} 192 </h4>
193 <ul>
194 {otherServices.map((s: Service) => (
195 <li>
196 <a href={`/${catSlug}/${secSlug}/${slugify(s.name)}`}>
197 {s.name}
198 </a>
199 </li>
200 ))}
201 </ul>
202 </div>
203 )
204 }
119 </div> 205 </div>
120 </div> 206 </div>
121 </div> 207 </div>
122 <div class="highlights"> 208 <div class="highlights">
123 {highlights.map((h) => ( 209 {
124 <span class={`meta-item ${h.cls}`} title={h.title}> 210 highlights.map((h) => (
125 <FontAwesome iconName={h.icon} /> {h.text} 211 <span class={`meta-item ${h.cls}`} title={h.title}>
126 </span> 212 <FontAwesome iconName={h.icon} /> {h.text}
127 ))} 213 </span>
214 ))
215 }
128 </div> 216 </div>
129</section> 217</section>
130 218
@@ -143,18 +231,24 @@ const highlights = [
143 h2 { 231 h2 {
144 font-size: var(--text-4xl); 232 font-size: var(--text-4xl);
145 margin: 0; 233 margin: 0;
146 @media (max-width: 768px) { text-align: center; } 234 @media (max-width: 768px) {
235 text-align: center;
236 }
147 } 237 }
148 .url-wrap { 238 .url-wrap {
149 display: flex; 239 display: flex;
150 align-items: center; 240 align-items: center;
151 gap: var(--space-sm); 241 gap: var(--space-sm);
152 a { font-size: var(--text-md); } 242 a {
243 font-size: var(--text-md);
244 }
153 .follow-with { 245 .follow-with {
154 font-style: italic; 246 font-style: italic;
155 opacity: var(--opacity-muted); 247 opacity: var(--opacity-muted);
156 } 248 }
157 @media (max-width: 768px) { flex-direction: column; } 249 @media (max-width: 768px) {
250 flex-direction: column;
251 }
158 } 252 }
159 } 253 }
160 254
@@ -170,11 +264,15 @@ const highlights = [
170 opacity: 0.9; 264 opacity: 0.9;
171 display: flex; 265 display: flex;
172 gap: var(--space-sm); 266 gap: var(--space-sm);
173 @media (max-width: 768px) { flex-direction: column; } 267 @media (max-width: 768px) {
268 flex-direction: column;
269 }
174 .service-icon { 270 .service-icon {
175 border-radius: var(--curve-md); 271 border-radius: var(--curve-md);
176 margin-top: var(--space-md); 272 margin-top: var(--space-md);
177 @media (max-width: 768px) { margin: var(--space-md) auto 0 auto; } 273 @media (max-width: 768px) {
274 margin: var(--space-md) auto 0 auto;
275 }
178 } 276 }
179 ul { 277 ul {
180 padding-left: var(--space-md); 278 padding-left: var(--space-md);
@@ -187,7 +285,10 @@ const highlights = [
187 font-weight: 400; 285 font-weight: 400;
188 min-width: 100px; 286 min-width: 100px;
189 display: inline-block; 287 display: inline-block;
190 @media (max-width: 768px) { width: auto; display: block; } 288 @media (max-width: 768px) {
289 width: auto;
290 display: block;
291 }
191 } 292 }
192 } 293 }
193 } 294 }
@@ -207,9 +308,16 @@ const highlights = [
207 display: flex; 308 display: flex;
208 align-items: center; 309 align-items: center;
209 gap: var(--space-xs); 310 gap: var(--space-xs);
210 :global(svg) { width: var(--text-sm); height: var(--text-sm); } 311 :global(svg) {
211 &.avoid :global(svg) { color: var(--danger); } 312 width: var(--text-sm);
212 &.consider :global(svg) { color: var(--success-muted); } 313 height: var(--text-sm);
314 }
315 &.avoid :global(svg) {
316 color: var(--danger);
317 }
318 &.consider :global(svg) {
319 color: var(--success-muted);
320 }
213 } 321 }
214 ul { 322 ul {
215 list-style: none; 323 list-style: none;
@@ -226,9 +334,13 @@ const highlights = [
226 a { 334 a {
227 color: var(--foreground); 335 color: var(--foreground);
228 text-decoration: none; 336 text-decoration: none;
229 &:hover { color: var(--accent); } 337 &:hover {
338 color: var(--accent);
339 }
340 }
341 span {
342 opacity: var(--opacity-soft);
230 } 343 }
231 span { opacity: var(--opacity-soft); }
232 } 344 }
233 } 345 }
234 } 346 }
@@ -254,11 +366,15 @@ const highlights = [
254 } 366 }
255 .warning { 367 .warning {
256 color: var(--danger); 368 color: var(--danger);
257 :global(svg) { color: var(--danger); } 369 :global(svg) {
370 color: var(--danger);
371 }
258 } 372 }
259 .great { 373 .great {
260 color: var(--success-muted); 374 color: var(--success-muted);
261 :global(svg) { color: var(--success-muted); } 375 :global(svg) {
376 color: var(--success-muted);
377 }
262 } 378 }
263 } 379 }
264</style> 380</style>
web/src/components/things/ServiceCard.svelte +12 −2
@@ -50,11 +50,21 @@
50 </div> 50 </div>
51 51
52 <div class="service-links"> 52 <div class="service-links">
53 <a class="link" href={service.url} target="_blank" rel="noopener noreferrer"> 53 <a
54 class="link"
55 href={service.url}
56 target="_blank"
57 rel="noopener noreferrer"
58 >
54 <FontAwesome iconName="website" /> <span>{formatLink(service.url)}</span> 59 <FontAwesome iconName="website" /> <span>{formatLink(service.url)}</span>
55 </a> 60 </a>
56 {#if service.github} 61 {#if service.github}
57 <a class="link" href={`https://github.com/${service.github}`} target="_blank" rel="noopener noreferrer"> 62 <a
63 class="link"
64 href={`https://github.com/${service.github}`}
65 target="_blank"
66 rel="noopener noreferrer"
67 >
58 <FontAwesome iconName="sourceCode" /> GitHub 68 <FontAwesome iconName="sourceCode" /> GitHub
59 </a> 69 </a>
60 {/if} 70 {/if}
web/src/pages/[...listing].astro +22 −8
@@ -50,10 +50,16 @@ const makeKeyWordTag = () => {
50 const keywords = [ 50 const keywords = [
51 `open source ${parentSection.name}`, 51 `open source ${parentSection.name}`,
52 `${parentSection.name} comparison`, 52 `${parentSection.name} comparison`,
53 ...(parentSection.alternativeTo || []).map((alt: string) => `${alt} alternative`), 53 ...(parentSection.alternativeTo || []).map(
54 (alt: string) => `${alt} alternative`,
55 ),
54 ...(parentSection.services || []).map((serv: Service) => `${serv.name} vs`), 56 ...(parentSection.services || []).map((serv: Service) => `${serv.name} vs`),
55 'private', 'ad free', 'encrypted', 'open source software', 57 'private',
56 'privacy respecting apps', 'free tools', 58 'ad free',
59 'encrypted',
60 'open source software',
61 'privacy respecting apps',
62 'free tools',
57 ]; 63 ];
58 return keywords.join(', '); 64 return keywords.join(', ');
59}; 65};
@@ -135,7 +141,9 @@ const githubData = github ? await fetchGitHubStats(github) : null;
135const privacyData = tosdrId ? await fetchTosdrPrivacy(tosdrId) : null; 141const privacyData = tosdrId ? await fetchTosdrPrivacy(tosdrId) : null;
136const iosData = iosApp ? await fetchIosInfo(iosApp) : null; 142const iosData = iosApp ? await fetchIosInfo(iosApp) : null;
137const androidData = androidApp ? await fetchAndroidInfo(androidApp) : null; 143const androidData = androidApp ? await fetchAndroidInfo(androidApp) : null;
138const discordData = discordInvite ? await fetchDiscordInfo(discordInvite) : null; 144const discordData = discordInvite
145 ? await fetchDiscordInfo(discordInvite)
146 : null;
139const redditData = subreddit ? await fetchRedditInfo(subreddit) : null; 147const redditData = subreddit ? await fetchRedditInfo(subreddit) : null;
140const dockerData = await fetchDockerData(name); 148const dockerData = await fetchDockerData(name);
141const websiteData = 149const websiteData =
@@ -176,8 +184,10 @@ const findPrivacyPolicyLink = () => {
176 if (!privacyData) return null; 184 if (!privacyData) return null;
177 const docs = privacyData?.parameters?.documents; 185 const docs = privacyData?.parameters?.documents;
178 if (docs) { 186 if (docs) {
179 const pp = (docs || []).find((doc) => doc.name.toLowerCase().includes('privacy policy')); 187 const pp = (docs || []).find((doc) =>
180 if (pp) return pp.url; 188 doc.name.toLowerCase().includes('privacy policy'),
189 );
190 if (pp) return pp.url;
181 } 191 }
182 return `https://tosdr.org/en/service/${tosdrId}`; 192 return `https://tosdr.org/en/service/${tosdrId}`;
183}; 193};
@@ -374,7 +384,9 @@ const getApiEndpoint = () => {
374 background: var(--accent-fg); 384 background: var(--accent-fg);
375 } 385 }
376 386
377 p { margin: var(--space-xs) 0 var(--space-sm) 0; } 387 p {
388 margin: var(--space-xs) 0 var(--space-sm) 0;
389 }
378 390
379 h3 { 391 h3 {
380 font-size: var(--text-3xl); 392 font-size: var(--text-3xl);
@@ -403,7 +415,9 @@ const getApiEndpoint = () => {
403 border-radius: var(--curve-sm); 415 border-radius: var(--curve-sm);
404 font-family: var(--font-code); 416 font-family: var(--font-code);
405 font-size: var(--text-sm); 417 font-size: var(--text-sm);
406 @media (max-width: 768px) { white-space: break-spaces; } 418 @media (max-width: 768px) {
419 white-space: break-spaces;
420 }
407 } 421 }
408 } 422 }
409 423
web/src/pages/changelog.astro +19 −10
@@ -7,21 +7,30 @@ import { fetchChangelog } from '@utils/fetch-changelog';
7const changelog = await fetchChangelog(); 7const changelog = await fetchChangelog();
8--- 8---
9 9
10<Layout title="Changelog | Awesome Privacy" description="A transparent log of all additions, removals, and amendments to the Awesome Privacy list."> 10<Layout
11 title="Changelog | Awesome Privacy"
12 description="A transparent log of all additions, removals, and amendments to the Awesome Privacy list."
13>
11 <div class="changelog-page"> 14 <div class="changelog-page">
12 <Main> 15 <Main>
13 <h2>Changelog</h2> 16 <h2>Changelog</h2>
14 <p> 17 <p>
15 All data in awesome-privacy is managed via Git, 18 All data in awesome-privacy is managed via Git, so that we have a
16 so that we have a complete and transparent changelog 19 complete and transparent changelog of exactly what was added when and by
17 of exactly what was added when and by whom. 20 whom. The corresponding PR for each change contains full details and
18 The corresponding PR for each change contains full details and justifications. 21 justifications.
19 </p> 22 </p>
20 {changelog.entries.length > 0 ? ( 23 {
21 <ChangelogTimeline client:load entries={changelog.entries} rejections={changelog.rejections || []} /> 24 changelog.entries.length > 0 ? (
22 ) : ( 25 <ChangelogTimeline
23 <p class="fallback">Changelog data is currently unavailable.</p> 26 client:load
24 )} 27 entries={changelog.entries}
28 rejections={changelog.rejections || []}
29 />
30 ) : (
31 <p class="fallback">Changelog data is currently unavailable.</p>
32 )
33 }
25 </Main> 34 </Main>
26 </div> 35 </div>
27</Layout> 36</Layout>
web/src/pages/index.astro +10 −7
@@ -25,9 +25,7 @@ const description =
25 <div class="action-card"> 25 <div class="action-card">
26 <Search client:visible data={categories} /> 26 <Search client:visible data={categories} />
27 <span class="action-divider">or</span> 27 <span class="action-divider">or</span>
28 <a href="/all" class="browse-cta"> 28 <a href="/all" class="browse-cta"> Browse All Listings &rarr; </a>
29 Browse All Listings &rarr;
30 </a>
31 </div> 29 </div>
32 <h2 class="browse-title"><a href="/all">Categories</a></h2> 30 <h2 class="browse-title"><a href="/all">Categories</a></h2>
33 <ul class="categories"> 31 <ul class="categories">
@@ -115,10 +113,12 @@ const description =
115 padding: var(--space-md) var(--space-lg); 113 padding: var(--space-md) var(--space-lg);
116 margin: var(--space-lg) auto; 114 margin: var(--space-lg) auto;
117 width: 100%; 115 width: 100%;
118 box-sizing: border-box; 116 box-sizing: border-box;
119 :global(.search-wrap) { 117 :global(.search-wrap) {
120 flex: 1; 118 flex: 1;
121 :global(label) { font-size: var(--text-sm); } 119 :global(label) {
120 font-size: var(--text-sm);
121 }
122 } 122 }
123 .action-divider { 123 .action-divider {
124 font-family: var(--font-subtitle); 124 font-family: var(--font-subtitle);
@@ -148,7 +148,10 @@ const description =
148 align-items: center; 148 align-items: center;
149 width: 95%; 149 width: 95%;
150 padding: var(--space-md); 150 padding: var(--space-md);
151 .browse-cta { width: 100%; text-align: center; } 151 .browse-cta {
152 width: 100%;
153 text-align: center;
154 }
152 } 155 }
153 } 156 }
154 157
@@ -172,7 +175,7 @@ const description =
172 box-shadow: var(--shadow-md); 175 box-shadow: var(--shadow-md);
173 padding: var(--space-md); 176 padding: var(--space-md);
174 width: 100%; 177 width: 100%;
175 box-sizing: border-box; 178 box-sizing: border-box;
176 margin: 0 auto; 179 margin: 0 auto;
177 } 180 }
178 181
web/src/styles/typography.css +2 −1
@@ -62,7 +62,8 @@
62 font-display: swap; 62 font-display: swap;
63 src: 63 src:
64 local('Libre Franklin ExtraBold'), 64 local('Libre Franklin ExtraBold'),
65 url('/fonts/Libre_Franklin/LibreFranklin-VariableFont_wght.ttf') format('truetype'); 65 url('/fonts/Libre_Franklin/LibreFranklin-VariableFont_wght.ttf')
66 format('truetype');
66} 67}
67 68
68/* Lekton Font Faces */ 69/* Lekton Font Faces */
web/src/utils/fetch-android-info.ts +4 −1
@@ -11,7 +11,10 @@ export const fetchAndroidInfo = async (
11 try { 11 try {
12 const res = await fetch(endpoint); 12 const res = await fetch(endpoint);
13 if (!res.ok) { 13 if (!res.ok) {
14 error('Android', `HTTP ${res.status} for ${androidPackage} (${endpoint})`); 14 error(
15 'Android',
16 `HTTP ${res.status} for ${androidPackage} (${endpoint})`,
17 );
15 return null; 18 return null;
16 } 19 }
17 return await res.json(); 20 return await res.json();
web/src/utils/fetch-changelog.ts +1 −1
@@ -2,7 +2,7 @@ import { error } from './logger';
2 2
3const changelogUrl = 3const changelogUrl =
4 'https://raw.githubusercontent.com/Lissy93/awesome-privacy/main/.github/changelog.json'; 4 'https://raw.githubusercontent.com/Lissy93/awesome-privacy/main/.github/changelog.json';
5 // 'https://gist.githubusercontent.com/Lissy93/ddae176f3f21a0d3c0251f5f6cbd3b09/raw/7c6ec883ae70cb8b7a88f3c0babd67f719f59f65/changelog.json'; 5// 'https://gist.githubusercontent.com/Lissy93/ddae176f3f21a0d3c0251f5f6cbd3b09/raw/7c6ec883ae70cb8b7a88f3c0babd67f719f59f65/changelog.json';
6 6
7export interface ChangelogPr { 7export interface ChangelogPr {
8 number: number; 8 number: number;
web/src/utils/fetch-data.ts +4 −1
@@ -10,7 +10,10 @@ export const fetchData = async (): Promise<AwesomePrivacy> => {
10 try { 10 try {
11 const res = await fetch(awesomePrivacyData); 11 const res = await fetch(awesomePrivacyData);
12 if (!res.ok) { 12 if (!res.ok) {
13 error('Data', `HTTP ${res.status} fetching awesome-privacy.yml (${awesomePrivacyData})`); 13 error(
14 'Data',
15 `HTTP ${res.status} fetching awesome-privacy.yml (${awesomePrivacyData})`,
16 );
14 return {} as AwesomePrivacy; 17 return {} as AwesomePrivacy;
15 } 18 }
16 const text = await res.text(); 19 const text = await res.text();
web/src/utils/fetch-privacy-policy.ts +4 −1
@@ -7,7 +7,10 @@ export const fetchTosdrPrivacy = async (
7 try { 7 try {
8 const res = await fetch(endpoint); 8 const res = await fetch(endpoint);
9 if (!res.ok) { 9 if (!res.ok) {
10 error('ToS;DR', `HTTP ${res.status} for service ${serviceId} (${endpoint})`); 10 error(
11 'ToS;DR',
12 `HTTP ${res.status} for service ${serviceId} (${endpoint})`,
13 );
11 return null; 14 return null;
12 } 15 }
13 return await res.json(); 16 return await res.json();
web/src/utils/fetch-repo-info.ts +19 −11
@@ -3,27 +3,33 @@ import { error } from './logger';
3const githubHeaders = (): Record<string, string> => { 3const githubHeaders = (): Record<string, string> => {
4 const headers: Record<string, string> = { 4 const headers: Record<string, string> = {
5 'User-Agent': 'awesome-privacy', 5 'User-Agent': 'awesome-privacy',
6 'Accept': 'application/vnd.github.v3+json', 6 Accept: 'application/vnd.github.v3+json',
7 }; 7 };
8 const token = import.meta.env.GITHUB_API_KEY; 8 const token = import.meta.env.GITHUB_API_KEY;
9 if (token) headers['Authorization'] = `token ${token}`; 9 if (token) headers['Authorization'] = `token ${token}`;
10 return headers; 10 return headers;
11}; 11};
12 12
13const fetchFromGitHub = async (github: string): Promise<GitHubStatsResponse | null> => { 13const fetchFromGitHub = async (
14 github: string,
15): Promise<GitHubStatsResponse | null> => {
14 const base = `https://api.github.com/repos/${github}`; 16 const base = `https://api.github.com/repos/${github}`;
15 const headers = githubHeaders(); 17 const headers = githubHeaders();
16 18
17 const [infoRes, langsRes, tagsRes, contribRes, commitsRes] = await Promise.all([ 19 const [infoRes, langsRes, tagsRes, contribRes, commitsRes] =
18 fetch(base, { headers }), 20 await Promise.all([
19 fetch(`${base}/languages`, { headers }), 21 fetch(base, { headers }),
20 fetch(`${base}/tags`, { headers }), 22 fetch(`${base}/languages`, { headers }),
21 fetch(`${base}/contributors`, { headers }), 23 fetch(`${base}/tags`, { headers }),
22 fetch(`${base}/commits`, { headers }), 24 fetch(`${base}/contributors`, { headers }),
23 ]); 25 fetch(`${base}/commits`, { headers }),
26 ]);
24 27
25 if (!infoRes.ok) { 28 if (!infoRes.ok) {
26 error('GitHub Stats', `GitHub API returned ${infoRes.status} for ${github}`); 29 error(
30 'GitHub Stats',
31 `GitHub API returned ${infoRes.status} for ${github}`,
32 );
27 return null; 33 return null;
28 } 34 }
29 35
@@ -76,7 +82,9 @@ const fetchFromGitHub = async (github: string): Promise<GitHubStatsResponse | nu
76 }; 82 };
77}; 83};
78 84
79const fetchFromWorker = async (github: string): Promise<GitHubStatsResponse | null> => { 85const fetchFromWorker = async (
86 github: string,
87): Promise<GitHubStatsResponse | null> => {
80 const res = await fetch(`https://repo-info.as93.workers.dev/${github}`); 88 const res = await fetch(`https://repo-info.as93.workers.dev/${github}`);
81 if (!res.ok) return null; 89 if (!res.ok) return null;
82 return res.json(); 90 return res.json();
web/src/utils/logger.ts +7 −2
@@ -21,7 +21,10 @@ export const error = (source: string, message: string) => {
21export const printSummary = () => { 21export const printSummary = () => {
22 if (entries.length === 0) return; 22 if (entries.length === 0) return;
23 23
24 const grouped: Record<string, { errors: number; warnings: number; messages: string[] }> = {}; 24 const grouped: Record<
25 string,
26 { errors: number; warnings: number; messages: string[] }
27 > = {};
25 for (const entry of entries) { 28 for (const entry of entries) {
26 if (!grouped[entry.source]) { 29 if (!grouped[entry.source]) {
27 grouped[entry.source] = { errors: 0, warnings: 0, messages: [] }; 30 grouped[entry.source] = { errors: 0, warnings: 0, messages: [] };
@@ -33,7 +36,9 @@ export const printSummary = () => {
33 } 36 }
34 37
35 console.log('\n───────────── Build fetch summary ──────────────'); 38 console.log('\n───────────── Build fetch summary ──────────────');
36 for (const [source, { errors, warnings, messages }] of Object.entries(grouped)) { 39 for (const [source, { errors, warnings, messages }] of Object.entries(
40 grouped,
41 )) {
37 const parts = []; 42 const parts = [];
38 if (errors) parts.push(`${errors} error${errors > 1 ? 's' : ''}`); 43 if (errors) parts.push(`${errors} error${errors > 1 ? 's' : ''}`);
39 if (warnings) parts.push(`${warnings} warning${warnings > 1 ? 's' : ''}`); 44 if (warnings) parts.push(`${warnings} warning${warnings > 1 ? 's' : ''}`);