The template files are developed and maintained by the Web Developer Network (WDN) at the University of Nebraska-Lincoln. These templates are made up of HTML, CSS and JavaScript to power the underlying web presence.
Template usage is subject to the WDN Terms of Use.
All templates variations utilize the same HTML markup, with an exception of the body class, ex: class="document"
.
All members of the WDN are invited to contribute to this project. Please make a fork of the main repository for local development. Once you have created and tested your code, please send a pull request to the main repository.
Much of the template CSS and JavaScript is built using aggregators, preprocessors, and/or "minifiers". You can build a local copy of these resources with the following instructions as your guide.
The resources are built using a Gruntfile. The following tools are required to be installed.
npm install -g grunt-cli
) in order to build.Installing the additional resources necessary to build the system can be downloaded by running npm install
from the project root.
Once all of the above dependencies are met, simply running Grunt grunt
at the project root will build all resources. The following are all of the supported targets.
default
or all
- builds all needed CSS and JavaScriptclean
- removes all built filesjs-main
- builds and minifies combined JavaScriptcss-main
- builds all CSS files from their SCSS partials and passed through postcssdist
- builds the ZIP's used for template distribution. Also does smudging of keywords such as $DEP_VERSION$ in dwt and include filesThe JavaScript build process can be further customized by passing parameters. The following are the flags that are supported.
EXAMPLE: Build for use in a special CDN or server location
grunt --rjs-flags="wdnTemplatePath=//www.unl.edu/"
EXAMPLE: Customize the UNLchat url. Could be useful for integrating a custom instance of UNLchat or for development
grunt --rjs-flags="unlChatURl=//ucommchat-test.unl.edu/assests/js"
EXAMPLE: Build for use in debug mode for analytics
grunt --rjs-flags="debug_mode=true"
EXAMPLE: Customize the Analytics Measurement ID
grunt --rjs-flags="wdnProp=G-9DM5F2WV3Y"
EXAMPLE: Two or more parameters are separated with a space
grunt --rjs-flags="wdnTemplatePath=//www.unl.edu/ unlChatURl=//ucommchat-test.unl.edu/assests/js"
PLEASE NOTE: The build process has been optimized for a Linux or OS X environment. While it is technically possible to build on Windows, the specifics of setting up your environment correctly are beyond the scope of this project.
Support of the UNL Templates is coordinated and communicated through the WDN.
__templates_5.3/js-src/
__
templates_5.3/js
folder (through the Grunt sync:js task) before require.js works on them*.babel.js
files will be transpiled and outputted to /js/*.js
templates_5.3/js-src/plugins/
templates_5.3/js-src/utility-scripts/
__templates_5.3/js/
__
js-main
is rantemplates_5.3/js/compressed/
__templates_5.3/scss/*
__
tmp.scss
files can be used to import styles into other projects. The most likely use case will be to use pre.tmp.scss
to import framework variables, mixins and functions.scripts/
.gitattributes
filter-clean
and filter-smudge
Grunt tasks.filterFiles
variable inside of Gruntfile.js.git_filters/lib/git-filters.js
filter-clean
and filter-smudge
Grunt tasks.The script to remove inline critical styles once the core stylesheets have been loaded can be found in
js-src/utility-scripts/clearCriticalCSS.js
. If changes needs to be made to the script, grab the minified and
transpiled version from js/compressed/utility-scripts
and replace the one inside of head-2.html
include file.