From a6b395c0685f1532b77996c0a81fc0a9b9698ab0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 25 May 2020 12:33:37 +0100 Subject: [PATCH] hacker theme font is bedstead --- daemon.py | 9 ++++++--- epicyon-blog.css | 8 ++++++++ epicyon-follow.css | 8 ++++++++ epicyon-login.css | 8 ++++++++ epicyon-profile.css | 10 +++++++++- epicyon-suspended.css | 8 ++++++++ theme.py | 2 +- 7 files changed, 48 insertions(+), 5 deletions(-) diff --git a/daemon.py b/daemon.py index 00155a209..4d5516bfd 100644 --- a/daemon.py +++ b/daemon.py @@ -1741,11 +1741,14 @@ class PubServer(BaseHTTPRequestHandler): # get fonts if self.path.startswith('/fonts/'): fontStr = self.path.split('/fonts/')[1] - if fontsStr.endswith('.ttf') or \ + if fontsStr.endswith('.otf') or \ + fontsStr.endswith('.ttf') or \ fontsStr.endswith('.woff') or \ fontsStr.endswith('.woff2'): - if fontsStr.endswith('.ttf'): - fontType = 'application/x-font-ttf' + if fontsStr.endswith('.otf'): + fontType = 'application/x-font-opentype' + elif fontsStr.endswith('.ttf'): + fontType = 'application/x-font-truetype' elif fontsStr.endswith('.woff'): fontType = 'application/font-woff' else: diff --git a/epicyon-blog.css b/epicyon-blog.css index 3329011a1..bbc69d001 100644 --- a/epicyon-blog.css +++ b/epicyon-blog.css @@ -42,6 +42,14 @@ --timeline-border-radius: 30px; } +@font-face { + font-family: 'Bedstead'; + font-style: normal; + font-weight: normal; + font-display: swap; + src: url('./fonts/bedstead.otf') format('opentype'); +} + body, html { background-color: var(--main-bg-color); color: var(--main-fg-color); diff --git a/epicyon-follow.css b/epicyon-follow.css index 80ea7424c..f8839d24b 100644 --- a/epicyon-follow.css +++ b/epicyon-follow.css @@ -21,6 +21,14 @@ --button-selected: #666; } +@font-face { + font-family: 'Bedstead'; + font-style: normal; + font-weight: normal; + font-display: swap; + src: url('./fonts/bedstead.otf') format('opentype'); +} + body, html { background-color: var(--main-bg-color); color: var(--main-fg-color); diff --git a/epicyon-login.css b/epicyon-login.css index b8f08b2de..a583810ee 100644 --- a/epicyon-login.css +++ b/epicyon-login.css @@ -19,6 +19,14 @@ --form-border-radius: 30px; } +@font-face { + font-family: 'Bedstead'; + font-style: normal; + font-weight: normal; + font-display: swap; + src: url('./fonts/bedstead.otf') format('opentype'); +} + body, html { background-color: var(--main-bg-color); color: var(--main-fg-color); diff --git a/epicyon-profile.css b/epicyon-profile.css index c8e0b2d1d..766414fe0 100644 --- a/epicyon-profile.css +++ b/epicyon-profile.css @@ -42,6 +42,14 @@ --timeline-border-radius: 30px; } +@font-face { + font-family: 'Bedstead'; + font-style: normal; + font-weight: normal; + font-display: swap; + src: url('./fonts/bedstead.otf') format('opentype'); +} + body, html { background-color: var(--main-bg-color); color: var(--main-fg-color); @@ -272,7 +280,7 @@ a:link { .gitpatch { width: 90%; - font-family: monospace; + font-family: 'monospace'; } .container p.administeredby { diff --git a/epicyon-suspended.css b/epicyon-suspended.css index e326d3499..882781e26 100644 --- a/epicyon-suspended.css +++ b/epicyon-suspended.css @@ -20,6 +20,14 @@ --button-selected: #666; } +@font-face { + font-family: 'Bedstead'; + font-style: normal; + font-weight: normal; + font-display: swap; + src: url('./fonts/bedstead.otf') format('opentype'); +} + body, html { background-color: var(--main-bg-color); color: var(--main-fg-color); diff --git a/theme.py b/theme.py index f35f89847..b77d1804c 100644 --- a/theme.py +++ b/theme.py @@ -151,7 +151,7 @@ def setThemeHacker(baseDir: str): "button-text": "green", "button-corner-radius": "4px", "timeline-border-radius": "4px", - "*font-family": "'monospace'", + "*font-family": "'Bedstead'", "background-color: #554;": "background-color: #062200;", "color: #FFFFFE;": "color: green;", "calendar-bg-color": "black",