Skip to content
This repository
Browse code

More Bootstrapification.

  • Loading branch information...
commit 34872cb3eabbcbbb81a1b1698ad009e3363be9bb 1 parent 23e35ff
Dave Cross authored February 04, 2014
50  views/layouts/main.tt
... ...
@@ -1,27 +1,28 @@
1 1
 <!DOCTYPE html>
2 2
 <html lang="en">
3  
-<head>
4  
-  <meta charset="[% settings.charset %]">
5  
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
6  
-  <meta name="viewport" content="width=device-width, initial-scale=1">
7  
-  <title>Lystyng</title>
8  
-  <link rel="stylesheet" href="[% request.uri_base %]/css/bootstrap.min.css" />
  3
+  <head>
  4
+    <meta charset="[% settings.charset %]">
  5
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6
+    <meta name="viewport" content="width=device-width, initial-scale=1">
  7
+    <title>Lystyng</title>
  8
+    <link rel="stylesheet" href="[% request.uri_base %]/css/bootstrap.min.css" />
  9
+    <link rel="stylesheet" href="[% request.uri_base %]/css/bootstrap-theme.min.css">
9 10
 
10  
-  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
11  
-  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
12  
-  <!--[if lt IE 9]>
  11
+    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  12
+    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  13
+    <!--[if lt IE 9]>
13 14
     <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
14 15
     <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
15  
-  <![endif]-->
16  
-<script type="text/javascript">/* <![CDATA[ */
  16
+    <![endif]-->
  17
+    <script type="text/javascript">/* <![CDATA[ */
17 18
     !window.jQuery && document.write('<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.js"><\/script>')
18 19
 /* ]]> */</script>
19  
-  <script src="js/bootstrap.min.js"></script>
20  
-</head>
21  
-<body>
22  
-  <div class="container">
  20
+    <script src="js/bootstrap.min.js"></script>
  21
+  </head>
  22
+  <body>
  23
+    <div class="container">
23 24
       <!-- Static navbar -->
24  
-      <div class="navbar navbar-default" role="navigation">
  25
+      <div class="navbar navbar-inverse" role="navigation">
25 26
         <div class="container-fluid">
26 27
           <div class="navbar-header">
27 28
             <a class="navbar-brand" href="#">Lystyng</a>
@@ -29,8 +30,7 @@
29 30
           <div class="navbar-collapse collapse">
30 31
             <ul class="nav navbar-nav navbar-right">
31 32
 [% IF session.user -%]
32  
-              <li>Welcome [% session.user.name %]</li>
33  
-              <li><a href="/logout">Log out</a></li>
  33
+              <li>Welcome [% session.user.name %] <a href="/logout">Log out</a></li>
34 34
 [% ELSE -%]
35 35
               <li><a href="/register">Register</a> / <a href="/login">Log in</a></li>
36 36
 [% END -%]
@@ -38,10 +38,14 @@
38 38
           </div><!--/.nav-collapse -->
39 39
         </div><!--/.container-fluid -->
40 40
       </div>
  41
+      <div class="container">
41 42
 [% content %]
42  
-  <div id="footer">
43  
-  Powered by <a href="http://perldancer.org/">Dancer</a> [% dancer_version %]
44  
-  </div>
45  
-  </div>
46  
-</body>
  43
+      </div>
  44
+
  45
+    <div id="footer">
  46
+      <div class="container">
  47
+        <p class="text-muted">Powered by <a href="http://perldancer.org/">Dancer</a> [% dancer_version %]</p>
  48
+      </div>
  49
+    </div>
  50
+  </body>
47 51
 </html>
11  views/login.tt
... ...
@@ -1,9 +1,14 @@
  1
+<div class="col-md-4">
1 2
 [% IF error -%]
2  
-<p>That username and/or password is incorrect.</p>
  3
+<div class="alert alert-danger fade-in">
  4
+That username and/or password is incorrect.
  5
+<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
  6
