Showing 6 changed files with 93 additions and 1 deletions
+2
.gitignore
... ...
@@ -25,3 +25,5 @@ user/public/*
25 25
 !user/public/.gitignore
26 26
 user/templates/*
27 27
 !user/templates/.gitignore
28
+db/*
29
+!db/.gitignore
db/.gitignore
No changes.
+11
lib/Gitprep.pm
... ...
@@ -57,6 +57,17 @@ sub startup {
57 57
 
58 58
   # Home
59 59
   $r->get('/')->to('#home');
60
+  
61
+  # Login
62
+  $r->get('/_login')->to('#login');
63
+  
64
+  # Admin
65
+  {
66
+    my $r = $r->route('/_admin')->to('admin#');
67
+    
68
+    # Create new repository
69
+    $r->get('/create')->to('#create');
70
+  }
60 71
 
61 72
   # Projects
62 73
   $r->get('/:user')->to('#projects');
+42
templates/admin/create.html.ep
... ...
@@ -0,0 +1,42 @@
1
+% layout 'common';
2
+  %= include '/css/common';
3
+  
4
+  %= stylesheet begin
5
+    .rep_panel {
6
+      overflow:hidden;
7
+    }
8
+    .rep_panel .rleft {
9
+      float:left;
10
+    }
11
+    .rep_panel .rmiddle {
12
+      float:left;
13
+    }
14
+    .rep_panel .rbottom {
15
+      float:left;
16
+    }
17
+  % end 
18
+
19
+  %= include '/include/header';
20
+
21
+  <div class="main_panel">
22
+    <div class="rep_panel">
23
+      <div class="rleft">
24
+        <div class="rowner_header>Owner</div>
25
+        <div class="rowner">yuki-kimoto</div>
26
+      </div>
27
+      <div class="rmiddle">
28
+        <div class="rmiddle_top></div>
29
+        <div class="rmiddle_bottom">/</div>
30
+      </div>
31
+      <div class="rbottom">
32
+        <div class="rrep_header">Repository name</div>
33
+        <div class="rrep"><input></div>
34
+      </div>
35
+    </div>
36
+
37
+    <div>Description (optional)</div>
38
+    <div><input></div>
39
+
40
+    <div>Initialize this repository with a README</div>
41
+  </div>
42
+  %= include '/include/footer';
+2 -1
templates/include/header.html.ep
... ...
@@ -6,6 +6,7 @@
6 6
     margin-bottom:10px;
7 7
     border-bottom:1px solid #E5E5E5;
8 8
     height:40px;
9
+    font-weight:bold;
9 10
   }
10 11
   .header .panel {
11 12
     width:900px;
... ...
@@ -42,7 +43,7 @@
42 43
       <li>
43 44
         <a href="<%= url_for("/setting/profile") %>"><s>Account setting</s></a>
44 45
       </li>
45
-      <li><a href="<%= url_for("/new") %>"><s>Create a new repo</s></a></li>
46
+      <li><a href="<%= url_for("/_admin/create") %>">Create a new repo</a></li>
46 47
       % if (my $user = stash('user')) {
47 48
         <li><a href="<%= url_for("/$user") %>"><%= $user %></a></li>
48 49
       % }
+36
templates/main/login.html.ep
... ...
@@ -0,0 +1,36 @@
1
+%= stylesheet begin
2
+  .account_panel {
3
+    margin-top:50px;
4
+    margin-left:auto;
5
+    margin-right:auto;
6
+    width:500px;
7
+    background-color:#e6f1f6;
8
+    padding:30px;
9
+  }
10
+  .account {
11
+    margin-left:auto;
12
+    margin-right:auto;
13
+    width:300px;
14
+  }
15
+  .account_panel .atitle {
16
+    font-size:130%;
17
+    maring-top:30px;
18
+  }
19
+% end
20
+
21
+% layout 'common';
22
+%= include '/css/common';
23
+  <div class="account_panel">
24
+    <table class="account">
25
+      <tr class="auser">
26
+        <td>管理者: </td>
27
+        <td><input value="admin"></td>
28
+      </tr>
29
+      <tr class="apassword">
30
+        <td>パスワード: </td>
31
+        <td><input></td>
32
+      </tr>
33
+    </table>
34
+    <div><input type="submit" value="Start Git Prep!"></div>
35
+</div>
36
+