@saltcorn/sbadmin2 0.6.2-beta.2 → 0.6.2-beta.3
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 +29 -0
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -19,6 +19,8 @@ const {
|
|
|
19
19
|
img,
|
|
20
20
|
footer,
|
|
21
21
|
button,
|
|
22
|
+
form,
|
|
23
|
+
input,
|
|
22
24
|
} = require("@saltcorn/markup/tags");
|
|
23
25
|
const renderLayout = require("@saltcorn/markup/layout");
|
|
24
26
|
const { renderForm, link } = require("@saltcorn/markup");
|
|
@@ -117,6 +119,33 @@ const sideBarItem = (currentUrl) => (item) => {
|
|
|
117
119
|
item.icon ? i({ class: `fa-fw ${item.icon}` }) : "",
|
|
118
120
|
span(text(item.label))
|
|
119
121
|
)
|
|
122
|
+
: item.type === "Search"
|
|
123
|
+
? form(
|
|
124
|
+
{ action: "/search", class: "menusearch ml-2 mr-3", method: "get" },
|
|
125
|
+
div(
|
|
126
|
+
{ class: "input-group search-bar" },
|
|
127
|
+
|
|
128
|
+
input({
|
|
129
|
+
type: "search",
|
|
130
|
+
class: "form-control search-bar pl-2p5",
|
|
131
|
+
placeholder: item.label,
|
|
132
|
+
id: "inputq",
|
|
133
|
+
name: "q",
|
|
134
|
+
"aria-label": "Search",
|
|
135
|
+
"aria-describedby": "button-search-submit",
|
|
136
|
+
}),
|
|
137
|
+
div(
|
|
138
|
+
{ class: "input-group-append" },
|
|
139
|
+
button(
|
|
140
|
+
{
|
|
141
|
+
class: "btn btn-outline-secondary search-bar",
|
|
142
|
+
type: "submit",
|
|
143
|
+
},
|
|
144
|
+
i({ class: "fas fa-search" })
|
|
145
|
+
)
|
|
146
|
+
)
|
|
147
|
+
)
|
|
148
|
+
)
|
|
120
149
|
: span({ class: "nav-link" }, text(item.label))
|
|
121
150
|
);
|
|
122
151
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saltcorn/sbadmin2",
|
|
3
|
-
"version": "0.6.2-beta.
|
|
3
|
+
"version": "0.6.2-beta.3",
|
|
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.6.2-beta.
|
|
13
|
-
"@saltcorn/markup": "0.6.2-beta.
|
|
12
|
+
"@saltcorn/data": "0.6.2-beta.3",
|
|
13
|
+
"@saltcorn/markup": "0.6.2-beta.3",
|
|
14
14
|
"startbootstrap-sb-admin-2": "^4.1.4"
|
|
15
15
|
},
|
|
16
16
|
"author": "Tom Nielsen",
|