Add dark theme and secret key creation script
This commit is contained in:
@@ -4,7 +4,20 @@ A Dockerized publishing service for eternityproject.fi. It provides local accoun
|
||||
|
||||
## Run it
|
||||
|
||||
1. Copy `.env.example` to `.env` and replace `SECRET_KEY` with a long random string.
|
||||
1. Copy `.env.example` to `.env` and replace `SECRET_KEY` with a long random string. Generate one with:
|
||||
|
||||
```powershell
|
||||
# Windows PowerShell
|
||||
.\scripts\generate-secret-key.ps1
|
||||
```
|
||||
|
||||
```sh
|
||||
# Linux, macOS, or any POSIX shell
|
||||
sh ./scripts/generate-secret-key.sh
|
||||
```
|
||||
|
||||
Paste the printed value into `SECRET_KEY` in `.env`. The scripts only print a value; they never modify `.env`.
|
||||
|
||||
2. Build and start the service:
|
||||
|
||||
```sh
|
||||
@@ -31,6 +44,12 @@ Posts are public by default. Authors can select **Members only** while writing o
|
||||
|
||||
Administrators can freeze member accounts from **Accounts**. Frozen members cannot sign in and are signed out on their next protected request; administrators can unfreeze them later. Administrators can also permanently delete a member account. Deleting an account also permanently removes its posts, uploaded images, and outstanding reset or verification tokens.
|
||||
|
||||
## Theming
|
||||
|
||||
The site ships with a light theme and a dark "wasteland" variant. The **WASTELAND** / **DAYLIGHT** button in the navigation toggles between them and remembers the choice in the browser's local storage; an inline script applies the saved theme before the page renders to avoid a flash of the wrong theme. Colors for both variants live as CSS custom properties in [static/css/site.css](static/css/site.css), overridden under the `[data-theme="dark"]` selector.
|
||||
|
||||
A framework-agnostic copy of the theme is available under [themes/](themes/) for reuse on other web pages: [themes/eternity-theme.css](themes/eternity-theme.css) contains the core design system (header, buttons, hero, cards, forms, code blocks, flashes) with no Flask or Jinja dependencies, and [themes/demo.html](themes/demo.html) is a standalone starter template demonstrating the components and the dark-mode toggle.
|
||||
|
||||
## Accounts and MFA
|
||||
|
||||
The initial administrator account is `admin` with password `admin`, as requested for first-run access. Sign in, scan the displayed QR code with any iPhone or Android TOTP authenticator, and change this password before exposing the service to the internet. New registrations are held for approval in **Accounts**; accepted users must enroll a TOTP authenticator before they can publish.
|
||||
|
||||
Reference in New Issue
Block a user