+</div>
3 7
 [% END -%]
4 8
 <form class="form-signin" role="form" method="post" action="/login">
5 9
   <h2 class="form-signin-heading">Please sign in</h2>
6 10
   <input type="text" class="form-control" placeholder="Username" name="username" value="[% params.username %]" required autofocus>
7  
-  <input type="password" class="form-control" placeholder="Password" name="passoword" value="[% params.password %]" required>
8  
-  <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
  11
+  <input type="password" class="form-control" placeholder="Password" name="password" value="[% params.password %]" required>
  12
+  <button class="btn btn-primary btn-block" type="submit">Sign in</button>
9 13
 </form>
  14
+</div>
57  views/register.tt
... ...
@@ -1,16 +1,49 @@
  1
+<div class="col-md-6">
1 2
 [% IF errors -%]
2  
-<ul>
  3
+  <div class="alert alert-danger fade-in">
  4
+    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
  5
+    <ul>
3 6
 [%   FOREACH error IN errors -%]
4  
-<li>[% error %]</li>
  7
+      <li>[% error %]</li>
5 8
 [%   END -%]
  9
+    </ul>
  10
+  </div>
6 11
 [% END -%]
7  
-<form method="post" action="/register">
8  
-<table>
9  
-  <tr><th>Username:</th><td><input name="username" value="[% params.username %]"></td></tr>
10  
-  <tr><th>Email:</th><td><input name="email" value="[% params.email %]"></td></tr>
11  
-  <tr><th>Name:</th><td><input name="name" value="[% params.name %]"></td></tr>
12  
-  <tr><th>Password:</th><td><input name="password" value="[% params.password %]"></td></tr>
13  
-  <tr><th>Confirm Password:</th><td><input name="password2" value="[% params.password2 %]"></td></tr>
14  
-  <tr><td colspan="2"><input type="submit"></td></tr>
15  
-</table>
16  
-</form>
  12
+  <form role="form" class="form-horizontal">
  13
+    <div class="form-group">
  14
+      <label class="col-md-2 control-label" for="username">Username</label>
  15
+      <div class="col-md-6">
  16
+        <input type="text" class="form-control" id="username" name="username" value="[% params.username %]" placeholder="username">
  17
+      </div>
  18
+    </div>
  19
+    <div class="form-group">
  20
+      <label class="col-md-2 control-label" for="email">Email</label>
  21
+      <div class="col-md-6">
  22
+        <input type="email" class="col-md-4 form-control" id="email" name="email" value="[% params.email %]" placeholder="email">
  23
+      </div>
  24
+    </div>
  25
+    <div class="form-group">
  26
+      <label class="col-md-2 control-label" for="name">Name</label>
  27
+      <div class="col-md-6">
  28
+        <input type="text" class="col-md-4 form-control" id="name" name="name" value="[% params.name %]" placeholder="name">
  29
+      </div>
  30
+    </div>
  31
+    <div class="form-group">
  32
+      <label class="col-md-2 control-label" for="password">Password</label>
  33
+      <div class="col-md-6">
  34
+        <input type="password" class="col-md-4 form-control" id="password" name="password" value="[% params.password %]" placeholder="password">
  35
+      </div>
  36
+    </div>
  37
+    <div class="form-group">
  38
+      <label class="col-md-2 control-label" for="password2">Confirm Password</label>
  39
+      <div class="col-md-6">
  40
+        <input type="password" class="col-md-4 form-control" id="password2" name="password2" value="[% params.password2 %]" placeholder="confirm password">
  41
+      </div>
  42
+    </div>
  43
+    <div class="form-group">
  44
+      <div class="col-md-offset-2 col-md-4">
  45
+        <button type="submit" class="btn btn-primary btn-block">Register</button>
  46
+      </div>
  47
+    </div>
  48
+  </form>
  49
+</div>

0 notes on commit 34872cb

Please sign in to comment.
Something went wrong with that request. Please try again.