web/src/pages/submit.astro
188 lines · 4851 bytes
1---
2import Layout from '@layouts/Layout.astro';
3import AddNewService from '@components/things/AddNewService.svelte';
4
5import { fetchGitHubStats } from '@utils/fetch-repo-info';
6import { formatDate } from '@utils/dates-n-stuff';
7
8const commits = ((await fetchGitHubStats('lissy93/awesome-privacy')) || {})
9 .commits;
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, this keeps
17 everything transparent, and means anyone can submit edits. You can learn
18 more about how our data is managed on our <a href="/about#our-data"
19 >about page</a
20 >.
21 <br /><br />
22 You can make ammendments/additions/removals simply by editing the
23 <a href="github.com/lissy93/awesome-privacy/blob/main/awesome-privacy.yml"
24 >awesome-privacy.yml</a
25 > file.
26 <br />
27 Before you proceed, please first read our <a
28 href="https://github.com/Lissy93/awesome-privacy/blob/main/.github/CONTRIBUTING.md"
29 >Contributing Docs</a
30 >
31 <br /><br />
32 Awesome Privacy is a community-maintained resource, it's thanks to contributors
33 like you, that it's able to grow and stay up to date 💜
34 </p>
35 </section>
36 <section>
37 <h2>Submit an Addition</h2>
38 <AddNewService client:load />
39 </section>
40
41 <section>
42 <h2>Submit a Removal Request</h2>
43 <p>
44 You can submit a removal request by browsing to a given service's page,
45 and clicking the "Request Removal" button. This will open a form where you
46 can justify your reasoning, to get it deleted from the <a
47 href="github.com/lissy93/awesome-privacy/blob/main/awesome-privacy.yml"
48 >awesome-privacy.yml</a
49 > file.
50 </p>
51 </section>
52
53 <section>
54 <h2>Edit a Listing</h2>
55 <p>
56 Edits are welcome! All data is located in
57 <a href="github.com/lissy93/awesome-privacy/blob/main/awesome-privacy.yml"
58 >awesome-privacy.yml</a
59 >.
60 <br />
61 To modify an entry, navigate to it's page, scroll to the bottom, and click "Edit".
62 This will take you to directly to the relevant lines in the file, where you
63 can make your changes.
64 </p>
65 </section>
66
67 <section>
68 <h2>Checklist</h2>
69 <ul>
70 <li>
71 You must read the <a
72 href="https://github.com/Lissy93/awesome-privacy/blob/main/.github/CONTRIBUTING.md"
73 >Contributing</a
74 > guidelines before proceeding
75 </li>
76 <li>
77 All listing must meed our <a href="/about#creteria">Criteria</a> to be considered
78 privacy-respecting
79 </li>
80 <li>Double check that your changes haven't already been proposed</li>
81 <li>
82 If you're associated with a service included, you must declare your
83 affiliation
84 </li>
85 <li>
86 Before commiting changes, ensure the YAML syntax is valid and it
87 complies with our schema
88 </li>
89 <li>
90 Please complete the issue or PR description template in full, do not
91 remove any fields
92 </li>
93 <li>
94 All submissions must be made via <a
95 href="https://github.com/Lissy93/awesome-privacy">our GitHub</a
96 >, do not email/PM maintainers
97 </li>
98 </ul>
99 </section>
100
101 {
102 commits && commits.length > 0 && (
103 <section>
104 <h2>Recent Changes</h2>
105 <p class="about-data">
106 You can view a full ledger of all updates made at{' '}
107 <a href="https://github.com/lissy93/awesome-privacy">
108 github.com/lissy93/awesome-privacy
109 </a>
110 </p>
111 <ul class="commit-log">
112 {commits.map((commit) => (
113 <li title={commit.sha}>
114 {commit.message}
115 <br />
116 <img width="14" src={commit.authorAvatar} />
117 <small>
118 By{' '}
119 <a href={`https://github.com/${commit.authorUsername}`}>
120 {commit.authorName || commit.authorUsername}
121 </a>
122 on{' '}
123 <a
124 href={`https://github.com/Lissy93/awesome-privacy/commit/${commit.sha}`}
125 >
126 {formatDate(commit.authorDate)}
127 </a>
128 </small>
129 </li>
130 ))}
131 </ul>
132 </section>
133 )
134 }
135</Layout>
136
137<style lang="scss">
138 section {
139 margin: 2rem auto;
140 padding: 1rem;
141 width: 1000px;
142 max-width: calc(100% - 5rem);
143 display: flex;
144 flex-direction: column;
145 justify-content: space-between;
146 padding: 0 2rem;
147 border: 2px solid var(--box-outline);
148 box-shadow: 6px 6px 0 var(--box-outline);
149 background: var(--accent-fg);
150 border-radius: var(--curve-sm);
151 @media (max-width: 768px) {
152 max-width: 95%;
153 padding: 0.5rem;
154 margin: 0 auto;
155 }
156 p {
157 margin-top: 0;
158 }
159 h2 {
160 margin-bottom: 0.5rem;
161 }
162 ul {
163 margin-top: 0;
164 padding-left: 1rem;
165 list-style: circle;
166 }
167 .about-data {
168 font-size: 1.2rem;
169 }
170
171 .commit-log {
172 column-width: 350px;
173 li {
174 small {
175 font-size: 0.8rem;
176 opacity: 0.7;
177 a {
178 text-transform: capitalize;
179 }
180 }
181 img {
182 border-radius: var(--curve-md);
183 margin-right: 0.5rem;
184 }
185 }
186 }
187 }
188</style>