summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-31 12:17:31 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-31 12:17:31 -0400
commit04794eafc0f0fd09e645247136fe557fd80bfb55 (patch)
tree92ca3260821cdc99c0d47907765ee862c6d23782 /templates
parentb9b009787662cda4948b3c9706b8897587d05d8a (diff)
webapp now starts up when run not in a git repo
Diffstat (limited to 'templates')
-rw-r--r--templates/bootstrap.hamlet6
-rw-r--r--templates/configurators/intro.hamlet51
-rw-r--r--templates/page.hamlet21
3 files changed, 42 insertions, 36 deletions
diff --git a/templates/bootstrap.hamlet b/templates/bootstrap.hamlet
index cf686f843..f743a0d46 100644
--- a/templates/bootstrap.hamlet
+++ b/templates/bootstrap.hamlet
@@ -1,7 +1,11 @@
$doctype 5
<html>
<head>
- <title>#{relDir webapp} #{pageTitle page}
+ <title>
+ $maybe reldir <- relDir webapp
+ #{reldir} #{pageTitle page}
+ $nothing
+ #{pageTitle page}
<link rel="icon" href=@{StaticR favicon_ico} type="image/x-icon">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
^{pageHead page}
diff --git a/templates/configurators/intro.hamlet b/templates/configurators/intro.hamlet
index ecb15f39c..5062346a8 100644
--- a/templates/configurators/intro.hamlet
+++ b/templates/configurators/intro.hamlet
@@ -1,27 +1,28 @@
<div .span9 ##{ident} .hero-unit>
- <h2>
- git-annex is watching over your files in <small><tt>#{reldir}</tt></small>
- <p>
- It will automatically notice changes, and keep files in sync between #
- $if notenough
- repositories on your devices ...
- <h2>
- But no other repositories are set up yet.
- <a .btn .btn-primary .btn-large href="@{AddRepositoryR}">Add another repository</a>
- $else
- $if barelyenough
- <span .badge .badge-warning>#{numrepos}</span>
+ $maybe reldir <- relDir webapp
+ <h2>
+ git-annex is watching over your files in <small><tt>#{reldir}</tt></small>
+ <p>
+ It will automatically notice changes, and keep files in sync between #
+ $if notenough
+ repositories on your devices ...
+ <h2>
+ But no other repositories are set up yet.
+ <a .btn .btn-primary .btn-large href="@{AddRepositoryR}">Add another repository</a>
$else
- <span .badge .badge-success>#{numrepos}</span>
- \ repositories and devices:
- <table .table .table-striped .table-condensed>
- <tbody>
- $forall (num, name) <- remotelist
- <tr>
- <td>
- #{num}
- <td>
- #{name}
- <a .btn .btn-primary .btn-large href="@{AddRepositoryR}">Add another repository</a>
- <p>
- Or just sit back, watch the magic, and get on with using your files.
+ $if barelyenough
+ <span .badge .badge-warning>#{numrepos}</span>
+ $else
+ <span .badge .badge-success>#{numrepos}</span>
+ \ repositories and devices:
+ <table .table .table-striped .table-condensed>
+ <tbody>
+ $forall (num, name) <- remotelist
+ <tr>
+ <td>
+ #{num}
+ <td>
+ #{name}
+ <a .btn .btn-primary .btn-large href="@{AddRepositoryR}">Add another repository</a>
+ <p>
+ Or just sit back, watch the magic, and get on with using your files.
diff --git a/templates/page.hamlet b/templates/page.hamlet
index 8a2df1e4b..29a091110 100644
--- a/templates/page.hamlet
+++ b/templates/page.hamlet
@@ -7,16 +7,17 @@
$forall (name, route, isactive) <- navbar
<li :isactive:.active>
<a href="@{route}">#{name}</a>
- <ul .nav .pull-right>
- <li .dropdown #menu1>
- <a .dropdown-toggle data-toggle="dropdown" href="#menu1">
- Current Repository: #{relDir webapp}
- <b .caret></b>
- <ul .dropdown-menu>
- <li><a href="#">#{relDir webapp}</a></li>
- <li .divider></li>
- <li><a href="@{AddRepositoryR}">Add another repository</a></li>
-
+ $maybe reldir <- relDir webapp
+ <ul .nav .pull-right>
+ <li .dropdown #menu1>
+ <a .dropdown-toggle data-toggle="dropdown" href="#menu1">
+ Current Repository: #{reldir}
+ <b .caret></b>
+ <ul .dropdown-menu>
+ <li><a href="#">#{reldir}</a></li>
+ <li .divider></li>
+ <li><a href="@{AddRepositoryR}">Add another repository</a></li>
+ $nothing
<div .container-fluid>
<div .row-fluid>
^{content}