@saltcorn/sbadmin2 0.9.5-beta.8 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +18 -2
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -37,7 +37,24 @@ const { isNode } = require("@saltcorn/data/utils");
|
|
|
37
37
|
* @returns {function}
|
|
38
38
|
*/
|
|
39
39
|
const subItem = (currentUrl) => (item) =>
|
|
40
|
-
item.
|
|
40
|
+
item.subitems
|
|
41
|
+
? div(
|
|
42
|
+
{ class: "dropdown-item btn-group dropend" },
|
|
43
|
+
a(
|
|
44
|
+
{
|
|
45
|
+
type: "button",
|
|
46
|
+
class: "dropdown-item dropdown-toggle p-0",
|
|
47
|
+
"data-bs-toggle": "dropdown",
|
|
48
|
+
"aria-expanded": "false",
|
|
49
|
+
},
|
|
50
|
+
item.label
|
|
51
|
+
),
|
|
52
|
+
ul(
|
|
53
|
+
{ class: "dropdown-menu" },
|
|
54
|
+
item.subitems.map((si1) => li(subItem(currentUrl)(si1)))
|
|
55
|
+
)
|
|
56
|
+
)
|
|
57
|
+
: item.link
|
|
41
58
|
? a(
|
|
42
59
|
{
|
|
43
60
|
class: [
|
|
@@ -354,7 +371,6 @@ const wrapIt = (headers, title, bodyAttr, rest) =>
|
|
|
354
371
|
`<!doctype html>
|
|
355
372
|
<html lang="en">
|
|
356
373
|
<head>
|
|
357
|
-
${!isNode() ? `<base href="http://localhost">` : ""}
|
|
358
374
|
<!-- Required meta tags -->
|
|
359
375
|
<meta charset="utf-8">
|
|
360
376
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saltcorn/sbadmin2",
|
|
3
|
-
"version": "0.9.5
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "SB Admin 2 layout plugin",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"clean": "echo \"Error: no TypeScript support yet\""
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@saltcorn/data": "0.9.5
|
|
13
|
-
"@saltcorn/markup": "0.9.5
|
|
12
|
+
"@saltcorn/data": "0.9.5",
|
|
13
|
+
"@saltcorn/markup": "0.9.5",
|
|
14
14
|
"startbootstrap-sb-admin-2-bs5": "^4.1.5-beta.8",
|
|
15
15
|
"nunito-fontface": "0.7.3"
|
|
16
16
|
},
|