Customization
SASS
The recommended way to make edits and additions to the theme CSS is to
use the provided user-variables.scss
and user.scss
files
located in the sass/custom
folder.
This is the preferred method as your changes are kept separate from the core theme files. By separating your CSS edits into their own files, you can easily overwrite all of the default theme SCSS files when you update the theme.
user-variables.scssThis is for you to add your own custom SCSS variables to override the default values with the new ones.
Let’s say you need to change the primary color with the one you use for your brand.
All you have to do is to:
- open the
sass/_variables.scss
, look for the$primary
variable and copy it - open the
sass/custom/_user-variables.scss
and paste the variable with its value - replace the value and remove the
!default
flag
If you need to add CSS for additional components or other needs, add any SCSS or CSS you require here.
3rd Party Plugin via NPM
To install vendor plugins for use in your project, follow these simple steps:
- Run npm install <package name> --save-dev at the root directory
of your project. This command will download the package to
node_modules
folder and write it to your package.json file - Run gulp to move all the dependencies that are listed in package.json
file to
dist/vendor
including your newly downloaded plugins. - Lastly, link to the plugin's scripts and styles in your
partial/scripts.html
andpartial/headers.html
respectively. Refer to the plugin folder indist/vendor
for its correct path.
Typography
Add or change typography with the following instructions:
- Import your font stylesheet into the
_user-variables.scss
. Like:@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700;900&display=swap");
- Edit the
$font-family-base
value to change the current font family variable with yours. You may also change the$headings-font-family
as per your need.$font-family-base: 'Inter', sans-serif;
Logo
Should you need to display your brand logo within the navigation menu,
go to /partials/nav.html
and add the logo inside .navbar-brand
like
this:
HTML Partials
The gulp-html-partial
package is used to make global changes
in HTML files easier. Partials are basically just html files that are designed
to be used from within other pages.
The following partials are available:
header.html
withtitle
variable for page title.nav.html
withaddClass
variable for nav style.footer.html
with optionaladdClass
variable for footer background color.scripts.html
that contains all the required javascript.
You can easily create new .html
partials inside the /partials
folder
and point to them from any file by specifying the path to the partial file
like this:
-
<partial src="header.html" title="This is my website"></partial>
-
<partial src="nav.html" addClass="bg-transparent fixed-top"></partial>
- Please read the official gulp-html-partial documentation for more info.