web/src/pages/submit.astro

187 lines · 4944 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} alt="" />
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: var(--space-lg) auto;
140		width: var(--width-container-narrow);
141		max-width: var(--width-container-max);
142		display: flex;
143		flex-direction: column;
144		justify-content: space-between;
145		padding: 0 var(--space-lg);
146		border: var(--border-heavy);
147		box-shadow: var(--shadow-lg);
148		background: var(--accent-fg);
149		border-radius: var(--curve-sm);
150		@media (max-width: 768px) {
151			max-width: 95%;
152			padding: var(--space-sm);
153			margin: 0 auto;
154		}
155		p {
156			margin-top: 0;
157		}
158		h2 {
159			margin-bottom: var(--space-sm);
160		}
161		ul {
162			margin-top: 0;
163			padding-left: var(--space-md);
164			list-style: circle;
165		}
166		.about-data {
167			font-size: var(--text-md);
168		}
169
170		.commit-log {
171			column-width: 350px;
172			li {
173				small {
174					font-size: var(--text-sm);
175					opacity: var(--opacity-soft);
176					a {
177						text-transform: capitalize;
178					}
179				}
180				img {
181					border-radius: var(--curve-md);
182					margin-right: var(--space-sm);
183				}
184			}
185		}
186	}
187</style>