the repository which powers this website
force my font choices on everyone
bendn 6 weeks ago
parent 158c043 · commit 1c4f057
-rwxr-xr-xfilters/syntax-highlighting.py9
-rw-r--r--themed/base.html1
-rw-r--r--themed/themed.in.css8
-rw-r--r--themed/tree.html2
4 files changed, 10 insertions, 10 deletions
diff --git a/filters/syntax-highlighting.py b/filters/syntax-highlighting.py
index a5fa367b..bf4164eb 100755
--- a/filters/syntax-highlighting.py
+++ b/filters/syntax-highlighting.py
@@ -95,7 +95,7 @@ class AyuMirageStyle(Style):
Comment.Single: "italic",
Comment.Preproc: Colors.syntax_keyword,
Comment.PreprocFile: Colors.syntax_string,
- Keyword: Colors.syntax_keyword,
+ Keyword: f"italic bold {Colors.syntax_keyword}",
Keyword.Type: Colors.syntax_entity,
Keyword.Constant: Colors.syntax_constant,
Keyword.Declaration: Colors.accent,
@@ -105,7 +105,7 @@ class AyuMirageStyle(Style):
Name.Class: Colors.syntax_tag,
Name.Constant: Colors.syntax_constant,
Name.Decorator: Colors.syntax_special,
- Name.Function: Colors.syntax_func,
+ Name.Function: f"italic {Colors.syntax_func}",
Name.Tag: Colors.syntax_tag,
Name.Variable.Instance: Colors.accent,
Name.Variable.Magic: f"italic {Colors.syntax_tag}",
@@ -149,15 +149,12 @@ except TypeError:
# highlight! :-)
# printout pygments' css definitions as well
sys.stdout.write('<style>')
-sys.stdout.write(formatter.get_style_defs('.highlight'))
+sys.stdout.write(formatter.get_style_defs('.highlight').replace("font-style: italic", 'font-family: "Cascadia Code NF Italic", "Cascadia Code", italic;').replace("125%", "102%"))
sys.stdout.write(
"""
.linenumbers {
color: #474c57
}
-.linenumbers:hover {
- color: #727982;
-}
.lines {
color: "#CCCAC2";
}
diff --git a/themed/base.html b/themed/base.html
index ff8d3473..47cf1239 100644
--- a/themed/base.html
+++ b/themed/base.html
@@ -11,7 +11,6 @@
{% else %}
{! cgit_shared_emit_css_link(NULL, "/themed.css"); !}
{% endif %}
-
<meta property="og:site_name" content="git.bendn.org: github but worser, and prettier">
<meta content="{{ title|attr }}" property="og:title" />
<meta content="{{ description|attr }}" property="og:description" />
diff --git a/themed/themed.in.css b/themed/themed.in.css
index d274ef08..94e0a5e4 100644
--- a/themed/themed.in.css
+++ b/themed/themed.in.css
@@ -1,8 +1,12 @@
@import "tailwindcss";
+@font-face { font-family: "Cascadia Code NF"; src: local('Cascadia Code NF'), url('/icons/CascadiaCodeNF.ttf') format('truetype'); }
+@font-face { font-family: "Cascadia Code NF Italic"; src: local('Cascadia Code NF Italic'), url('/icons/CascadiaCodeNFItalic.ttf') format('truetype'); }
@theme {
- --font-sans: "Cascadia Code", ui-monospace;
- --font-mono: "Cascadia Code", ui-monospace;
+ --font-sans: "Cascadia Code NF", "Cascadia Code", ui-monospace;
+ --font-mono: "Cascadia Code NF", "Cascadia Code", ui-monospace;
+ --default-font-feature-settings: "ss19", "ss01", "ss20", "calt", "salt";
+ --default-mono-font-feature-settings: var(--default-font-feature-settings);
}
:root {
diff --git a/themed/tree.html b/themed/tree.html
index 702841ca..8b00a96f 100644
--- a/themed/tree.html
+++ b/themed/tree.html
@@ -49,7 +49,7 @@
blob size ({{ size / 1024|%ld }}KB) exceeds display size limit ({{ ctx.cfg.max_blob_size|%d }}KB).
</div>
{% else %}
- <div class="rendered-blob overflow-x-auto">
+ <div class="rendered-blob overflow-x-auto border border-[#333A45] rounded-md">
{!
if (is_binary) {
cgit_tree_print_binary_buffer(buf, size);