Commit 7cd5a2a353

7cd5a2a353bb3e743b98dec374b1888a37b6f9f3

parent: 95d9d314b2

Unsigned

Alicia Sykes <alicia@omg.lol> ยท 2024-02-25 19:45 UTC

Mobile responsivness

Layout: unified ยท split

web/README.md deleted โˆ’54
@@ -1,54 +0,0 @@
1# Astro Starter Kit: Basics
2
3```sh
4npm create astro@latest -- --template basics
5```
6
7[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
8[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
9[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)
10
11> ๐Ÿง‘โ€๐Ÿš€ **Seasoned astronaut?** Delete this file. Have fun!
12
13![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554)
14
15## ๐Ÿš€ Project Structure
16
17Inside of your Astro project, you'll see the following folders and files:
18
19```text
20/
21โ”œโ”€โ”€ public/
22โ”‚ โ””โ”€โ”€ favicon.svg
23โ”œโ”€โ”€ src/
24โ”‚ โ”œโ”€โ”€ components/
25โ”‚ โ”‚ โ””โ”€โ”€ Card.astro
26โ”‚ โ”œโ”€โ”€ layouts/
27โ”‚ โ”‚ โ””โ”€โ”€ Layout.astro
28โ”‚ โ””โ”€โ”€ pages/
29โ”‚ โ””โ”€โ”€ index.astro
30โ””โ”€โ”€ package.json
31```
32
33Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
34
35There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
36
37Any static assets, like images, can be placed in the `public/` directory.
38
39## ๐Ÿงž Commands
40
41All commands are run from the root of the project, from a terminal:
42
43| Command | Action |
44| :------------------------ | :----------------------------------------------- |
45| `npm install` | Installs dependencies |
46| `npm run dev` | Starts local dev server at `localhost:4321` |
47| `npm run build` | Build your production site to `./dist/` |
48| `npm run preview` | Preview your build locally, before deploying |
49| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
50| `npm run astro -- --help` | Get help using the Astro CLI |
51
52## ๐Ÿ‘€ Want to learn more?
53
54Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
web/README.txt added +127
@@ -0,0 +1,127 @@
1
2WEBSITE SOURCE CODE
3-------------------
4This is the source code for the awesome-privacy website, which is deployed at
5https://awesome-privacy.xyz.
6
7================================================================================
8
9DEVELOPMENT SETUP
10-----------------
11To get started, you'll need Node and Git installed.
12Then run the following commands:
13
14# 1. Clone the repo
15git clone git@github.com:Lissy93/awesome-privacy.git
16# 2. Navigate into it
17cd awesome-privacy/web
18# 3. Install dependencies
19yarn install
20# 4. Start the development server
21yarn dev
225. Open browser
23open http://127.0.0.1:4321
24
25================================================================================
26
27DEPLOYMENT
28----------
29You have several options for deploying your own instance of Awesome Privacy
30Option 1) Run `yarn build`, and copy the contents of `dist` to any web server/ CDN
31Option 2) Fork the repo and import it to a provider of your choice (Netlify or Vercel)
32Option 3) Use the included Dockerfile to build and run the application on any server
33
34================================================================================
35
36TECHNOLOGY
37----------
38The website is built with Astro, and statically generated at build-time.
39This means that changes to the data will not be reflected until the site is rebuilt.
40Dynamic elems (search + comments) are built as Svelte islands, and rehydrated at runtime.
41Most the code is written in Typescript. We're not using a CSS library, just plain SASS.
42
43The site also uses:
44- Fuse.js for fuzzy search
45- js-yaml for parsing YAML
46- marked for markdown rendering
47- fontawesome for iconography
48
49================================================================================
50
51DATA
52----
53All data relating to software/apps/services used on the website is pulled from:
54https://github.com/Lissy93/awesome-privacy/blob/main/awesome-privacy.yml (CC0-1.0)
55If you only wish to update content, there's no need to edit the site's source code
56
57================================================================================
58
59SITE STRUCTURE
60--------------
61All views are located in /src/pages.
62The general site structure is as follows:
63
64/
65โ”œโ”€โ”€ about
66โ”œโ”€โ”€ search
67โ”‚ โ””โ”€โ”€ [query]
68โ”œโ”€โ”€ browse
69โ””โ”€โ”€ [category-name]
70 โ””โ”€โ”€ [section]
71 โ””โ”€โ”€ [service]
72
73Assets in /public will be served from the top-level (favicon, pwa assets, sitemap)
74
75================================================================================
76
77THIRD-PARTY SERVICES
78--------------------
79
80Infra:
81- Vercel - This is where the site is hosted
82- GitHub - This is where the source code is stored
83- Cloudflare - This is where the domain is managed
84
85Monitoring:
86- Plausible (self-hosted) - For basic hit counting and traffic stats
87 (this does NOT collect nor store IP, user agent or any other personal info)
88- GlitchTip (self-hosted) - For error tracking and reporting
89- UptimeKuma (self-hosted) - For down detection and basic monitoring
90
91External Requests:
92- Service icons are pulled from the respective service's website
93- Comments are handled by Remark42 (self-hosted)
94- Fonts which can not be loaded from /public will fallback to Google Fonts CDN
95- Service icons which are not found, will be replaced from icon.horse
96- Open source stats on services are fetched from the GitHub API
97
98================================================================================
99
100LICENSE
101-------
102The data (in /awesome-privacy.yml) is licensed under Creative Commons CC0-1.0
103The website source code, and all other content is licensed under the MIT License
104
105(C) Alicia Sykes <https://aliciasykes.com> 2024
106
107Permission is hereby granted, free of charge, to any person obtaining a copy
108of this software and associated documentation files (the "Software"), to deal
109in the Software without restriction, including without limitation the rights
110to use, copy, modify, merge, publish, distribute, sub-license, and/or sell
111copies of the Software, and to permit persons to whom the Software is furnished
112to do so, subject to the following conditions:
113
114The above copyright notice and this permission notice shall be included install
115copies or substantial portions of the Software.
116
117THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
118IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANT ABILITY,
119FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
120THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
121LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
122OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
123
124================================================================================
125
126
127
web/src/components/Hero.astro +6
@@ -48,6 +48,9 @@ import FontAwesome from "@components/form/FontAwesome.svelte"
4848 display: flex;
4949 flex-direction: column;
5050 gap: 2rem;
51 @media(max-width: 768px) {
52 padding: 2rem 1rem;
53 }
5154 }
5255 svg {
5356 position: absolute;
@@ -71,6 +74,9 @@ import FontAwesome from "@components/form/FontAwesome.svelte"
7174 -webkit-text-stroke-width: 2px;
7275 -webkit-text-stroke-color: var(--foreground);
7376 text-shadow: 3px 3px 0 var(--foreground);
77 @media(max-width: 768px) {
78 font-size: 4rem;
79 }
7480 }
7581 .intro {
7682 text-align: center;
web/src/components/scafold/NavBar.astro +6
@@ -86,5 +86,11 @@ import FontAwesome from "@components/form/FontAwesome.svelte"
8686 }
8787 }
8888 }
89 .homepage, nav {
90 @media(max-width: 768px) {
91 margin: 0 auto;
92 a { border: none; }
93 }
94 }
8995 }
9096</style>
web/src/components/things/ItemGitHubMetrics.astro +1
@@ -119,6 +119,7 @@ const {
119119 gap: 1rem;
120120 font-size: 0.9rem;
121121 opacity: 0.6;
122 flex-wrap: wrap;
122123 span {
123124 display: flex;
124125 align-items: center;
web/src/components/things/ServiceList.astro +2
@@ -133,6 +133,7 @@ const { services, subHeading, buttonLink, noGitHubMetrics } = Astro.props;
133133 display: flex;
134134 align-items: center;
135135 gap: 0.5rem;
136 flex-wrap: wrap;
136137 h3, h4 {
137138 margin: 0;
138139 font-size: 1.6rem;
@@ -172,6 +173,7 @@ const { services, subHeading, buttonLink, noGitHubMetrics } = Astro.props;
172173 .service-stats {
173174 display: flex;
174175 gap: 1rem;
176 flex-wrap: wrap;
175177 }
176178 .meta-item, .warning {
177179 display: flex;
web/src/pages/browse.astro +4
@@ -165,6 +165,10 @@ if (typeof window !== 'undefined') {
165165 width: 85vw;
166166 max-width: 1800px;
167167 padding: 1rem 0 2rem 0;
168 @media(max-width: 768px) {
169 padding: 0;
170 width: 95%;
171 }
168172 .category {
169173 background: var(--accent-fg);
170174 border: 2px solid var(--foreground);
web/src/pages/index.astro +8
@@ -76,6 +76,9 @@ const description = 'Privacy is a fundamental human right; '
7676 max-width: calc(100% - 5rem);
7777 font-size: 20px;
7878 line-height: 1.6;
79 @media(max-width: 768px) {
80 padding: 0;
81 }
7982 .view-all {
8083 text-align: center;
8184 width: 16rem;
@@ -129,6 +132,7 @@ const description = 'Privacy is a fundamental human right; '
129132 .categories {
130133 columns: 6 300px;
131134 column-gap: 1rem;
135 padding: 0;
132136 .category {
133137 background: var(--accent-fg);
134138 border: 2px solid var(--foreground);
@@ -139,6 +143,10 @@ const description = 'Privacy is a fundamental human right; '
139143 display: inline-flex;
140144 flex-direction: column;
141145 margin: 1rem;
146 @media(max-width: 768px) {
147 margin: 1rem 0;
148 width: 90%;
149 }
142150 .category-title {
143151 text-decoration: none;
144152 color: var(--foreground);