This is a template for an exhibit-specific Neatline theme, extracted from the Project Gemini over Baja California project. The theme uses:
- npm and Bower for package management;
- Grunt for compiling, concatenating, and compressing files;
- Stylus for styling, which can be swapped for CSS.
To get started, fork the repo and clone it into your Omeka theme at:
[omeka-theme]/neatline/exhibits/themes/[exhibit-slug]
Where exhibit-slug
is the "URL Slug" of the exhibit you're theming. Then, you'll need to install Node.js and a handful of global packages. If you're on Mac:
- Install homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
`brew install node`
- Install Bower:
`npm install -g bower`
- Install the Grunt CLI tool:
`npm install -g grunt-cli`
- Install NPM packages:
`npm install`
- Install Bower packages:
`bower install`
Once the packages are installed, kick things off by running the watch
task:
grunt watch
Now, when you save any of the *.js
or *.styl
files under the assets/
directory, Grunt will automatically compile the two payload files that are loaded by Neatline: style.css
and script.js
.
When you're ready to deploy the theme to production, run:
grunt compile:min
Which compresses the CSS and Javascript payloads. Happy theming!