From 838b01c548939158f99529a714fe105249d70675 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Mon, 19 Feb 2024 02:09:27 +0300 Subject: web_kbn: update bootstrap to 5.3, add auto-dark-mode support --- bin/web_kbn.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bin') 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'' -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() -- cgit v1.2.3