Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

Vue demo1 minimize sidebar


Hi,

I want to minimize the sidebar by default, I've tried many things and it didn't work. How should I update my config?


import type LayoutConfigTypes from "@/layouts/default-layout/config/types";

const config: LayoutConfigTypes = {
general: {
mode: "system",
primaryColor: "#50CD89",
pageWidth: "default",
layout: "light-sidebar",
iconsType: "outline",
},
header: {
display: true,
default: {
container: "fluid",
fixed: { desktop: false, mobile: false },
menu: { display: true, iconType: "keenthemes" },
},
},
sidebar: {
display: true,
default: {
minimize: {
desktop: { enabled: true, default: false, hoverable: true },
},
menu: { iconType: "keenthemes" },
},
},
toolbar: {
display: true,
container: "fluid",
fixed: { desktop: false, mobile: false },
},
pageTitle: { display: true, breadcrumb: true, direction: "column" },
content: { container: "fluid" },
footer: {
display: true,
container: "fluid",
fixed: { desktop: false, mobile: false },
},
illustrations: { set: "sketchy-1" },
scrolltop: { display: true },
};

export default config;


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


thnx, this worked



Hi,

Thank you for reaching out to us.

To make sidebar minimized by default follow the steps below:
1) Navigate demo1/src/core/services/LayoutService.ts and in function initSidebar add the following code, which will add attribute data-kt-app-sidebar-minimize="on" on body tag to hide sidebar.

this.bodyStore.addBodyAttribute({
qualifiedName: "data-kt-app-sidebar-minimize",
value: "on",
});

2) In file demo1/src/layouts/default-layout/components/sidebar/SidebarLogo.vue add active class on the sidebar toggle button.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(