diff --git a/utils/html/doc.py b/utils/html/doc.py
index d1ed888..e9fcc9e 100644
--- a/utils/html/doc.py
+++ b/utils/html/doc.py
@@ -7,7 +7,7 @@
class Viewport(Options):
default_values = {
"width": "device-width",
- "initial_scale": 1.0,
+ "initial-scale": 1.0,
}
template = "%s=%s"
@@ -48,7 +48,7 @@ def meta(self):
l = self.libs
- if len(l) == 0:
+ if l is None or len(l) == 0:
l = ""
else:
l = t.div(id="libraries")
diff --git a/utils/html/jslibs.py b/utils/html/jslibs.py
index 33b8738..a732795 100644
--- a/utils/html/jslibs.py
+++ b/utils/html/jslibs.py
@@ -11,7 +11,7 @@ class JSLib(Library):
)
def __init__(self, path, *args, **kwargs):
- self._async = bool(kwargs.get("async", True))
+ self._async = bool(kwargs.get("_async_", True))
Library.__init__(self, path, *args, **kwargs)
@@ -34,6 +34,19 @@ def add(self, **kwargs):
path="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js",
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6",
crossorigin="anonymous",
+ _async_=False,
+ ),
+ bs_jquery=JSLib(
+ path="https://code.jquery.com/jquery-3.4.1.slim.min.js",
+ integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n",
+ crossorigin="anonymous",
+ _async_=False,
+ ),
+ bs_popper = JSLib(
+ path="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js",
+ integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo",
+ crossorigin="anonymous",
+ _async_=False,
),
)
diff --git a/utils/html/tag.py b/utils/html/tag.py
index ee21a58..cdcea71 100644
--- a/utils/html/tag.py
+++ b/utils/html/tag.py
@@ -159,7 +159,7 @@ def doi(number, **kwargs):
def collapsable(name, id, **kwargs):
b = t.button(name, **{
"data-toggle":"collapse",
- "data_target":id
+ "data-target":"#%s" % id,
})
d = t.div(id=id, klass="collapse")