patx/projectpay
Replace payment page logo with Ubuntu brand text
Commit 3d4813d · patx · Oct 27 at 6:30PM
Comments
No comments yet.
Diff
diff --git a/README.md b/README.md
index 71b8a48..4ea6355 100644
--- a/README.md
+++ b/README.md
@@ -163,7 +163,7 @@ On Heroku dynos, login rate limiting uses the final `X-Forwarded-For` value adde
## Customization
-- The public payment page uses the After Dark Labs lockup from `https://afterdarklabs.io/logo_assets/lockup.svg`.
+- The public payment page displays “After Dark Labs” in Ubuntu font, loaded from Google Fonts.
- Set `PUBLIC_APP_ICON_URL` to change the icon used by `/manifest.json`.
- Update styles in `templates/base.html`.
- The current default database name is `invoice_maker`; set `MONGODB_DB=projectpay` for a fresh ProjectPay deployment.
diff --git a/app.py b/app.py
index 0b367ab..7063f81 100644
--- a/app.py
+++ b/app.py
@@ -41,7 +41,8 @@ SECURITY_HEADERS = [
"Content-Security-Policy",
"default-src 'self'; "
"script-src 'self' 'unsafe-inline'; "
- "style-src 'self' 'unsafe-inline'; "
+ "style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; "
+ "font-src 'self' https://fonts.gstatic.com; "
"img-src 'self' https: data:; "
"connect-src 'self'; "
"frame-ancestors 'none'; "
diff --git a/templates/base.html b/templates/base.html
index a2dc226..23dca2d 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
<link rel="manifest" href="/manifest.json">
<title>{% block title %}Project Payments{% endblock %}</title>
+ {% block extra_head %}{% endblock %}
<style>
* { box-sizing: border-box; }
[hidden] { display: none !important; }
@@ -38,9 +39,6 @@
--info-bg: #edf5ff;
--sticky-bg: rgba(247, 247, 247, .96);
--shadow-color: rgba(31, 41, 51, .22);
- --logo-bg: #0b1016;
- --logo-border: rgba(31, 41, 51, .16);
- --logo-shadow: 0 8px 24px rgba(31, 41, 51, .12);
}
@media (prefers-color-scheme: dark) {
:root {
@@ -67,9 +65,6 @@
--info-bg: #132c45;
--sticky-bg: rgba(15, 23, 32, .96);
--shadow-color: rgba(0, 0, 0, .35);
- --logo-bg: #080d12;
- --logo-border: #2a3745;
- --logo-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}
}
body {
@@ -133,22 +128,12 @@
}
.topbar-inner, .header-row { justify-content: space-between; }
.brand { font-weight: 750; text-decoration: none; }
- .public-logo {
- display: flex;
- width: fit-content;
- max-width: 100%;
+ .public-brand {
margin: 0 auto 22px;
- padding: 10px 14px;
- border: 1px solid var(--logo-border);
- border-radius: 10px;
- background: var(--logo-bg);
- box-shadow: var(--logo-shadow);
- }
- .public-logo img {
- display: block;
- width: 360px;
- max-width: 100%;
- height: auto;
+ font-family: "Ubuntu", sans-serif;
+ font-size: clamp(28px, 6vw, 36px);
+ font-weight: 500;
+ text-align: center;
}
.title-line {
display: flex;
diff --git a/templates/public_project.html b/templates/public_project.html
index b0d1f45..7337172 100644
--- a/templates/public_project.html
+++ b/templates/public_project.html
@@ -1,10 +1,13 @@
{% extends "base.html" %}
{% block title %}{{ project.project_number }}{% endblock %}
+{% block extra_head %}
+ <link rel="preconnect" href="https://fonts.googleapis.com">
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+ <link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@500&display=swap" rel="stylesheet">
+{% endblock %}
{% block page_class %}{{ 'has-sticky-pay' if project.balance_cents > 0 else '' }}{% endblock %}
{% block content %}
- <div class="public-logo">
- <img src="https://afterdarklabs.io/logo_assets/lockup.svg" alt="After Dark Labs">
- </div>
+ <div class="public-brand">After Dark Labs</div>
<div class="header-row">
<div>
<div class="title-line">