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