web/src/pages/submit.astro

143 lines · 4755 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') || {}).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
 94section {
 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(--box-outline);
104  box-shadow: 6px 6px 0 var(--box-outline);
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>