bootstrap-cover

Bootstrap cover is adapted from Twitter Bootstrap's 'cover' example. It introduces the Mustache template renderer, provided by Clostache.

It also shows how to provide static resources from JQuery and Bootstrap by contributing routes to the router, rather than requiring code modifications.

The template also introduces the concept of co-dependencies. This is can be seen in the arguments to the Website record in website.clj, which include a reference to the router. The component uses this router to construct the URLs to other handlers. While these handlers are also defined within the Website component, routes can be constructed in this way to any known handler in the system, using its keyword and any required arguments. See bidi for more details.

Incantation

To create a project called foo based on this template, type this in a command line shell :-

lein new modular foo bootstrap-cover

Modules

component

co-dependency

http-listener

modular-bidi-router

logback-logging

clostache-templater

public-resources

bootstrap-cover-website

twitter-bootstrap

bootstrap-cover-resources

jquery

Components

modular.bidi/router

modular.bidi/web-resources

modular.clostache/templater

modular.http-kit/webserver

Additional libraries

[hiccup "1.0.5"]

[com.stuartsierra/component "0.2.2"]

[juxt.modular/co-dependency "0.2.0"]

[org.clojure/tools.logging "0.2.6"]

[org.slf4j/jcl-over-slf4j "1.7.2"]

[org.slf4j/jul-to-slf4j "1.7.2"]

[org.slf4j/log4j-over-slf4j "1.7.2"]

[org.webjars/bootstrap "3.3.0"]

[org.webjars/jquery "2.1.0"]

[ch.qos.logback/logback-classic "1.0.7"]

Custom files

resources/logback.xml

resources/public/cover.css

resources/templates/page.html.mustache

src/foo/website.clj


Modularity
Copyright © 2015, LTD.