diff --git a/CHANGELOG.md b/CHANGELOG.md index 52afaab7..f13cbe73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ### Improvements - Use multicolor channel icons for better appearance in the dark mode +- Add SITE_LOGO_URL setting (#323) ### Bug Fixes - Fix dark mode styling issues in Cron Syntax Cheatsheet diff --git a/hc/front/context_processors.py b/hc/front/context_processors.py index eca8bd9f..b7e5f32f 100644 --- a/hc/front/context_processors.py +++ b/hc/front/context_processors.py @@ -2,4 +2,8 @@ from django.conf import settings def branding(request): - return {"site_name": settings.SITE_NAME, "site_root": settings.SITE_ROOT} + return { + "site_name": settings.SITE_NAME, + "site_root": settings.SITE_ROOT, + "site_logo_url": settings.SITE_LOGO_URL, + } diff --git a/hc/settings.py b/hc/settings.py index 2867d9c6..af0d0a59 100644 --- a/hc/settings.py +++ b/hc/settings.py @@ -155,6 +155,7 @@ LOCALE_PATHS = (os.path.join(BASE_DIR, "locale"),) SITE_ROOT = os.getenv("SITE_ROOT", "http://localhost:8000") SITE_NAME = os.getenv("SITE_NAME", "Mychecks") +SITE_LOGO_URL = os.getenv("SITE_LOGO_URL") MASTER_BADGE_LABEL = os.getenv("MASTER_BADGE_LABEL", SITE_NAME) PING_ENDPOINT = os.getenv("PING_ENDPOINT", SITE_ROOT + "/ping/") PING_EMAIL_DOMAIN = os.getenv("PING_EMAIL_DOMAIN", "localhost") diff --git a/static/img/logo-512-green.png b/static/img/logo-512-green.png deleted file mode 100644 index ad7ffa6e..00000000 Binary files a/static/img/logo-512-green.png and /dev/null differ diff --git a/static/img/logo-full.png b/static/img/logo-full.png deleted file mode 100644 index 9f8af5b6..00000000 Binary files a/static/img/logo-full.png and /dev/null differ diff --git a/static/img/logo-full@2x.png b/static/img/logo-full@2x.png deleted file mode 100644 index 52c2798d..00000000 Binary files a/static/img/logo-full@2x.png and /dev/null differ diff --git a/static/img/logo@2x.png b/static/img/logo@2x.png deleted file mode 100644 index a8664792..00000000 Binary files a/static/img/logo@2x.png and /dev/null differ diff --git a/templates/base.html b/templates/base.html index e9afb8b3..3300a300 100644 --- a/templates/base.html +++ b/templates/base.html @@ -82,19 +82,15 @@ {% if request.user.is_authenticated and project %} {{ project }} - {% elif request.user.is_authenticated%} - {% else %} {% endif %} diff --git a/templates/docs/self_hosted_configuration.html b/templates/docs/self_hosted_configuration.html index 1b9815e9..b3b82de1 100644 --- a/templates/docs/self_hosted_configuration.html +++ b/templates/docs/self_hosted_configuration.html @@ -287,6 +287,14 @@ notifications. Healthcecks interacts with signal-cli over DBus.
example given in the signal-cli instructions.SIGNAL_CLI_ENABLED
environment variable to True
.SITE_LOGO_URL
Default: None
An URL pointing to the image you want to use as the site logo. If not set,
+Healthchecks will use a fallback image (/static/img/logo.png
).
Example:
+SITE_LOGO_URL=https://example.org/my-custom-logo.svg
+
SITE_NAME
Default: Mychecks
The display name of this Healthchecks instance. Healthchecks uses it throughout diff --git a/templates/docs/self_hosted_configuration.md b/templates/docs/self_hosted_configuration.md index 83274447..f5031c79 100644 --- a/templates/docs/self_hosted_configuration.md +++ b/templates/docs/self_hosted_configuration.md @@ -456,6 +456,19 @@ To enable the Signal integration: example given in the signal-cli instructions. * Set the `SIGNAL_CLI_ENABLED` environment variable to `True`. +## `SITE_LOGO_URL` {: #SITE_LOGO_URL } + +Default: `None` + +An URL pointing to the image you want to use as the site logo. If not set, +Healthchecks will use a fallback image (`/static/img/logo.png`). + +Example: + +```ini +SITE_LOGO_URL=https://example.org/my-custom-logo.svg +``` + ## `SITE_NAME` {: #SITE_NAME } Default: `Mychecks`