express-sweet-generator 2.0.11 → 2.0.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-sweet-generator",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "EXPRESS SWEET application generator.",
5
5
  "main": "bin/express-sweet-cli.js",
6
6
  "files": [
@@ -44,5 +44,9 @@ module.exports = {
44
44
  * res.locals.extra = 'Extra';
45
45
  * }
46
46
  */
47
- beforeRender: (req, res) => {}
47
+ beforeRender: (req, res) => {
48
+ // Set the initial sidebar state from the cookie, defaulting to 'off'.
49
+ res.locals.sidebar_minimize_state = req.cookies.sidebar_minimize_state || 'off';
50
+ // console.log('Sidebar minimize state from cookie:', req.cookies.sidebar_minimize_state);
51
+ }
48
52
  }
@@ -33,6 +33,9 @@
33
33
  data-kt-app-sidebar-push-toolbar="true"
34
34
  data-kt-app-sidebar-push-footer="true"
35
35
  data-kt-app-toolbar-enabled="true"
36
+ {{#if (eq sidebar_minimize_state "on")}}
37
+ data-kt-app-sidebar-minimize="on"
38
+ {{/if}}
36
39
  class="app-default"
37
40
  {{else}}
38
41
  class="app-blank"
@@ -283,7 +286,13 @@
283
286
  4. Add "active" class to to sidebar toggle element with "kt_app_sidebar_toggle" id.
284
287
  }
285
288
  -->
286
- <div id="kt_app_sidebar_toggle" class="app-sidebar-toggle btn btn-icon btn-shadow btn-sm btn-color-muted btn-active-color-primary body-bg h-30px w-30px position-absolute top-50 start-100 translate-middle rotate" data-kt-toggle="true" data-kt-toggle-state="active" data-kt-toggle-target="body" data-kt-toggle-name="app-sidebar-minimize">
289
+ <div
290
+ id="kt_app_sidebar_toggle"
291
+ class="app-sidebar-toggle btn btn-icon btn-shadow btn-sm btn-color-muted btn-active-color-primary body-bg h-30px w-30px position-absolute top-50 start-100 translate-middle rotate {{#if (eq sidebar_minimize_state "on")}}active{{/if}}"
292
+ data-kt-toggle="true"
293
+ data-kt-toggle-state="active"
294
+ data-kt-toggle-target="body"
295
+ data-kt-toggle-name="app-sidebar-minimize">
287
296
  <i class="ki-duotone ki-double-left fs-2 rotate-180">
288
297
  <span class="path1"></span>
289
298
  <span class="path2"></span>
@@ -44,5 +44,9 @@ export default {
44
44
  * res.locals.extra = 'Extra';
45
45
  * }
46
46
  */
47
- beforeRender: (req, res) => {}
47
+ beforeRender: (req, res) => {
48
+ // Set the initial sidebar state from the cookie, defaulting to 'off'.
49
+ res.locals.sidebar_minimize_state = req.cookies.sidebar_minimize_state || 'off';
50
+ // console.log('Sidebar minimize state from cookie:', req.cookies.sidebar_minimize_state);
51
+ }
48
52
  }
@@ -33,6 +33,9 @@
33
33
  data-kt-app-sidebar-push-toolbar="true"
34
34
  data-kt-app-sidebar-push-footer="true"
35
35
  data-kt-app-toolbar-enabled="true"
36
+ {{#if (eq sidebar_minimize_state "on")}}
37
+ data-kt-app-sidebar-minimize="on"
38
+ {{/if}}
36
39
  class="app-default"
37
40
  {{else}}
38
41
  class="app-blank"
@@ -283,7 +286,13 @@
283
286
  4. Add "active" class to to sidebar toggle element with "kt_app_sidebar_toggle" id.
284
287
  }
285
288
  -->
286
- <div id="kt_app_sidebar_toggle" class="app-sidebar-toggle btn btn-icon btn-shadow btn-sm btn-color-muted btn-active-color-primary body-bg h-30px w-30px position-absolute top-50 start-100 translate-middle rotate" data-kt-toggle="true" data-kt-toggle-state="active" data-kt-toggle-target="body" data-kt-toggle-name="app-sidebar-minimize">
289
+ <div
290
+ id="kt_app_sidebar_toggle"
291
+ class="app-sidebar-toggle btn btn-icon btn-shadow btn-sm btn-color-muted btn-active-color-primary body-bg h-30px w-30px position-absolute top-50 start-100 translate-middle rotate {{#if (eq sidebar_minimize_state "on")}}active{{/if}}"
292
+ data-kt-toggle="true"
293
+ data-kt-toggle-state="active"
294
+ data-kt-toggle-target="body"
295
+ data-kt-toggle-name="app-sidebar-minimize">
287
296
  <i class="ki-duotone ki-double-left fs-2 rotate-180">
288
297
  <span class="path1"></span>
289
298
  <span class="path2"></span>