This guide will help you get started with Dashkit! All the important stuff – compiling the source, file structure, build tools, file includes – is documented here, but should you have any questions, always feel free to reach out to email@example.com.
New & Extended Components
Dashkit extends Bootstrap by not only building on top of its existing components, but also introducing entirely new components and plugins. The best way to get an overview of this is to run through the
To get started, you need to do the following:
- Make sure you have Node installed since Dashkit uses npm to manage dependencies. If you don't, installing is quite easy, just visit the Node Downloads page and install it.
- Unzip your theme and open your command line, making sure your command line prompt is at the root of the unzipped theme directory.
npm install gulp-cli -g: If you don't have the Gulp command line interface, you need to install it.
npm install: Open your command line to the root directory of your unzipped theme and run to install all of Dashkit's dependencies.
It's that simple! If you're not used to using terminal, don't worry, this is as advanced as it gets. If you want to kill the server and stop Gulp, just hit
Control + C.
Gulp is used to manage Dashkit development. Open your command line to the root directory of the theme to use the following commands:
gulp: Compile and watch the SCSS/JS/HTML, use Live Reload to update browsers instantly, start a server, and pop a tab in your default browser. Any changes made to the source files will be compiled as soon as you save the file.
gulp build: Generates a
/distdirectory with all the production files.
- 📁 dist - Generated production files
📁 node_modules - Directory where
- 📁 css - Compiled CSS
- 📁 fonts - Cerebri font and Feather Icon font
- 📁 img - Image assets
- 📁 libs - Third party plugins
- 📁 scss - SCSS source for theme
- 📁 partials - HTML partials
- 📁 assets
- 📄 gulpfile.js - All the build commands
- 📄 package.json - List of dependencies and npm information
- 📄 .gitignore - Hide all unnecessary files from Git
Gulp File Includes
The gulp-file-include package is used to make partials easier to use for initial development. For Dashkit, we only use it for a handful of components that are found on most pages. The following partials are available:
@@title (string)- Parameter for the page title
@@category (string)- Parameter for which category of the sidebar should be open.
@@subcategory (string)- Parameter for which subcategory of the sidebar should be open.
@@page (string)- Parameter for which page of the sidebar should be given an active state.
@@user (boolean)- Parameter to determine if the footer containing search, the user, and notifications should be rendered.
@@page (string)- Parameter for which page of the topnav should be given an active state.
Easily create new
.html partials inside the
/partials folder and point to them from any file by specifying the path to the partial file and using the
Please read the official package documentation for more info.
There are 2 basic ways to customize your theme...
Customizing SCSS. This is more versatile and sustainable way to customize Dashkit, but requires the
gulpcompilation steps outlined above. The 2 major benefits of this strategy are using variable overrides to easily customize theme styles, plus you never have to touch Bootstrap or Dashkit's source, meaning future updates will be much, much, simpler. There are 2 provided files that make this strategy simple to implement:
user-variables.scss: This file can be used override Bootstrap core and Dashkit variables for customizing elements that have been tied to variables.
user.scss: This file can be used for writing custom SCSS that will be compiled alongside Bootstrap and Dashkit's core files.
Compiled CSS. If you plan on using Dashkit "as is", or only need limited customization, feel free to simply attach the compiled
theme.min.cssfile in the
You can easily customize the layout and color scheme of your theme by modifying the content of the
config.js file located in the root folder. The config is only used by Gulp to decide what to include during compilation. The config object properties accept the following values:
||Boolean||true | false||Whether you want to enable users toggle layout options. This will also enable the config modal and its toggler button.|
||String||"light" | "dark"||
The default color scheme. Works with
||String||"sidenav" | "topnav" | "combo"||
The default navigation positioning. Works with
||String||"default" | "vibrant"||
The default sidebar styling. Works with
Heads up! Modifying
config.js requires you to restart any of the currently active Gulp tasks.