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 00155a20..4d5516bf 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 3329011a..bbc69d00 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 80ea7424..f8839d24 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 b8f08b2d..a583810e 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 c8e0b2d1..766414fe 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 e326d349..882781e2 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 f35f8984..b77d1804 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",