Commit 6a60d21888
Unsigned
Layout: unified · split
web/src/components/things/AddNewService.svelte +4 −1
| @@ -127,7 +127,10 @@ | |||
| 127 | <div class="form-row"> | 127 | <div class="form-row"> |
| 128 | <label for="service-github">GitHub Repository</label> | 128 | <label for="service-github">GitHub Repository</label> |
| 129 | <input type="text" bind:value={$serviceGithub} id="service-github" required autocomplete="off"> | 129 | <input type="text" bind:value={$serviceGithub} id="service-github" required autocomplete="off"> |
| 130 | <p>Share a link to where the project's source is located</p> | 130 | <p> |
| 131 | Share a link to where the project's source is located.<br /> | ||
| 132 | Use the format [user]/[repo] e.g, lissy93/dashy | ||
| 133 | </p> | ||
| 131 | </div> | 134 | </div> |
| 132 | 135 | ||
| 133 | <!-- ToS;DR ID --> | 136 | <!-- ToS;DR ID --> |
web/src/components/things/DataActions.svelte +1 −1
| @@ -64,7 +64,7 @@ | |||
| 64 | href={makeEditRequest(categoryName, sectionName, serviceName, yamlContent)}> | 64 | href={makeEditRequest(categoryName, sectionName, serviceName, yamlContent)}> |
| 65 | <FontAwesome iconName="edit" /> Submit Edit to {serviceName} | 65 | <FontAwesome iconName="edit" /> Submit Edit to {serviceName} |
| 66 | </a> | 66 | </a> |
| 67 | <a class="button-link" href="/edit"> | 67 | <a class="button-link" href="/submit"> |
| 68 | <FontAwesome iconName="add" /> Add alternative | 68 | <FontAwesome iconName="add" /> Add alternative |
| 69 | </a> | 69 | </a> |
| 70 | </div> | 70 | </div> |
web/src/pages/[...section].astro +10 −1
| @@ -176,6 +176,15 @@ const { previous, next } = makePaginationLinks(); | |||
| 176 | </section> | 176 | </section> |
| 177 | )} | 177 | )} |
| 178 | 178 | ||
| 179 | {services.length > 0 && (<section class="submit-alternative"> | ||
| 180 | <h3>Submit New Entry</h3> | ||
| 181 | <p> | ||
| 182 | Are we missing anything? | ||
| 183 | You can help us improve this page, by <a href="/submit">submitting a new entry</a> | ||
| 184 | </p> | ||
| 185 | </section> | ||
| 186 | )} | ||
| 187 | |||
| 179 | <div class="pagination-navigation"> | 188 | <div class="pagination-navigation"> |
| 180 | { previous ? ( | 189 | { previous ? ( |
| 181 | <Button url={`/${slugify(categoryName)}/${slugify(previous)}`}> | 190 | <Button url={`/${slugify(categoryName)}/${slugify(previous)}`}> |
| @@ -255,7 +264,7 @@ h2 { | |||
| 255 | } | 264 | } |
| 256 | 265 | ||
| 257 | 266 | ||
| 258 | .further-info, .notable-mentions, .word-of-warning { | 267 | .further-info, .notable-mentions, .word-of-warning, .submit-alternative { |
| 259 | h3 { | 268 | h3 { |
| 260 | font-size: 1.4rem; | 269 | font-size: 1.4rem; |
| 261 | margin: 1rem 0; | 270 | margin: 1rem 0; |
web/src/pages/edit.astro deleted −72
| @@ -1,72 +0,0 @@ | |||
| 1 | --- | ||
| 2 | import Layout from '@layouts/Layout.astro'; | ||
| 3 | import AddNewService from '@components/things/AddNewService.svelte'; | ||
| 4 | --- | ||
| 5 | |||
| 6 | <Layout title="Awesome Privacy"> | ||
| 7 | <section> | ||
| 8 | <h2>About our Data</h2> | ||
| 9 | <p> | ||
| 10 | All data on Awesome Privacy is community maintained via Git. | ||
| 11 | <br /> | ||
| 12 | You can make edits/additions/removals by editing the | ||
| 13 | <a href="github.com/lissy93/awesome-privacy/blob/main/awesome-privacy.yml">awesome-privacy.yml</a> file. | ||
| 14 | To learn more, see the <a href="/about#our-data">about page</a>. | ||
| 15 | </p> | ||
| 16 | </section> | ||
| 17 | <section> | ||
| 18 | <h2>Submit an Addition</h2> | ||
| 19 | <AddNewService client:load /> | ||
| 20 | </section> | ||
| 21 | |||
| 22 | <section> | ||
| 23 | <h2>Submit a Removal Request</h2> | ||
| 24 | <p> | ||
| 25 | You can submit a removal request by browsing to a given service's page, | ||
| 26 | and clicking the "Request Removal" button. | ||
| 27 | This will open a form where you can justify your reasoning, to get it | ||
| 28 | deleted from the <a href="github.com/lissy93/awesome-privacy/blob/main/awesome-privacy.yml">awesome-privacy.yml</a> file. | ||
| 29 | </p> | ||
| 30 | </section> | ||
| 31 | |||
| 32 | <section> | ||
| 33 | <h2>Edit a Listing</h2> | ||
| 34 | <p> | ||
| 35 | Edits are welcome! All data is located in | ||
| 36 | <a href="github.com/lissy93/awesome-privacy/blob/main/awesome-privacy.yml">awesome-privacy.yml</a>. | ||
| 37 | <br> | ||
| 38 | To modify an entry, navigate to it's page, scroll to the bottom, and click "Edit". | ||
| 39 | This will take you to directly to the relevant lines in the file, where you can make your changes. | ||
| 40 | </p> | ||
| 41 | </section> | ||
| 42 | |||
| 43 | </Layout> | ||
| 44 | |||
| 45 | <style lang="scss"> | ||
| 46 | |||
| 47 | section { | ||
| 48 | margin: 2rem auto; | ||
| 49 | padding: 1rem; | ||
| 50 | width: 1000px; | ||
| 51 | max-width: calc(100% - 5rem); | ||
| 52 | display: flex; | ||
| 53 | flex-direction: column; | ||
| 54 | justify-content: space-between; | ||
| 55 | padding: 0 2rem; | ||
| 56 | border: 2px solid var(--foreground); | ||
| 57 | box-shadow: 6px 6px 0 var(--foreground); | ||
| 58 | background: var(--accent-fg); | ||
| 59 | @media(max-width: 768px) { | ||
| 60 | max-width: 95%; | ||
| 61 | padding: 0.5rem; | ||
| 62 | margin: 0 auto; | ||
| 63 | } | ||
| 64 | p { | ||
| 65 | margin-top: 0; | ||
| 66 | } | ||
| 67 | h2 { | ||
| 68 | margin-bottom: 0.5rem; | ||
| 69 | } | ||
| 70 | } | ||
| 71 | |||
| 72 | </style> | ||
web/src/pages/search/index.astro +3 −1
| @@ -13,7 +13,9 @@ const categories = (await fetchData())?.categories; | |||
| 13 | <section> | 13 | <section> |
| 14 | <h1>Search</h1> | 14 | <h1>Search</h1> |
| 15 | <Search client:visible data={categories} /> | 15 | <Search client:visible data={categories} /> |
| 16 | <p class="sitemap-link">Or, view all pages in the <a href="/sitemap">Sitemap</a></p> | 16 | <p class="sitemap-link"> |
| 17 | Browse <a href="/all">all listings</a>, or see all pages in the <a href="/sitemap">Sitemap</a> | ||
| 18 | </p> | ||
| 17 | </section> | 19 | </section> |
| 18 | </Layout> | 20 | </Layout> |
| 19 | 21 | ||
web/src/pages/sitemap.astro +1 −1
| @@ -25,7 +25,7 @@ const categories = (await fetchData() as AwesomePrivacy)?.categories || []; | |||
| 25 | <a href="/">Home</a> | 25 | <a href="/">Home</a> |
| 26 | </li> | 26 | </li> |
| 27 | <li> | 27 | <li> |
| 28 | <a href="/edit">Edit</a> | 28 | <a href="/submit">Submit Listing</a> |
| 29 | </li> | 29 | </li> |
| 30 | <li> | 30 | <li> |
| 31 | <a href="/api">API</a> | 31 | <a href="/api">API</a> |
web/src/pages/submit.astro added +143
| @@ -0,0 +1,143 @@ | |||
| 1 | --- | ||
| 2 | import Layout from '@layouts/Layout.astro'; | ||
| 3 | import AddNewService from '@components/things/AddNewService.svelte'; | ||
| 4 | |||
| 5 | import { fetchGitHubStats } from '@utils/fetch-repo-info' | ||
| 6 | import { formatDate } from '@utils/dates-n-stuff'; | ||
| 7 | |||
| 8 | const commits = (await fetchGitHubStats('lissy93/awesome-privacy')).commits; | ||
| 9 | |||
| 10 | --- | ||
| 11 | |||
| 12 | <Layout title="Awesome Privacy"> | ||
| 13 | <section> | ||
| 14 | <h2>About our Data</h2> | ||
| 15 | <p class="about-data"> | ||
| 16 | All data on Awesome Privacy is community maintained via Git, | ||
| 17 | this keeps everything transparent, and means anyone can submit edits. | ||
| 18 | You can learn more about how our data is managed on our <a href="/about#our-data">about page</a>. | ||
| 19 | <br /><br /> | ||
| 20 | You can make ammendments/additions/removals simply by editing the | ||
| 21 | <a href="github.com/lissy93/awesome-privacy/blob/main/awesome-privacy.yml">awesome-privacy.yml</a> file. | ||
| 22 | <br /> | ||
| 23 | Before you proceed, please first read our <a href="https://github.com/Lissy93/awesome-privacy/blob/main/.github/CONTRIBUTING.md">Contributing Docs</a> | ||
| 24 | <br /><br /> | ||
| 25 | Awesome Privacy is a community-maintained resource, it's thanks to | ||
| 26 | contributors like you, that it's able to grow and stay up to date 💜 | ||
| 27 | </p> | ||
| 28 | </section> | ||
| 29 | <section> | ||
| 30 | <h2>Submit an Addition</h2> | ||
| 31 | <AddNewService client:load /> | ||
| 32 | </section> | ||
| 33 | |||
| 34 | <section> | ||
| 35 | <h2>Submit a Removal Request</h2> | ||
| 36 | <p> | ||
| 37 | You can submit a removal request by browsing to a given service's page, | ||
| 38 | and clicking the "Request Removal" button. | ||
| 39 | This will open a form where you can justify your reasoning, to get it | ||
| 40 | deleted from the <a href="github.com/lissy93/awesome-privacy/blob/main/awesome-privacy.yml">awesome-privacy.yml</a> file. | ||
| 41 | </p> | ||
| 42 | </section> | ||
| 43 | |||
| 44 | <section> | ||
| 45 | <h2>Edit a Listing</h2> | ||
| 46 | <p> | ||
| 47 | Edits are welcome! All data is located in | ||
| 48 | <a href="github.com/lissy93/awesome-privacy/blob/main/awesome-privacy.yml">awesome-privacy.yml</a>. | ||
| 49 | <br> | ||
| 50 | To modify an entry, navigate to it's page, scroll to the bottom, and click "Edit". | ||
| 51 | This will take you to directly to the relevant lines in the file, where you can make your changes. | ||
| 52 | </p> | ||
| 53 | </section> | ||
| 54 | |||
| 55 | <section> | ||
| 56 | <h2>Checklist</h2> | ||
| 57 | <ul> | ||
| 58 | <li>You must read the <a href="https://github.com/Lissy93/awesome-privacy/blob/main/.github/CONTRIBUTING.md">Contributing</a> guidelines before proceeding</li> | ||
| 59 | <li>All listing must meed our <a href="/about#creteria">Criteria</a> to be considered privacy-respecting</li> | ||
| 60 | <li>Double check that your changes haven't already been proposed</li> | ||
| 61 | <li>If you're associated with a service included, you must declare your affiliation</li> | ||
| 62 | <li>Before commiting changes, ensure the YAML syntax is valid and it complies with our schema</li> | ||
| 63 | <li>Please complete the issue or PR description template in full, do not remove any fields</li> | ||
| 64 | <li>All submissions must be made via <a href="https://github.com/Lissy93/awesome-privacy">our GitHub</a>, do not email/PM maintainers</li> | ||
| 65 | </ul> | ||
| 66 | </section> | ||
| 67 | |||
| 68 | {commits && commits.length > 0 && ( | ||
| 69 | <section> | ||
| 70 | <h2>Recent Changes</h2> | ||
| 71 | <p class="about-data"> | ||
| 72 | You can view a full ledger of all updates made | ||
| 73 | at <a href="https://github.com/lissy93/awesome-privacy">github.com/lissy93/awesome-privacy</a> | ||
| 74 | </p> | ||
| 75 | <ul class="commit-log"> | ||
| 76 | {commits.map((commit) => ( | ||
| 77 | <li title={commit.sha}> | ||
| 78 | {commit.message}<br /> | ||
| 79 | <img width="14" src={commit.authorAvatar} /> | ||
| 80 | <small> | ||
| 81 | By <a href={`https://github.com/${commit.authorUsername}`}>{commit.authorName || commit.authorUsername}</a> | ||
| 82 | on <a href={`https://github.com/Lissy93/awesome-privacy/commit/${commit.sha}`}>{formatDate(commit.authorDate)}</a> | ||
| 83 | </small> | ||
| 84 | </li> | ||
| 85 | ))} | ||
| 86 | </ul> | ||
| 87 | </section> | ||
| 88 | )} | ||
| 89 | |||
| 90 | </Layout> | ||
| 91 | |||
| 92 | <style lang="scss"> | ||
| 93 | |||
| 94 | section { | ||
| 95 | margin: 2rem auto; | ||
| 96 | padding: 1rem; | ||
| 97 | width: 1000px; | ||
| 98 | max-width: calc(100% - 5rem); | ||
| 99 | display: flex; | ||
| 100 | flex-direction: column; | ||
| 101 | justify-content: space-between; | ||
| 102 | padding: 0 2rem; | ||
| 103 | border: 2px solid var(--foreground); | ||
| 104 | box-shadow: 6px 6px 0 var(--foreground); | ||
| 105 | background: var(--accent-fg); | ||
| 106 | border-radius: var(--curve-sm); | ||
| 107 | @media(max-width: 768px) { | ||
| 108 | max-width: 95%; | ||
| 109 | padding: 0.5rem; | ||
| 110 | margin: 0 auto; | ||
| 111 | } | ||
| 112 | p { | ||
| 113 | margin-top: 0; | ||
| 114 | } | ||
| 115 | h2 { | ||
| 116 | margin-bottom: 0.5rem; | ||
| 117 | } | ||
| 118 | ul { | ||
| 119 | margin-top: 0; | ||
| 120 | padding-left: 1rem; | ||
| 121 | list-style: circle; | ||
| 122 | } | ||
| 123 | .about-data { | ||
| 124 | font-size: 1.2rem; | ||
| 125 | } | ||
| 126 | |||
| 127 | .commit-log { | ||
| 128 | column-width: 350px; | ||
| 129 | li { | ||
| 130 | small { | ||
| 131 | font-size: 0.8rem; | ||
| 132 | opacity: 0.7; | ||
| 133 | a { text-transform: capitalize;} | ||
| 134 | } | ||
| 135 | img { | ||
| 136 | border-radius: var(--curve-md); | ||
| 137 | margin-right: 0.5rem; | ||
| 138 | } | ||
| 139 | } | ||
| 140 | } | ||
| 141 | } | ||
| 142 | |||
| 143 | </style> | ||
web/src/utils/data-src-delete-n-edit.ts +1 −1
| @@ -42,7 +42,7 @@ export const makeAdditionRequest = (formData: { | |||
| 42 | const additionalInfoText: string = `\n${userInfo}` | 42 | const additionalInfoText: string = `\n${userInfo}` |
| 43 | + `\n\n**YAML Content for Addition**\n\n\`\`\`yaml\n${yamlText || '# nothing yet'}\n\`\`\`\n` | 43 | + `\n\n**YAML Content for Addition**\n\n\`\`\`yaml\n${yamlText || '# nothing yet'}\n\`\`\`\n` |
| 44 | + `\n\n<sup>This ticket was submitted via ` | 44 | + `\n\n<sup>This ticket was submitted via ` |
| 45 | + `<a href="https://awesome-privacy.xyz/edit">awesome-privacy.xyz/edit</a></sup>`; | 45 | + `<a href="https://awesome-privacy.xyz/submit">awesome-privacy.xyz/submit</a></sup>`; |
| 46 | 46 | ||
| 47 | const issueTitle = `[ADDITION] ${formData.serviceName} (Complete)`; | 47 | const issueTitle = `[ADDITION] ${formData.serviceName} (Complete)`; |
| 48 | const queryParams = new URLSearchParams({ | 48 | const queryParams = new URLSearchParams({ |