Glyphicons
Code
<h3>${templates.icon.bootstrap "picture"} ${templates.icon.bootstrap "tag"}</h3>
Font Awesome icons
Code
<h3>${templates.icon.font-awesome "linux"} ${templates.icon.font-awesome "code"}</h3>
Breadcrumbs
Code
templates.bootstrap.breadcrumbs {
breadcrumbs = [ { title = "Home"; path = "/index.html"; } { title = "Library"; path = "/library/index.html"; } ];
title = "Data";
}
Pager
Code
templates.bootstrap.pager {
pages = genList (x: { path = "/#${toString (x + 1)}"; }) 10;
index = 5;
}
Pagination
Code
templates.bootstrap.pagination {
pages = genList (x: { path = "/#${toString (x + 1)}"; }) 10;
index = 5;
}
Code
templates.bootstrap.pagination {
pages = genList (x: { path = "/#${toString (x + 1)}"; }) 100;
index = 50;
pagesLimit = 11;
}
Labels
default primary success info warning danger
Code
mapTemplate (t:
templates.bootstrap.label { content = t; type = t; }
) [ "default" "primary" "success" "info" "warning" "danger" ]
Badges
Code
<p>
<a href="#">Inbox ${templates.bootstrap.badge 42}</a>
</p>
<ul class="nav nav-pills" role="tablist">
<li role="presentation" class="active"><a href="#">Home ${templates.bootstrap.badge 42}</a></li>
<li role="presentation"><a href="#">Profile</a></li>
<li role="presentation"><a href="#">Messages ${templates.bootstrap.badge 3}</a></li>
</ul>
Navbars
Code
templates.bootstrap.navbar.default {
inverted = true;
id = "example1";
brand = ''<a class="navbar-brand" href="#">Project Name</a>'';
content = [
(templates.bootstrap.navbar.nav {
items = [
{ title = "Home"; path = "/#"; }
{ title = "About"; path = "/#about"; }
{ title = "Contact"; path = "/#contact"; }
];
# Hack for demonstration purposes, the current page attribute set should be passed
currentPage = { title = "Home"; path = "/#"; };
})
];
}
+
templates.bootstrap.navbar.default {
brand = ''<a class="navbar-brand" href="#">Project Name</a>'';
id = "example2";
content = [
(templates.bootstrap.navbar.nav {
items = [
{ title = "Home"; path = "/#"; }
{ title = "About"; path = "/#about"; }
{ title = "Contact"; path = "/#contact"; }
];
# Hack for demonstration purposes, the current page attribute set should be passed
currentPage = { title = "Home"; path = "/#"; };
})
];
}
Alerts
Well done! You successfully read this important alert message.
Heads up! This alert needs your attention, but it's not super important.
Heads up! This alert needs your attention, but it's not super important.
Oh snap! Change a few things up and try submitting again.
Code
${templates.bootstrap.alert { type = "success"; content = "<strong>Well done!</strong> You successfully read this important alert message."; } }
${templates.bootstrap.alert { type = "info"; content = "<strong>Heads up!</strong> This alert needs your attention, but it's not super important."; } }
${templates.bootstrap.alert { type = "warning"; content = "<strong>Heads up!</strong> This alert needs your attention, but it's not super important."; } }
${templates.bootstrap.alert { type = "danger"; content = "<strong>Oh snap!</strong> Change a few things up and try submitting again."; } }
Progress bars
Code
${templates.bootstrap.progress-bar { value = 60; }}
${templates.bootstrap.progress-bar { value = 40; type = "success"; }}
${templates.bootstrap.progress-bar { value = 20; type = "info"; }}
${templates.bootstrap.progress-bar { value = 60; type = "warning"; }}
${templates.bootstrap.progress-bar { value = 80; type = "danger"; }}
${templates.bootstrap.progress-bar { value = 60; type = "stripped"; }}
Panels
Panel title
Panel content
Panel title
Panel content
Panel title
Panel content
Panel title
Panel content
Panel title
Panel content
Panel title
Panel content
Code
<div class="col-sm-4">
${templates.bootstrap.panel {
heading = ''<h3 class="panel-title">Panel title</h3>'';
body = "Panel content"; }}
${templates.bootstrap.panel {
type = "primary";
heading = ''<h3 class="panel-title">Panel title</h3>'';
body = "Panel content"; }}
</div><!-- /.col-sm-4 -->
<div class="col-sm-4">
${templates.bootstrap.panel {
type = "success";
heading = ''<h3 class="panel-title">Panel title</h3>'';
body = "Panel content"; }}
${templates.bootstrap.panel {
type = "info";
heading = ''<h3 class="panel-title">Panel title</h3>'';
body = "Panel content"; }}
</div><!-- /.col-sm-4 -->
<div class="col-sm-4">
${templates.bootstrap.panel {
type = "warning";
heading = ''<h3 class="panel-title">Panel title</h3>'';
body = "Panel content"; }}
${templates.bootstrap.panel {
type = "danger";
heading = ''<h3 class="panel-title">Panel title</h3>'';
body = "Panel content"; }}
</div><!-- /.col-sm-4 -->