web/src/pages/submit.astro

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