Showing 4 changed files with 52 additions and 193 deletions
+16 -45
templates/include/project_header.html.ep
... ...
@@ -1,45 +1,16 @@
1
-%= stylesheet begin
2
-
3
-  /* Main menu */
4
-  .main_menu {
5
-    border:1px solid gray;
6
-    border-left:none;
7
-    list-style-type: none;
8
-    padding-left:0px;
9
-    background-color:#F5F5F5;
10
-    overflow:hidden;
11
-    height:36px;
12
-  }
13
-  .main_menu li {
14
-    float:left;
15
-    text-align:center;
16
-    width:14%;
17
-    border-left:1px solid gray;
18
-  }
19
-  
20
-  .main_menu a {
21
-    display:block;
22
-    width:100%;
23
-    height:100%;
24
-    padding:10px 0px;
25
-  }
26
-
27
-% end
28
-
29
-<ul class="breadcrumb" style="margin-top:10px">
30
-  <li><a href="<%= url_for('/') %>">Home</a></li>
31
-  /
32
-  <li><a href="<%= url_for %>"><%= $user %></a></li>
33
-  /
34
-  <li><a href="<%= url_for("/$user/$project") %>"><%= $project %></a></li>
35
-</ul>
36
-      
37
-<ul class="main_menu">
38
-  <li><a href="<%= url_for("/$user/$project") %>">Code</a></li>
39
-  <li><a href="<%= url_for("/$user/$project/network") %>"><s>Network</s></a></li>
40
-  <li><a href="<%= url_for("/$user/$project/pulls") %>"><s>Pull Requests 0</s></a></li>
41
-  <li><a href="<%= url_for("/$user/$project/issues") %>"><s>Issues 1</s></a></li>
42
-  <li><a href="<%= url_for("/$user/$project/wiki") %>"><s>Wiki</s></a></li>
43
-  <li><a href="<%= url_for("/$user/$project/graphs") %>"><s>Graphs</s></a></li>
44
-  <li><a href="<%= url_for("/$user/$project/admin") %>"><s>Admin</s></a></li>
45
-</ul>
1
+<div class="row">
2
+  <div class="span11">
3
+    <ul class="breadcrumb" style="margin-top:10px">
4
+      <li><a href="<%= url_for('/') %>">Home</a></li>
5
+      /
6
+      <li><a href="<%= url_for %>"><%= $user %></a></li>
7
+      /
8
+      <li><a href="<%= url_for("/$user/$project") %>"><%= $project %></a></li>
9
+    </ul>
10
+  </div>
11
+  <div class="span1">
12
+    <a class="btn" style="margin:0;margin-top:12px;" href="<%= url_for("/$user/$project/admin") %>">
13
+      Admin
14
+    </a>
15
+  </div>
16
+</div>
+10
templates/include/sub_header.html.ep
... ...
@@ -1,5 +1,15 @@
1 1
 %= stylesheet begin
2 2
 
3
+  /* User and project name */
4
+  .user_rep {
5
+    font-size:140%;
6
+    margin-top:15px;
7
+    margin-bottom:15px;
8
+  }
9
+  .user_rep a {
10
+    color:#4183C4;
11
+  }
12
+  
3 13
   /* Main menu */
