High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.
JavaScript campaigncampaign-managementemail-marketingemail-subscriptionlistmonkmailing-listnewsletternewsletter-managementnewsletter-softwareself-hostedsms-gatewaysmtptransactional-emails
Switch from Inter to Geist font to significantly reduce bundled woff2 file sizes.
Kailash Nadh3b39117c3ab0
diff --git a/static/admin/assets/css/style.css b/static/admin/assets/css/style.cssindex 2bff8135..f147ea02 100644--- a/static/admin/assets/css/style.css+++ b/static/admin/assets/css/style.css@@ -1,26 +1,18 @@/* Fonts */@font-face {- font-family: 'Inter';- font-weight: 400;+ font-family: 'Geist';+ font-weight: 100 900;font-style: normal;font-display: swap;- src: url('./fonts/Inter-Regular.woff2') format('woff2');+ src: url('./fonts/Geist-Variable.woff2') format('woff2');}@font-face {- font-family: 'Inter';- font-weight: 500;- font-style: normal;- font-display: swap;- src: url('./fonts/Inter-Medium.woff2') format('woff2');-}--@font-face {- font-family: 'Inter';- font-weight: 600;- font-style: normal;+ font-family: 'Geist';+ font-weight: 100 900;+ font-style: italic;font-display: swap;- src: url('./fonts/Inter-SemiBold.woff2') format('woff2');+ src: url('./fonts/Geist-Italic-Variable.woff2') format('woff2');}/* Theme */@@ -31,7 +23,7 @@--muted-foreground: light-dark(#7a7a7a, #a1a1aa);--container-max: 1150px;--border: light-dark(#e5e7eb, #52525b);- --font-sans: "Inter", system-ui, sans-serif;+ --font-sans: "Geist", system-ui, sans-serif;--text-1: 1.5rem;--text-regular: var(--text-7);}@@ -45,7 +37,7 @@ body {body {background: var(--body);- font-family: "Inter", system-ui, sans-serif;+ font-family: var(--font-sans);}a {diff --git a/static/admin/assets/js/richtext-editor.js b/static/admin/assets/js/richtext-editor.jsindex f6e83ce5..bd40570c 100644--- a/static/admin/assets/js/richtext-editor.js+++ b/static/admin/assets/js/richtext-editor.js@@ -136,7 +136,7 @@ class RichtextEditor extends HTMLElement {fontsize_formats: '10px 11px 12px 14px 15px 16px 18px 24px 36px',content_css: false,content_style: `- body { font-family: 'Inter', sans-serif; font-size: 15px; }+ body { font-family: 'Geist', sans-serif; font-size: 15px; }img { max-width: 100%; }img.img-float-left { float: left; margin: 0 1em 1em 0; }img.img-float-right { float: right; margin: 0 0 1em 1em; }diff --git a/static/admin/assets/js/views/dashboard.js b/static/admin/assets/js/views/dashboard.jsindex b0ac97ca..ff398761 100644--- a/static/admin/assets/js/views/dashboard.js+++ b/static/admin/assets/js/views/dashboard.js@@ -1,6 +1,6 @@import Chart from 'chart.js/auto';-const FONT_FAMILY = "'Inter', sans-serif";+const FONT_FAMILY = "'Geist', sans-serif";// Format an ISO date ('2024-06-01') to a short 'DD Mon' label.function label(iso) {diff --git a/static/admin/assets/static/fonts/Geist-Italic-Variable.woff2 b/static/admin/assets/static/fonts/Geist-Italic-Variable.woff2new file mode 100644index 00000000..58b157a8Binary files /dev/null and b/static/admin/assets/static/fonts/Geist-Italic-Variable.woff2 differdiff --git a/static/admin/assets/static/fonts/Geist-Variable.woff2 b/static/admin/assets/static/fonts/Geist-Variable.woff2new file mode 100644index 00000000..5c5999d6Binary files /dev/null and b/static/admin/assets/static/fonts/Geist-Variable.woff2 differdiff --git a/static/admin/assets/static/fonts/Inter-Bold.woff2 b/static/admin/assets/static/fonts/Inter-Bold.woff2deleted file mode 100644index 2846f29c..00000000Binary files a/static/admin/assets/static/fonts/Inter-Bold.woff2 and /dev/null differdiff --git a/static/admin/assets/static/fonts/Inter-Medium.woff2 b/static/admin/assets/static/fonts/Inter-Medium.woff2deleted file mode 100644index fdfdcc69..00000000Binary files a/static/admin/assets/static/fonts/Inter-Medium.woff2 and /dev/null differdiff --git a/static/admin/assets/static/fonts/Inter-Regular.woff2 b/static/admin/assets/static/fonts/Inter-Regular.woff2deleted file mode 100644index 2bcd222e..00000000Binary files a/static/admin/assets/static/fonts/Inter-Regular.woff2 and /dev/null differdiff --git a/static/admin/assets/static/fonts/Inter-SemiBold.woff2 b/static/admin/assets/static/fonts/Inter-SemiBold.woff2deleted file mode 100644index fbae113d..00000000Binary files a/static/admin/assets/static/fonts/Inter-SemiBold.woff2 and /dev/null differdiff --git a/static/admin/assets/static/fonts/LICENSE.txt b/static/admin/assets/static/fonts/LICENSE.txtnew file mode 100644index 00000000..8d003fec--- /dev/null+++ b/static/admin/assets/static/fonts/LICENSE.txt@@ -0,0 +1,92 @@+Copyright (c) 2023 Vercel, in collaboration with basement.studio++This Font Software is licensed under the SIL Open Font License, Version 1.1.+This license is copied below, and is also available with a FAQ at:+http://scripts.sil.org/OFL++-----------------------------------------------------------+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007+-----------------------------------------------------------++PREAMBLE+The goals of the Open Font License (OFL) are to stimulate worldwide+development of collaborative font projects, to support the font creation+efforts of academic and linguistic communities, and to provide a free and+open framework in which fonts may be shared and improved in partnership+with others.++The OFL allows the licensed fonts to be used, studied, modified and+redistributed freely as long as they are not sold by themselves. The+fonts, including any derivative works, can be bundled, embedded,+redistributed and/or sold with any software provided that any reserved+names are not used by derivative works. The fonts and derivatives,+however, cannot be released under any other type of license. The+requirement for fonts to remain under this license does not apply+to any document created using the fonts or their derivatives.++DEFINITIONS+"Font Software" refers to the set of files released by the Copyright+Holder(s) under this license and clearly marked as such. This may+include source files, build scripts and documentation.++"Reserved Font Name" refers to any names specified as such after the+copyright statement(s).++"Original Version" refers to the collection of Font Software components as+distributed by the Copyright Holder(s).++"Modified Version" refers to any derivative made by adding to, deleting,+or substituting -- in part or in whole -- any of the components of the+Original Version, by changing formats or by porting the Font Software to a+new environment.++"Author" refers to any designer, engineer, programmer, technical+writer or other person who contributed to the Font Software.++PERMISSION AND CONDITIONS+Permission is hereby granted, free of charge, to any person obtaining+a copy of the Font Software, to use, study, copy, merge, embed, modify,+redistribute, and sell modified and unmodified copies of the Font+Software, subject to the following conditions:++1) Neither the Font Software nor any of its individual components,+in Original or Modified Versions, may be sold by itself.++2) Original or Modified Versions of the Font Software may be bundled,+redistributed and/or sold with any software, provided that each copy+contains the above copyright notice and this license. These can be+included either as stand-alone text files, human-readable headers or+in the appropriate machine-readable metadata fields within text or+binary files as long as those fields can be easily viewed by the user.++3) No Modified Version of the Font Software may use the Reserved Font+Name(s) unless explicit written permission is granted by the corresponding+Copyright Holder. This restriction only applies to the primary font name as+presented to the users.++4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+Software shall not be used to promote, endorse or advertise any+Modified Version, except to acknowledge the contribution(s) of the+Copyright Holder(s) and the Author(s) or with their explicit written+permission.++5) The Font Software, modified or unmodified, in part or in whole,+must be distributed entirely under this license, and must not be+distributed under any other license. The requirement for fonts to+remain under this license does not apply to any document created+using the Font Software.++TERMINATION+This license becomes null and void if any of the above conditions are+not met.++DISCLAIMER+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+OTHER DEALINGS IN THE FONT SOFTWARE.diff --git a/static/admin/build.mjs b/static/admin/build.mjsindex 18df33a6..5ae073a4 100644--- a/static/admin/build.mjs+++ b/static/admin/build.mjs@@ -58,9 +58,10 @@ async function build() {await rm(dist, { recursive: true, force: true });await mkdir(dist, { recursive: true });- // Verbatim static assets (fonts, icons, images) and stylesheets.+ // Verbatim static assets (icons, images) and stylesheets.await cp(path.join(root, 'assets/static'), dist, { recursive: true });await cp(path.join(root, 'assets/css/style.css'), path.join(dist, 'style.css'));+// Oat CSS is loaded in <head> as is.await cp(path.join(root, 'node_modules/@knadh/oat/oat.min.css'), path.join(dist, 'oat.min.css'));await copyTinyMCE();diff --git a/static/admin/partials/filter-badge.html b/static/admin/partials/filter-badge.htmlnew file mode 100644index 00000000..190805c1--- /dev/null+++ b/static/admin/partials/filter-badge.html@@ -0,0 +1,5 @@+{{ define "filter-badge" -}}+<span class="filter-tag">+ {{ Badge .Label (default "" .Class) (default "" .Variant) }} <a href="{{ .URL }}" title="{{ L.T "globals.buttons.remove" }}">{{ Icon "x" }}</a>+</span>+{{- end }}diff --git a/static/admin/views/base.html b/static/admin/views/base.htmlindex 9f71f7af..47cbeac3 100644--- a/static/admin/views/base.html+++ b/static/admin/views/base.html@@ -1,4 +1,7 @@{{ define "admin-head-assets" }}+ {{/* No ?v= cache-busting unlike other assets here. This is to match the same path in style.css to avoid double loading. */}}+ <link rel="preload" href="{{ URI "/admin/static/fonts/Geist-Variable.woff2" }}" as="font" type="font/woff2" crossorigin />+<link href="{{ URI "/admin/static/oat.min.css" }}?v={{ .AssetVersion }}" rel="stylesheet" type="text/css" /><link href="{{ URI "/admin/static/style.css" }}?v={{ .AssetVersion }}" rel="stylesheet" type="text/css" /><link href="{{ URI "/admin/custom.css" }}?v={{ .CustomAssetVersion }}" rel="stylesheet" type="text/css" />