Commit 7cd5a2a353
Unsigned
Layout: unified ยท split
web/README.md deleted โ54
| @@ -1,54 +0,0 @@ | |||
| 1 | # Astro Starter Kit: Basics | ||
| 2 | |||
| 3 | ```sh | ||
| 4 | npm create astro@latest -- --template basics | ||
| 5 | ``` | ||
| 6 | |||
| 7 | [](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics) | ||
| 8 | [](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics) | ||
| 9 | [](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json) | ||
| 10 | |||
| 11 | > ๐งโ๐ **Seasoned astronaut?** Delete this file. Have fun! | ||
| 12 | |||
| 13 |  | ||
| 14 | |||
| 15 | ## ๐ Project Structure | ||
| 16 | |||
| 17 | Inside 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 | |||
| 33 | Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. | ||
| 34 | |||
| 35 | There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. | ||
| 36 | |||
| 37 | Any static assets, like images, can be placed in the `public/` directory. | ||
| 38 | |||
| 39 | ## ๐ง Commands | ||
| 40 | |||
| 41 | All 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 | |||
| 54 | Feel 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 | |||
| 2 | WEBSITE SOURCE CODE | ||
| 3 | ------------------- | ||
| 4 | This is the source code for the awesome-privacy website, which is deployed at | ||
| 5 | https://awesome-privacy.xyz. | ||
| 6 | |||
| 7 | ================================================================================ | ||
| 8 | |||
| 9 | DEVELOPMENT SETUP | ||
| 10 | ----------------- | ||
| 11 | To get started, you'll need Node and Git installed. | ||
| 12 | Then run the following commands: | ||
| 13 | |||
| 14 | # 1. Clone the repo | ||
| 15 | git clone git@github.com:Lissy93/awesome-privacy.git | ||
| 16 | # 2. Navigate into it | ||
| 17 | cd awesome-privacy/web | ||
| 18 | # 3. Install dependencies | ||
| 19 | yarn install | ||
| 20 | # 4. Start the development server | ||
| 21 | yarn dev | ||
| 22 | 5. Open browser | ||
| 23 | open http://127.0.0.1:4321 | ||
| 24 | |||
| 25 | ================================================================================ | ||
| 26 | |||
| 27 | DEPLOYMENT | ||
| 28 | ---------- | ||
| 29 | You have several options for deploying your own instance of Awesome Privacy | ||
| 30 | Option 1) Run `yarn build`, and copy the contents of `dist` to any web server/ CDN | ||
| 31 | Option 2) Fork the repo and import it to a provider of your choice (Netlify or Vercel) | ||
| 32 | Option 3) Use the included Dockerfile to build and run the application on any server | ||
| 33 | |||
| 34 | ================================================================================ | ||
| 35 | |||
| 36 | TECHNOLOGY | ||
| 37 | ---------- | ||
| 38 | The website is built with Astro, and statically generated at build-time. | ||
| 39 | This means that changes to the data will not be reflected until the site is rebuilt. | ||
| 40 | Dynamic elems (search + comments) are built as Svelte islands, and rehydrated at runtime. | ||
| 41 | Most the code is written in Typescript. We're not using a CSS library, just plain SASS. | ||
| 42 | |||
| 43 | The 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 | |||
| 51 | DATA | ||
| 52 | ---- | ||
| 53 | All data relating to software/apps/services used on the website is pulled from: | ||
| 54 | https://github.com/Lissy93/awesome-privacy/blob/main/awesome-privacy.yml (CC0-1.0) | ||
| 55 | If you only wish to update content, there's no need to edit the site's source code | ||
| 56 | |||
| 57 | ================================================================================ | ||
| 58 | |||
| 59 | SITE STRUCTURE | ||
| 60 | -------------- | ||
| 61 | All views are located in /src/pages. | ||
| 62 | The general site structure is as follows: | ||
| 63 | |||
| 64 | / | ||
| 65 | โโโ about | ||
| 66 | โโโ search | ||
| 67 | โ โโโ [query] | ||
| 68 | โโโ browse | ||
| 69 | โโโ [category-name] | ||
| 70 | โโโ [section] | ||
| 71 | โโโ [service] | ||
| 72 | |||
| 73 | Assets in /public will be served from the top-level (favicon, pwa assets, sitemap) | ||
| 74 | |||
| 75 | ================================================================================ | ||
| 76 | |||
| 77 | THIRD-PARTY SERVICES | ||
| 78 | -------------------- | ||
| 79 | |||
| 80 | Infra: | ||
| 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 | |||
| 85 | Monitoring: | ||
| 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 | |||
| 91 | External 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 | |||
| 100 | LICENSE | ||
| 101 | ------- | ||
| 102 | The data (in /awesome-privacy.yml) is licensed under Creative Commons CC0-1.0 | ||
| 103 | The website source code, and all other content is licensed under the MIT License | ||
| 104 | |||
| 105 | (C) Alicia Sykes <https://aliciasykes.com> 2024 | ||
| 106 | |||
| 107 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 108 | of this software and associated documentation files (the "Software"), to deal | ||
| 109 | in the Software without restriction, including without limitation the rights | ||
| 110 | to use, copy, modify, merge, publish, distribute, sub-license, and/or sell | ||
| 111 | copies of the Software, and to permit persons to whom the Software is furnished | ||
| 112 | to do so, subject to the following conditions: | ||
| 113 | |||
| 114 | The above copyright notice and this permission notice shall be included install | ||
| 115 | copies or substantial portions of the Software. | ||
| 116 | |||
| 117 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 118 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANT ABILITY, | ||
| 119 | FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL | ||
| 120 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 121 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 122 | OUT 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" | |||
| 48 | display: flex; | 48 | display: flex; |
| 49 | flex-direction: column; | 49 | flex-direction: column; |
| 50 | gap: 2rem; | 50 | gap: 2rem; |
| 51 | @media(max-width: 768px) { | ||
| 52 | padding: 2rem 1rem; | ||
| 53 | } | ||
| 51 | } | 54 | } |
| 52 | svg { | 55 | svg { |
| 53 | position: absolute; | 56 | position: absolute; |
| @@ -71,6 +74,9 @@ import FontAwesome from "@components/form/FontAwesome.svelte" | |||
| 71 | -webkit-text-stroke-width: 2px; | 74 | -webkit-text-stroke-width: 2px; |
| 72 | -webkit-text-stroke-color: var(--foreground); | 75 | -webkit-text-stroke-color: var(--foreground); |
| 73 | text-shadow: 3px 3px 0 var(--foreground); | 76 | text-shadow: 3px 3px 0 var(--foreground); |
| 77 | @media(max-width: 768px) { | ||
| 78 | font-size: 4rem; | ||
| 79 | } | ||
| 74 | } | 80 | } |
| 75 | .intro { | 81 | .intro { |
| 76 | text-align: center; | 82 | text-align: center; |
web/src/components/scafold/NavBar.astro +6
| @@ -86,5 +86,11 @@ import FontAwesome from "@components/form/FontAwesome.svelte" | |||
| 86 | } | 86 | } |
| 87 | } | 87 | } |
| 88 | } | 88 | } |
| 89 | .homepage, nav { | ||
| 90 | @media(max-width: 768px) { | ||
| 91 | margin: 0 auto; | ||
| 92 | a { border: none; } | ||
| 93 | } | ||
| 94 | } | ||
| 89 | } | 95 | } |
| 90 | </style> | 96 | </style> |
web/src/components/things/ItemGitHubMetrics.astro +1
| @@ -119,6 +119,7 @@ const { | |||
| 119 | gap: 1rem; | 119 | gap: 1rem; |
| 120 | font-size: 0.9rem; | 120 | font-size: 0.9rem; |
| 121 | opacity: 0.6; | 121 | opacity: 0.6; |
| 122 | flex-wrap: wrap; | ||
| 122 | span { | 123 | span { |
| 123 | display: flex; | 124 | display: flex; |
| 124 | align-items: center; | 125 | align-items: center; |
web/src/components/things/ServiceList.astro +2
| @@ -133,6 +133,7 @@ const { services, subHeading, buttonLink, noGitHubMetrics } = Astro.props; | |||
| 133 | display: flex; | 133 | display: flex; |
| 134 | align-items: center; | 134 | align-items: center; |
| 135 | gap: 0.5rem; | 135 | gap: 0.5rem; |
| 136 | flex-wrap: wrap; | ||
| 136 | h3, h4 { | 137 | h3, h4 { |
| 137 | margin: 0; | 138 | margin: 0; |
| 138 | font-size: 1.6rem; | 139 | font-size: 1.6rem; |
| @@ -172,6 +173,7 @@ const { services, subHeading, buttonLink, noGitHubMetrics } = Astro.props; | |||
| 172 | .service-stats { | 173 | .service-stats { |
| 173 | display: flex; | 174 | display: flex; |
| 174 | gap: 1rem; | 175 | gap: 1rem; |
| 176 | flex-wrap: wrap; | ||
| 175 | } | 177 | } |
| 176 | .meta-item, .warning { | 178 | .meta-item, .warning { |
| 177 | display: flex; | 179 | display: flex; |
web/src/pages/browse.astro +4
| @@ -165,6 +165,10 @@ if (typeof window !== 'undefined') { | |||
| 165 | width: 85vw; | 165 | width: 85vw; |
| 166 | max-width: 1800px; | 166 | max-width: 1800px; |
| 167 | padding: 1rem 0 2rem 0; | 167 | padding: 1rem 0 2rem 0; |
| 168 | @media(max-width: 768px) { | ||
| 169 | padding: 0; | ||
| 170 | width: 95%; | ||
| 171 | } | ||
| 168 | .category { | 172 | .category { |
| 169 | background: var(--accent-fg); | 173 | background: var(--accent-fg); |
| 170 | border: 2px solid var(--foreground); | 174 | border: 2px solid var(--foreground); |
web/src/pages/index.astro +8
| @@ -76,6 +76,9 @@ const description = 'Privacy is a fundamental human right; ' | |||
| 76 | max-width: calc(100% - 5rem); | 76 | max-width: calc(100% - 5rem); |
| 77 | font-size: 20px; | 77 | font-size: 20px; |
| 78 | line-height: 1.6; | 78 | line-height: 1.6; |
| 79 | @media(max-width: 768px) { | ||
| 80 | padding: 0; | ||
| 81 | } | ||
| 79 | .view-all { | 82 | .view-all { |
| 80 | text-align: center; | 83 | text-align: center; |
| 81 | width: 16rem; | 84 | width: 16rem; |
| @@ -129,6 +132,7 @@ const description = 'Privacy is a fundamental human right; ' | |||
| 129 | .categories { | 132 | .categories { |
| 130 | columns: 6 300px; | 133 | columns: 6 300px; |
| 131 | column-gap: 1rem; | 134 | column-gap: 1rem; |
| 135 | padding: 0; | ||
| 132 | .category { | 136 | .category { |
| 133 | background: var(--accent-fg); | 137 | background: var(--accent-fg); |
| 134 | border: 2px solid var(--foreground); | 138 | border: 2px solid var(--foreground); |
| @@ -139,6 +143,10 @@ const description = 'Privacy is a fundamental human right; ' | |||
| 139 | display: inline-flex; | 143 | display: inline-flex; |
| 140 | flex-direction: column; | 144 | flex-direction: column; |
| 141 | margin: 1rem; | 145 | margin: 1rem; |
| 146 | @media(max-width: 768px) { | ||
| 147 | margin: 1rem 0; | ||
| 148 | width: 90%; | ||
| 149 | } | ||
| 142 | .category-title { | 150 | .category-title { |
| 143 | text-decoration: none; | 151 | text-decoration: none; |
| 144 | color: var(--foreground); | 152 | color: var(--foreground); |