From 0d56e19d6adaaf6a996571fd87bc8990597d876f Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Tue, 14 Apr 2020 22:04:05 -0600 Subject: [PATCH] Default to monokai in dark theme and fixed defaulting mechanism in the JS --- templates/base.html | 2 +- templates/partial/flex.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/base.html b/templates/base.html index a6721fc..37c4c5b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -38,7 +38,7 @@ + href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/pygments/{{ PYGMENTS_STYLE_DARK|default('monokai') }}.min.css"> diff --git a/templates/partial/flex.html b/templates/partial/flex.html index 9514d99..80909e0 100644 --- a/templates/partial/flex.html +++ b/templates/partial/flex.html @@ -25,8 +25,8 @@ // Find the pygments CSS files (there are two, one for each theme) and // change them both to the theme specified by the user. const pygmentsTheme = theme === 'light' - ? '{{ PYGMENTS_STYLE }}' - : '{{ PYGMENTS_STYLE_DARK or PYGMENTS_STYLE }}' + ? '{{ PYGMENTS_STYLE|default('github') }}' + : '{{ PYGMENTS_STYLE_DARK|default('monokai') }}' Array.from(document.head.getElementsByTagName('link')).forEach(linkEl => { if (linkEl.href.match(/\/theme\/pygments\/.*\.min\.css/)) { linkEl.href = `/theme/pygments/${pygmentsTheme}.min.css`;