Implement dynamic service rendering with Flask

Refactored the website to serve dynamic content using Flask, replacing static HTML pages. This allows for the centralized management of service data through a JSON file. Optimizations include:

- Added a .gitignore file to exclude Python and Flask-specific temporary files.
- Migrated static assets into an organized directory structure to facilitate Flask's static file serving.
- Removed redundant HTML files and created Flask template versions with dynamic content rendering.
- Introduced Caddy server configuration for the new Flask architecture, including headers for security and CORS policy, and reverse proxy settings for route handling.

With these changes, website maintenance and updates are simplified, allowing for service information to be updated in a single location (`services.json`), which then propagates to the user-facing pages automatically.
This commit is contained in:
Kumi 2023-12-31 13:59:13 +01:00
parent 016f03b06b
commit 193546fcde
Signed by: kumi
GPG key ID: ECBCC9082395383F
19 changed files with 508 additions and 413 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
venv/
*.pyc
__pycache__/

26
Caddyfile Normal file
View file

@ -0,0 +1,26 @@
private.coffee www.private.coffee {
header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
header Access-Control-Allow-Origin https://element.private.coffee
header Access-Control-Allow-Methods "GET"
header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range"
header Access-Control-Expose-Headers "Content-Length,Content-Range"
header /.well-known/matrix/* Content-Type application/json
header /.well-known/matrix/* Access-Control-Allow-Origin *
respond /.well-known/matrix/server `{"m.server": "matrix.private.coffee:443"}`
respond /.well-known/matrix/client `{"m.homeserver":{"base_url":"https://matrix.private.coffee"}}`
@html {
path_regexp html /(.*).html
}
reverse_proxy @html localhost:9810
@assets {
path assets /assets/*
}
file_server
root @assets /srv/private.coffee
}

View file

@ -1,360 +0,0 @@
<!DOCTYPE html>
<!-- This file was created as part of the Private.coffee project
It is licensed under the MIT license
For more information, please visit https://private.coffee -->
<html>
<head>
<title>Private.coffee</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="assets/img/logo-inv.svg" />
<link rel="stylesheet" href="assets/css/base.css" />
<link rel="stylesheet" href="dist/css/bootstrap.min.css" />
<script src="dist/js/jquery.min.js"></script>
<script src="dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<div class="container">
<a class="navbar-brand" href="/">
<img
class="navbar-brand-img"
src="assets/img/logo-inv.svg"
alt="Private.coffee logo"
/>
Private.coffee
</a>
<ul class="navbar-nav">
<ul class="nav-item dropdown">
<a
class="nav-link dropdown-toggle"
href="#"
id="navbardrop"
data-bs-toggle="dropdown"
>Status Page</a
>
<div class="dropdown-menu">
<a class="dropdown-item" href="https://status.private.coffee"
>Clearnet</a
>
<a
class="dropdown-item"
href="http://status.coffee2m3bjsrrqqycx6ghkxrnejl2q6nl7pjw2j4clchjj6uk5zozad.onion/"
>Tor</a
>
</div>
</ul>
</ul>
</div>
</nav>
<section id="content">
<div class="container">
<h1>Welcome to Private.coffee</h1>
<p>
Private.coffee is a collection of services that respect your privacy.
</p>
<p>
Click on a service to go to it. Some services are also available using
Tor and/or I2P. Click the arrow behind the "Go to" link to see all
available versions.
</p>
<div class="row" id="services">
<div class="service col-sm-4">
<h3>Matrix</h3>
<p>
Private.coffee runs a Matrix server. You can use it to chat with
other people at Private.coffee or around the world.
</p>
<a href="https://element.private.coffee/" class="btn btn-primary"
>Go to Element (Matrix client)</a
>
</div>
<div class="service col-sm-4">
<h3>CryptPad</h3>
<p>
CryptPad is a private, encrypted, zero-knowledge, realtime
collaborative editor, similar to Google Docs and Office 365.
</p>
<a href="https://cryptpad.private.coffee/" class="btn btn-primary"
>Go to CryptPad</a
>
</div>
<div class="service col-sm-4">
<h3>Invidious</h3>
<p>Watch YouTube videos without Google tracking you.
</p>
<a href="https://invidious.private.coffee/" class="btn btn-primary"
>Go to Invidious</a
>
</div>
<div class="service col-sm-4">
<h3>Mastodon</h3>
<p>
Mastodon is a decentralized social network. You can use it to
follow people, post messages, and more. Private.coffee hosts two
Mastodon instances: skrt.social and cuddly.space
</p>
<a href="https://skrt.social/" class="btn btn-primary"
>Go to skrt.social</a
>
<a href="https://cuddly.space/" class="btn btn-primary"
>Go to cuddly.space</a
>
</div>
<div class="service col-sm-4">
<h3>Gothub</h3>
<p>
Gothub is an alternative GitHub interface that respects your
privacy. It is currently in alpha, but you can browse and download
repositories, and you can also clone them using git+https
(although the text on the main page would disagree).
</p>
<a href="https://gothub.private.coffee/" class="btn btn-primary"
>Go to Gothub</a
>
</div>
<div class="service col-sm-4">
<h3>AllTube</h3>
<p>
AllTube is a video downloader powered by yt-dlp. It allows you to
download videos from YouTube, Vimeo, and many other sites. You can
also stream the download through our server for extra privacy.
</p>
<a href="https://alltube.private.coffee/" class="btn btn-primary"
>Go to AllTube</a
>
</div>
<div class="service col-sm-4">
<h3>Indestructables</h3>
<p>
Indestructables allows you to browse Instructables without being
tracked. (N.B.: We forked this project, our instance does not use
the original code.)
</p>
<a
href="https://indestructables.private.coffee/"
class="btn btn-primary"
>Go to Indestructables</a
>
</div>
<div class="service col-sm-4">
<h3>NocoDB</h3>
<p>
NocoDB is an open-source tool that turns any database into a smart
spreadsheet similar to Airtable. It provides an interface to
perform CRUD operations and to build intuitive dashboards. (Note:
If you are unable to create tables upon registration, simply wait
a minute or two, log out and then log in again.)
</p>
<a href="https://nocodb.private.coffee/" class="btn btn-primary"
>Go to NocoDB</a
>
</div>
<div class="service col-sm-4">
<h3>Penpot</h3>
<p>
Penpot is an open-source design and prototyping platform meant for
cross-domain teams. Non-dependent on operating systems, Penpot is
web-based and works with open web standards (SVG).
</p>
<a href="https://penpot.private.coffee/" class="btn btn-primary"
>Go to Penpot</a
>
</div>
<div class="service col-sm-4">
<h3>YOURLS</h3>
<p>
Use our URL shortener at private.cf to turn long, complicated URLs
into something more handy.
</p>
<a href="https://private.cf/" class="btn btn-primary"
>Go to private.cf</a
>
</div>
<div class="service col-sm-4">
<h3>Rallly</h3>
<p>
Rallly is a free collaborative scheduling service. It allows you
to create polls and vote on them, similar to Doodle.
</p>
<a href="https://rallly.private.coffee/" class="btn btn-primary"
>Go to Rallly</a
>
</div>
<div class="service col-sm-4">
<h3>LibreY</h3>
<p>
LibreY is an open-source, privacy-friendly metasearch engine. It
allows you to search for web, image, video, torrents, and more,
and it can also search onion sites.
</p>
<a href="https://librey.private.coffee/" class="btn btn-primary"
>Go to LibreY</a
>
</div>
<div class="service col-sm-4">
<h3>Overleaf</h3>
<p>
Overleaf is a collaborative LaTeX editor. It allows you to write
LaTeX documents in your browser and share them with others.
</p>
<a href="https://overleaf.private.coffee/" class="btn btn-primary"
>Go to Overleaf</a
>
</div>
<div class="service col-sm-4">
<h3>Libreddit</h3>
<p>
Use Reddit without Reddit tracking you. Currently unstable due to
API changes introduced by Reddit...
</p>
<div class="btn-group">
<a href="https://libreddit.private.coffee" class="btn btn-danger"
>Go to Libreddit</a
>
<button
type="button"
class="btn btn-danger dropdown-toggle dropdown-toggle-split"
data-bs-toggle="dropdown"
aria-expanded="false"
>
<span class="visually-hidden">Toggle Dropdown</span>
</button>
<ul
class="dropdown-menu"
x-placement="bottom-start"
style="
position: absolute;
transform: translate3d(80px, 38px, 0px);
top: 0px;
left: 0px;
will-change: transform;
"
>
<a class="dropdown-item" href="https://libreddit.private.coffee"
>Clearnet</a
>
<a
class="dropdown-item"
href="http://libreddit.coffee2m3bjsrrqqycx6ghkxrnejl2q6nl7pjw2j4clchjj6uk5zozad.onion/"
>Tor (.onion)</a
>
</ul>
</div>
</div>
<div class="service col-sm-4">
<h3>Nitter</h3>
<p>
Use Twitter without Twitter tracking you. Currently broken because
Elon.
</p>
<div class="btn-group">
<a href="https://nitter.private.coffee" class="btn btn-danger"
>Go to Nitter</a
>
<button
type="button"
class="btn btn-danger dropdown-toggle dropdown-toggle-split"
data-bs-toggle="dropdown"
aria-expanded="false"
>
<span class="visually-hidden">Toggle Dropdown</span>
</button>
<ul
class="dropdown-menu"
x-placement="bottom-start"
style="
position: absolute;
transform: translate3d(80px, 38px, 0px);
top: 0px;
left: 0px;
will-change: transform;
"
>
<a class="dropdown-item" href="https://nitter.private.coffee"
>Clearnet</a
>
<a
class="dropdown-item"
href="http://nitter.coffee2m3bjsrrqqycx6ghkxrnejl2q6nl7pjw2j4clchjj6uk5zozad.onion/"
>Tor (.onion)</a
>
</ul>
</div>
</div>
<div class="service col-sm-4">
<h3>Hosting</h3>
<p>
Need hosting for your privacy-related, social or wholesome
project? We might be able to share our resources with you for
free!
</p>
<a href="mailto:support@private.coffee" class="btn btn-primary"
>Get in touch!</a
>
</div>
<div class="service col-sm-4">
<h3>More?</h3>
<p>
We are working on more services. If you have any suggestions,
please let us know!
</p>
<a href="mailto:support@private.coffee" class="btn btn-primary"
>Get in touch!</a
>
</div>
</div>
</div>
</section>
<footer class="page-footer font-small bg-dark text-white pt-4">
<div class="container text-center text-md-left">
<div class="row">
<div class="col-md-6 mt-md-0 mt-3">
<h5 class="text-uppercase">Private.coffee</h5>
<p>
Private.coffee is a collection of services that respect your
privacy.
</p>
</div>
<hr class="clearfix w-100 d-md-none pb-3" />
<div class="col-md-3 mb-md-0 mb-3">
<h5 class="text-uppercase">Legalese</h5>
<ul class="list-unstyled">
<li>
<a href="legal.html">Legal Notice</a>
</li>
<li>
<a href="privacy.html">Privacy Policy</a>
</li>
<li>
<a href="terms.html">Terms of Service</a>
</li>
</ul>
</div>
<div class="col-md-3 mb-md-0 mb-3">
<h5 class="text-uppercase">Contact</h5>
<ul class="list-unstyled">
<li><a href="mailto:support@private.coffee">Email</a></li>
<li>
<a href="https://matrix.private.cf/#/#support:private.coffee"
>Matrix</a
>
</li>
<li>
<a href="https://kumig.it/privatecoffee/">KumiGit</a> |
<a href="https://github.com/privatecoffee/">GitHub</a>
</li>
</ul>
</div>
</div>
</div>
</footer>
</body>
</html>

23
main.py Normal file
View file

@ -0,0 +1,23 @@
from flask import Flask, render_template, send_from_directory
from jinja2 import TemplateNotFound
import json
import pathlib
app = Flask(__name__)
@app.route('/assets/<path:path>')
def send_assets(path):
return send_from_directory('assets', path)
@app.route('/', defaults={'path': 'index'})
@app.route('/<path:path>.html')
def catch_all(path):
try:
services = json.loads((pathlib.Path(__file__).parent / "services.json").read_text())
return render_template(f'{path}.html', services=services)
except TemplateNotFound:
return "404 Not Found", 404
if __name__ == '__main__':
app.run(port=9810)

14
privatecoffee.ini Normal file
View file

@ -0,0 +1,14 @@
[uwsgi]
module = main:app
uid = %n
gid = %n
master = true
processes = 5
plugins = python3
virtualenv = /srv/%n/venv/
chdir = /srv/%n/
http-socket = /var/run/uwsgi/%n.sock
chown-socket = caddy

2
requirements.txt Normal file
View file

@ -0,0 +1,2 @@
flask
jinja2

View file

@ -1,14 +1,230 @@
{
"services": [
{
"name": "Matrix",
"url": "https://element.private.coffee",
"short_description": "Matrix is an open network for secure, decentralized communication.",
"long_description": "Private.coffee runs a Matrix server. You can use it to chat with other people at Private.coffee or around the world. Use it with a client of your choice, with https://matrix.private.coffee as the homeserver, or use our web client.",
"status": "OK",
"links": [
{
"name": "Go to Element (Web client)",
"url": "https://element.private.coffee"
}
],
"exclude_from_simple": true
},
{
"name": "CryptPad",
"url": "https://cryptpad.private.coffee",
"short_description": "Private, encrypted, real-time collaborative editor.",
"long_description": "CryptPad is a private, encrypted, zero-knowledge, realtime collaborative editor, similar to Google Docs and Office 365.",
"status": "OK",
"links": [
{
"name": "Go to CryptPad",
"url": "https://cryptpad.private.coffee"
}
],
"exclude_from_simple": false
},
{
"name": "Invidious",
"url": "https://invidious.private.coffee",
"description": "Watch YouTube videos without Google tracking you."
"short_description": "Watch YouTube videos without Google tracking.",
"long_description": "Invidious is an alternative front-end to YouTube. It allows you to watch YouTube videos without Google tracking you.",
"status": "OK",
"links": [
{
"name": "Go to Invidious",
"url": "https://invidious.private.coffee"
}
],
"exclude_from_simple": false
},
{
"name": "Mastodon",
"url": "https://cuddly.space",
"short_description": "Mastodon is a decentralized social network.",
"long_description": "Mastodon is a decentralized social network. You can use it to post short messages, follow other people, and more.",
"status": "OK",
"links": [
{
"name": "Go to Cuddly Space",
"url": "https://cuddly.space"
},
{
"name": "Go to Skrt Social",
"url": "https://skrt.social"
}
],
"exclude_from_simple": false
},
{
"name": "GotHub",
"url": "https://gothub.private.coffee",
"short_description": "Alternative GitHub interface that respects privacy.",
"long_description": "Gothub is an alternative GitHub interface that respects your privacy. It is currently in alpha, but you can browse and download repositories, and you can also clone them using git+https (although the text on the main page would disagree).",
"status": "OK",
"links": [
{
"name": "Go to GotHub",
"url": "https://gothub.private.coffee"
}
],
"exclude_from_simple": false
},
{
"name": "redlib",
"url": "https://redlib.private.coffee",
"short_description": "redlib is a privacy-friendly alternative front-end to Reddit.",
"long_description": "redlib is a privacy-friendly alternative front-end to Reddit. It allows you to browse Reddit without being tracked.",
"status": "OK",
"links": [
{
"name": "Go to Libreddit",
"url": "https://libreddit.private.coffee",
"alternatives": [
{
"name": "Tor (.onion)",
"url": "http://libreddit.coffee2m3bjsrrqqycx6ghkxrnejl2q6nl7pjw2j4clchjj6uk5zozad.onion/"
}
]
}
],
"exclude_from_simple": true
},
{
"name": "AllTube",
"url": "https://alltube.private.coffee",
"short_description": "Download videos from YouTube, Vimeo, and more.",
"long_description": "AllTube is a video downloader powered by yt-dlp. It allows you to download videos from YouTube, Vimeo, and many other sites. You can also stream the download through our server for extra privacy.",
"status": "OK",
"links": [
{
"name": "Go to AllTube",
"url": "https://alltube.private.coffee"
}
],
"exclude_from_simple": false
},
{
"name": "Indestructables",
"url": "https://indestructables.private.coffee",
"short_description": "Browse Instructables without being tracked.",
"long_description": "Indestructables allows you to browse Instructables without being tracked. (N.B.: We forked this project, our instance does not use the original code.)",
"status": "OK",
"links": [
{
"name": "Go to Indestructables",
"url": "https://indestructables.private.coffee"
}
],
"exclude_from_simple": false
},
{
"name": "NocoDB",
"url": "https://nocodb.private.coffee",
"short_description": "NocoDB is a self-hosted alternative to Airtable.",
"long_description": "NocoDB is a self-hosted alternative to Airtable. It allows you to create databases and tables, and to view and edit them in a spreadsheet-like interface. (Note: If you are unable to create tables upon registration, simply wait a minute or two, log out and then log in again.)",
"status": "OK",
"links": [
{
"name": "Go to NocoDB",
"url": "https://nocodb.private.coffee"
}
],
"exclude_from_simple": false
},
{
"name": "Penpot",
"url": "https://penpot.private.coffee",
"short_description": "Penpot is an open-source design and prototyping platform.",
"long_description": "Penpot is an open-source design and prototyping platform. It allows you to create designs and prototypes, and to collaborate with others.",
"status": "OK",
"links": [
{
"name": "Go to Penpot",
"url": "https://penpot.private.coffee"
}
],
"exclude_from_simple": false
},
{
"name": "YOURLS",
"url": "https://private.cf",
"short_description": "URL shortener for creating handy links.",
"long_description": "Use our URL shortener at private.cf to turn long, complicated URLs into something more handy.",
"status": "OK",
"links": [
{
"name": "Go to private.cf",
"url": "https://private.cf"
}
],
"exclude_from_simple": false
},
{
"name": "Rallly",
"url": "https://rallly.private.coffee",
"short_description": "Rallly is a free collaborative scheduling service for voting and polls.",
"long_description": "Rallly is a free collaborative scheduling service. It allows you to create polls and vote on them, similar to Doodle.",
"status": "OK",
"links": [
{
"name": "Go to Rallly",
"url": "https://rallly.private.coffee"
}
],
"exclude_from_simple": false
},
{
"name": "LibreY",
"url": "https://librey.private.coffee",
"short_description": "Privacy-friendly metasearch engine.",
"long_description": "LibreY is an open-source, privacy-friendly metasearch engine. It allows you to search for web, image, video, torrents, and more, and it can also search onion sites.",
"status": "OK",
"links": [
{
"name": "Go to LibreY",
"url": "https://librey.private.coffee"
}
],
"exclude_from_simple": false
},
{
"name": "Overleaf",
"url": "https://overleaf.private.coffee",
"short_description": "Overleaf is an online LaTeX editor for writing and sharing documents.",
"long_description": "Overleaf is an online LaTeX editor for writing and sharing documents. It allows you to write documents in LaTeX, and to collaborate with others.",
"status": "OK",
"links": [
{
"name": "Go to Overleaf",
"url": "https://overleaf.private.coffee"
}
],
"exclude_from_simple": false
},
{
"name": "Nitter",
"url": "https://nitter.private.coffee",
"description": "Use Twitter without Twitter tracking you."
"short_description": "Nitter is a privacy-friendly alternative front-end to Twitter.",
"long_description": "Nitter is a privacy-friendly alternative front-end to Twitter. It allows you to browse Twitter without being tracked. Currently broken.",
"status": "NOK",
"links": [
{
"name": "Go to Nitter",
"url": "https://nitter.private.coffee",
"alternatives": [
{
"name": "Tor (.onion)",
"url": "http://nitter.coffee2m3bjsrrqqycx6ghkxrnejl2q6nl7pjw2j4clchjj6uk5zozad.onion/"
}
]
}
],
"exclude_from_simple": true
}
]
}

View file

@ -1,30 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Private.coffee</title>
</head>
<body>
<div style="font-family: Arial, sans-serif; background-color: #f2f2f2; color: #333; line-height: 1.6; padding: 20px; max-width: 600px; margin: auto;">
<h2 style="color: #333;">Welcome to Private.coffee</h2>
<p>Thanks for using our Element instance. Private.coffee is a collection of services that respect your privacy, here are some others:</p>
<ul style="list-style: none; padding: 0;">
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://cryptpad.private.coffee/">CryptPad</a> - Private, encrypted, real-time collaborative editor.</li>
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://invidious.private.coffee/">Invidious</a> - Watch YouTube videos without Google tracking.</li>
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://skrt.social/">Mastodon - skrt.social</a> - Decentralized social network instance.</li>
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://cuddly.space/">Mastodon - cuddly.space</a> - Decentralized social network instance.</li>
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://gothub.private.coffee/">Gothub</a> - Alternative GitHub interface that respects privacy.</li>
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://alltube.private.coffee/">AllTube</a> - Video downloader for sites like YouTube and Vimeo.</li>
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://indestructables.private.coffee/">Indestructables</a> - Browse Instructables without being tracked.</li>
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://nocodb.private.coffee/">NocoDB</a> - Open-source tool turning databases into smart spreadsheets.</li>
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://penpot.private.coffee/">Penpot</a> - Open-source design and prototyping platform.</li>
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://private.cf/">YOURLS</a> - URL shortener for creating handy links.</li>
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://rallly.private.coffee/">Rallly</a> - Collaborative scheduling service for polls and voting.</li>
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://librey.private.coffee/">LibreY</a> - Privacy-friendly metasearch engine.</li>
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="https://overleaf.private.coffee/">Overleaf</a> - Collaborative LaTeX editor for writing and sharing documents.</li>
</ul>
<p>For hosting inquiries for privacy-related, social, or wholesome projects, <a href="mailto:support@private.coffee" style="color: #1a5dab; text-decoration: none;">get in touch</a>!</p>
</div>
</body>
</html>

179
templates/index.html Normal file
View file

@ -0,0 +1,179 @@
<!DOCTYPE html>
<!-- This file was created as part of the Private.coffee project
It is licensed under the MIT license
For more information, please visit https://private.coffee -->
<html>
<head>
<title>Private.coffee</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="assets/img/logo-inv.svg" />
<link rel="stylesheet" href="assets/css/base.css" />
<link rel="stylesheet" href="assets/dist/css/bootstrap.min.css" />
<script src="assets/dist/js/jquery.min.js"></script>
<script src="assets/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<div class="container">
<a class="navbar-brand" href="/">
<img
class="navbar-brand-img"
src="assets/img/logo-inv.svg"
alt="Private.coffee logo"
/>
Private.coffee
</a>
<ul class="navbar-nav">
<ul class="nav-item dropdown">
<a
class="nav-link dropdown-toggle"
href="#"
id="navbardrop"
data-bs-toggle="dropdown"
>Status Page</a
>
<div class="dropdown-menu">
<a class="dropdown-item" href="https://status.private.coffee"
>Clearnet</a
>
<a
class="dropdown-item"
href="http://status.coffee2m3bjsrrqqycx6ghkxrnejl2q6nl7pjw2j4clchjj6uk5zozad.onion/"
>Tor</a
>
</div>
</ul>
</ul>
</div>
</nav>
<section id="content">
<div class="container">
<h1>Welcome to Private.coffee</h1>
<p>
Private.coffee is a collection of services that respect your privacy.
</p>
<p>
Click on a service to go to it. Some services are also available using
Tor and/or I2P. Click the arrow behind the "Go to" link to see all
available versions.
</p>
<div class="row" id="services">
{% for service in services.services %}
<div class="service col-sm-4">
<h3>{{ service.name }}</h3>
<p>
{{ service.long_description }}
</p>
{% for link in service.links %}
<div class="btn-group">
<a href="{{ link.url }}" class="btn
{% if service.status == "OK" %}btn-primary{% else %}btn-danger{% endif %}"
>{{ link.name }}</a
>
{% if link.alternatives %}
<button
type="button"
class="btn btn-danger dropdown-toggle dropdown-toggle-split"
data-bs-toggle="dropdown"
aria-expanded="false"
>
<span class="visually-hidden">Toggle Dropdown</span>
</button>
<ul
class="dropdown-menu"
x-placement="bottom-start"
style="
position: absolute;
transform: translate3d(80px, 38px, 0px);
top: 0px;
left: 0px;
will-change: transform;
"
>
{% for alternative in link.alternatives %}
<a class="dropdown-item" href="{{ alternative.url }}"
>{{ alternative.name }}</a
>
{% endfor %}
</ul>
{% endif %}
</div>
{% endfor %}
</div>
{% endfor %}
<div class="service col-sm-4">
<h3>Hosting</h3>
<p>
Need hosting for your privacy-related, social or wholesome
project? We might be able to share our resources with you for
free!
</p>
<a href="mailto:support@private.coffee" class="btn btn-primary"
>Get in touch!</a
>
</div>
<div class="service col-sm-4">
<h3>More?</h3>
<p>
We are working on more services. If you have any suggestions,
please let us know!
</p>
<a href="mailto:support@private.coffee" class="btn btn-primary"
>Get in touch!</a
>
</div>
</div>
</div>
</section>
<footer class="page-footer font-small bg-dark text-white pt-4">
<div class="container text-center text-md-left">
<div class="row">
<div class="col-md-6 mt-md-0 mt-3">
<h5 class="text-uppercase">Private.coffee</h5>
<p>
Private.coffee is a collection of services that respect your
privacy.
</p>
</div>
<hr class="clearfix w-100 d-md-none pb-3" />
<div class="col-md-3 mb-md-0 mb-3">
<h5 class="text-uppercase">Legalese</h5>
<ul class="list-unstyled">
<li>
<a href="legal.html">Legal Notice</a>
</li>
<li>
<a href="privacy.html">Privacy Policy</a>
</li>
<li>
<a href="terms.html">Terms of Service</a>
</li>
</ul>
</div>
<div class="col-md-3 mb-md-0 mb-3">
<h5 class="text-uppercase">Contact</h5>
<ul class="list-unstyled">
<li><a href="mailto:support@private.coffee">Email</a></li>
<li>
<a href="https://matrix.private.cf/#/#support:private.coffee"
>Matrix</a
>
</li>
<li>
<a href="https://kumig.it/privatecoffee/">KumiGit</a> |
<a href="https://github.com/privatecoffee/">GitHub</a>
</li>
</ul>
</div>
</div>
</div>
</footer>
</body>
</html>

View file

@ -8,12 +8,12 @@
<title>Private.coffee</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="/assets/img/logo-inv.svg" />
<link rel="stylesheet" href="/assets/css/base.css" />
<link rel="stylesheet" href="/dist/css/bootstrap.min.css" />
<script src="/dist/js/jquery.min.js"></script>
<script src="/dist/js/popper.min.js"></script>
<script src="/dist/js/bootstrap.min.js"></script>
<link rel="icon" type="image/svg+xml" href="assets/img/logo-inv.svg" />
<link rel="stylesheet" href="assets/css/base.css" />
<link rel="stylesheet" href="assets/dist/css/bootstrap.min.css" />
<script src="assets/dist/js/jquery.min.js"></script>
<script src="assets/dist/js/popper.min.js"></script>
<script src="assets/dist/js/bootstrap.min.js"></script>
</head>
<body>
@ -21,7 +21,7 @@
<a class="navbar-brand" href="/">
<img
class="navbar-brand-img"
src="/assets/img/logo-inv.svg"
src="assets/img/logo-inv.svg"
alt="Private.coffee logo"
/>
Private.coffee

View file

@ -8,12 +8,12 @@
<title>Private.coffee</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="/assets/img/logo-inv.svg" />
<link rel="stylesheet" href="/assets/css/base.css" />
<link rel="stylesheet" href="/dist/css/bootstrap.min.css" />
<script src="/dist/js/jquery.min.js"></script>
<script src="/dist/js/popper.min.js"></script>
<script src="/dist/js/bootstrap.min.js"></script>
<link rel="icon" type="image/svg+xml" href="assets/img/logo-inv.svg" />
<link rel="stylesheet" href="assets/css/base.css" />
<link rel="stylesheet" href="assets/dist/css/bootstrap.min.css" />
<script src="assets/dist/js/jquery.min.js"></script>
<script src="assets/dist/js/popper.min.js"></script>
<script src="assets/dist/js/bootstrap.min.js"></script>
</head>
<body>
@ -21,7 +21,7 @@
<a class="navbar-brand" href="/">
<img
class="navbar-brand-img"
src="/assets/img/logo-inv.svg"
src="assets/img/logo-inv.svg"
alt="Private.coffee logo"
/>
Private.coffee

22
templates/simple.html Normal file
View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Private.coffee</title>
</head>
<body>
<div style="font-family: Arial, sans-serif; background-color: #f2f2f2; color: #333; line-height: 1.6; padding: 20px; max-width: 600px; margin: auto;">
<h2 style="color: #333;">Welcome to Private.coffee</h2>
<p>Thanks for using our Element instance. Private.coffee is a collection of services that respect your privacy, here are some others:</p>
<ul style="list-style: none; padding: 0;">
{% for service in services.services %}
{% if not service.exclude_from_simple %}
<li style="padding: 8px 0;"><a style="color: #1a5dab; text-decoration: none;" href="{{ service.url }}">{{ service.name }}</a> - {{ service.short_description }}</li>
{% endif %}
{% endfor %}
</ul>
<p>For hosting inquiries for privacy-related, social, or wholesome projects, <a href="mailto:support@private.coffee" style="color: #1a5dab; text-decoration: none;">get in touch</a>!</p>
</div>
</body>
</html>

View file

@ -8,12 +8,12 @@
<title>Private.coffee</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/svg+xml" href="/assets/img/logo-inv.svg" />
<link rel="stylesheet" href="/assets/css/base.css" />
<link rel="stylesheet" href="/dist/css/bootstrap.min.css" />
<script src="/dist/js/jquery.min.js"></script>
<script src="/dist/js/popper.min.js"></script>
<script src="/dist/js/bootstrap.min.js"></script>
<link rel="icon" type="image/svg+xml" href="assets/img/logo-inv.svg" />
<link rel="stylesheet" href="assets/css/base.css" />
<link rel="stylesheet" href="assets/dist/css/bootstrap.min.css" />
<script src="assets/dist/js/jquery.min.js"></script>
<script src="assets/dist/js/popper.min.js"></script>
<script src="assets/dist/js/bootstrap.min.js"></script>
</head>
<body>
@ -21,7 +21,7 @@
<a class="navbar-brand" href="/">
<img
class="navbar-brand-img"
src="/assets/img/logo-inv.svg"
src="assets/img/logo-inv.svg"
alt="Private.coffee logo"
/>
Private.coffee