Introduction
Base
js/base
folder contains core scripts for the template that makes theming, navigation, settings and page specific javascript work. They are required to be included in every page after vendor scripts and before page content scripts.
Files
<script src="js/base/helpers.js"></script> <script src="js/base/globals.js"></script> <script src="js/base/nav.js"></script> <script src="js/base/search.js"></script> <script src="js/base/settings.js"></script>
Reference
Nav.js
Creates the template navigation from a list. Also makes logo, icon buttons and user menu work. Receives an options object and a dom element.
Search.js
Static website generic search. Customized version of AutoComplete plugin to work within the Bootstrap modal. Works with an external json file.
Globals.js
Contains variables that makes css variables usable in javascript. Also has layout/theme change events that are available througout the template.
Settings.js
Modifies and applies theme settings. Needs to be exist in the page even the page doesn't have settings modal.
Helpers.js
Contains couple of helper methods that help for loading json data and formatting text.
Loader.js
Adds a very simple spinner class to the body and hides the content if the DOMContentLoaded is not fired for 500 ms.