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