4 14
   .main_menu {
5 15
     border:1px solid gray;
+12
templates/layouts/common.html.ep
... ...
@@ -9,6 +9,18 @@
9 9
     %= javascript '/js/bootstrap.js';
10 10
     <link rel="shortcut icon" href="<%= url_for('/git-favicon.png') %>" type="image/png" >
11 11
     
12
+    %= stylesheet begin
13
+      .corner-left-none {
14
+        border-top-left-radius:0;
15
+        border-bottom-left-radius:0;
16
+        margin-left:0;
17
+      }
18
+      .corner-right-none {
19
+        border-top-right-radius:0;
20
+        border-bottom-right-radius:0;
21
+        margin-right:0;
22
+      }
23
+    % end
12 24
   </head>
13 25
   <body>
14 26
     %= content;
+14 -148
templates/main/project.html.ep
... ...
@@ -61,166 +61,32 @@
61 61
 %>
62 62
 
63 63
 % layout 'common';
64
-  %= include '/css/common';
65
-  
66
-  %= javascript begin 
67
-    $(document).ready(function() {
68
-      
69
-      // Repository URL
70
-      var rep_url_bak_color = "#F5F5F5";
71
-      var http_rep_url = "<%= url_for("/$user/$project.git")->to_abs %>";
72
-      var ssh_rep_url
73
-        = "<%= url_for("/$rep_ns")->to_abs->scheme('ssh')->userinfo($user)->port(config->{ssh_port}) %>";
74
-      var git_rep_url = "<%= url_for("/$user/$project.git")->to_abs->scheme('git')->port('') %>";
75
-      $(".git_url_text").val(http_rep_url);
76
-      $(".git_url_http").css("background-color", "darkgray");
77
-      $(".git_url_http").on('click', function () {
78
-        $(".git_url_http").css("background-color", "darkgray");
79
-        $(".git_url_ssh").css("background-color", rep_url_bak_color);
80
-        $(".git_url_git").css("background-color", rep_url_bak_color);
81
-        
82
-        $(".git_url_text").val(http_rep_url);
83
-        $(".git_url_access").text("Read-only access");
84
-      });
85
-      $(".git_url_ssh").on('click', function () {
86
-        $(".git_url_http").css("background-color", rep_url_bak_color);
87
-        $(".git_url_ssh").css("background-color", "darkgray");
88
-        $(".git_url_git").css("background-color", rep_url_bak_color);
89
-        
90
-        $(".git_url_text").val(ssh_rep_url);
91
-        $(".git_url_access").text("Read-Write access");
92
-      });
93
-      $(".git_url_git").on('click', function () {
94
-        $(".git_url_http").css("background-color", rep_url_bak_color);
95
-        $(".git_url_ssh").css("background-color", rep_url_bak_color);
96
-        $(".git_url_git").css("background-color", "darkgray");
97
-        
98
-        $(".git_url_text").val(git_rep_url);
99
-        $(".git_url_access").text("Read-Only access");
100
-      });
101
-      
102
-    });
103
-  % end
104 64
   
105 65
   %= stylesheet begin
106
-    
107
-    /* Repository description */
108
-    .description {
109
-      padding:10px;
110
-      border:1px solid gray;
111
-      margin-top:-1px;
112
-    }
113
-    
114
-    /* Git URL */
115
-    .git_url {
116
-      border: 1px solid gray;
117
-      padding: 10px;
118
-      margin-top:-1px;
119
-      font-size:80%;
120
-    }
121
-    .git_url_zip {
122
-      padding:5px;
123
-      float:left;
124
-      border:1px solid gray;
125
-      margin-right:5px;
126
-      background-color:#F5F5F5;
127
-    }
128
-    .git_url_http {
129
-      padding:5px;
130
-      float:left;
131
-      border:1px solid gray;
132
-      background-color:#F5F5F5;
133
-      cursor:pointer;
134
-    }
135
-    .git_url_ssh {
136
-      padding:5px;
137
-      float:left;
138
-      border:1px solid gray;
139
-      border-left:none;
140
-      background-color:#F5F5F5;
141
-      cursor:pointer;
142
-    }
143
-    .git_url_git {
144
-      padding:5px;
145
-      float:left;
146
-      border:1px solid gray;
147
-      border-left:none;
148
-      background-color:#F5F5F5;
149
-    }
150
-    .git_url_text {
151
-      padding:3px;
152
-      float:left;
153
-      border:1px solid gray;
154
-      width:400px;
155
-      margin-top:0;
156
-      margin-right:10px;
157
-      border-left:none;
158
-      display:block;
159
-      padding-bottom:4px;
160
-    }
161
-    .git_url_access {
162
-      padding:5px;
163
-    }
164
-    
165
-    /* Commit number */
166
-    .commit_number {
167
-      font-size:120%;
168
-    }
169
-    .commit_number a {
170
-      color:#4183C4;
171
-    }
172
-    .commit_number_left {
173
-      width:700px;
174
-      float:left;
175
-    }
176
-    .commit_number_right {
177
-      text-align:right;
178
-    }
179
-    
180
-    /* README */
181
-    .readme {
182
-      width:100%;
183
-      margin: 5px auto;
184
-      border:2px solid gray;
185
-      margin-top:30px;
186
-      line-height:1.5em;
187
-    }
188
-    .readme_title {
189
-      border-bottom:1px solid gray;
190
-      font-size:130%;
191
-      font-weight:bold;
192
-      padding:10px;
193
-    }
194
-    .readme_body {
195
-      min-height: 50px;
196
-      font-size:120%;
197
-      padding:30px;
198
-    }
199 66
   % end
200 67
 
201 68
   %= include '/include/header';
202 69
 
203 70
   <div class="container">
204 71
     %= include '/include/project_header';
205
-
206
-    <div class="description"><%= $desc %></div>
207 72
     
208
-    <div class="git_url">
209
-      <div class="git_url_zip"><a href="<%= url_for("/$user/$project/archive/master.zip") %>">ZIP</a></div>
210
-      <div class="git_url_http">HTTP</div>
211
-      <div class="git_url_ssh">SSH</div>
212
-      <!-- <div class="git_url_git">Git Read-Only</div> -->
213
-      <input type="text" class="git_url_text">
214
-      <div class="git_url_access">Read-only access</div>
73
+    <h4 style="margin-top:0px">
74
+      <%= $desc %>
75
+    </h4>
76
+    
77
+    <div class="breadcrumb" style="background-color:white;border:1px solid #ccc;padding:0 5px;">
78
+      <a class="btn" href="<%= url_for("/$user/$project/archive/master.zip") %>">ZIP</a>
79
+      <a class="btn corner-right-none" href="#" >HTTP</a><a class="btn corner-left-none corner-right-none" href="#">SSH</a><input type="text" style="border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0;margin-top:10px;">
80
+      <span>Read-only access</span>
215 81
     </div>
216 82
     
217 83
     %= include '/include/code_menu', display => 'files';
218 84
     
219
-    <div class="commit_number">
220
-      <div class="commit_number_left">
85
+    <div class="row">
86
+      <div class="span6">
221 87
         <a href="<%= url_for %>"><%= $project %></a>
222 88
       </div>
223
-      <div class="commit_number_right">
89
+      <div class="span6 text-right">
224 90
         <a href="<%= url_for("/$user/$project/commits/master") %>">
225 91
           <%= $commits_number %> commits
226 92
         </a>
... ...
@@ -229,9 +95,9 @@
229 95
     
230 96
     %= include '/include/tree';
231 97
     
232
-    <div class="readme">
233
-      <div class="readme_title">README</div>
234
-      <div class="readme_body"><pre><%= $readme %></pre></div>
98
+    <div>
99
+      <h3>README</h3>
100
+      <pre><%= $readme %></pre>
235 101
     </div>
236 102
   </div>
237 103