summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2024-02-19 02:09:27 +0300
committerEvgeny Zinoviev <me@ch1p.io>2024-02-19 02:09:29 +0300
commit838b01c548939158f99529a714fe105249d70675 (patch)
treee4295c9711481d917a897514e1ac153dac18e9bb /bin
parent3741f7cf78a288e967415ccb6736c888a21c211b (diff)
web_kbn: update bootstrap to 5.3, add auto-dark-mode support
Diffstat (limited to 'bin')
-rw-r--r--bin/web_kbn.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/web_kbn.py b/bin/web_kbn.py
index a0f12a6..18b50ad 100644
--- a/bin/web_kbn.py
+++ b/bin/web_kbn.py
@@ -40,17 +40,18 @@ class WebKbnConfig(AppConfigUnit):
common_static_files = [
'bootstrap.min.css',
- 'bootstrap.min.js',
+ 'bootstrap.bundle.min.js',
'polyfills.js',
'app.js',
'app.css'
]
+static_version = 3
routes = web.RouteTableDef()
webkbn_strings = Translation('web_kbn')
logger = logging.getLogger(__name__)
-def get_js_link(file, version) -> str:
+def get_js_link(file, version=static_version) -> str:
if is_development_mode():
version = int(time.time())
if version:
@@ -58,7 +59,7 @@ def get_js_link(file, version) -> str:
return f'<script src="{config.app_config["assets_public_path"]}/{file}" type="text/javascript"></script>'
-def get_css_link(file, version) -> str:
+def get_css_link(file, version=static_version) -> str:
if is_development_mode():
version = int(time.time())
if version:
@@ -71,7 +72,6 @@ def get_head_static(files=None) -> str:
if files is None:
files = []
for file in common_static_files + files:
- v = 2
try:
q_ind = file.index('?')
v = file[q_ind+1:]
@@ -80,9 +80,9 @@ def get_head_static(files=None) -> str:
pass
if file.endswith('.js'):
- buf.write(get_js_link(file, v))
+ buf.write(get_js_link(file))
else:
- buf.write(get_css_link(file, v))
+ buf.write(get_css_link(file))
return buf.getvalue()