Showing 2 changed files with 74 additions and 30 deletions
+50 -1
public/css/bootstrap.css
... ...
@@ -12,8 +12,18 @@
12 12
   I cleanup bootstrap many parts.
13 13
 */
14 14
 
15
+* {
16
+  margin:0;
17
+  padding:0;
18
+
19
+  -webkit-box-sizing: border-box;
20
+  -moz-box-sizing: border-box;
21
+  -o-box-sizing: border-box;
22
+  -ms-box-sizing: border-box;
23
+  box-sizing: border-box;
24
+}
25
+
15 26
 body {
16
-  margin: 0;
17 27
   font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
18 28
   font-size: 14px;
19 29
   line-height: 130%;
... ...
@@ -1535,3 +1545,42 @@ button.close {
1535 1545
 .markdown ul {
1536 1546
   padding : 0 1em;
1537 1547
 }
1548
+
1549
+.header {
1550
+  padding-top:10px;
1551
+  background:#f5f5f5;
1552
+  border-bottom:1px solid #e5e5e5;
1553
+  margin-bottom:10px;
1554
+  overflow:hidden;
1555
+}
1556
+
1557
+.header-left {
1558
+  float:left;
1559
+  width:50%;
1560
+  overflow:hidden;
1561
+}
1562
+
1563
+.header-right {
1564
+  float:left;
1565
+  width:50%;
1566
+  overflow:hidden;
1567
+}
1568
+
1569
+.title {
1570
+  float:left;
1571
+  font-size:19px;
1572
+  padding-top:7px;
1573
+}
1574
+
1575
+.header-search {
1576
+  float:left;
1577
+  margin-left:10px;
1578
+  padding-top:4px;
1579
+}
1580
+
1581
+.header-search input {
1582
+  padding:4px 5px;
1583
+  box-shadow: inset 0 1px 2px rgba(0,0,0,0.075);
1584
+  border: 1px solid #ccc;
1585
+  border-radius: 3px;
1586
+}
+24 -29
templates/include/header.html.ep
... ...
@@ -19,44 +19,39 @@
19 19
   }
20 20
 %>
21 21
 
22
-<div style="background:#f5f5f5">
22
+<div class="header">
23 23
   <div class="container">
24
-    <div>
25
-      <div>
26
-        <div style="overflow:hidden">
27
-          <h3 style="float:left;display:inline-block;font-size:19px;margin:0;padding-top:5px;"><a href="<%= url_for('/') %>">GitPrep</a></h3>
28
-          % if ((url_for->path->parts->[0] || '') ne '_search') {
29
-            <form action="<%= url_for('/_search') %>" style="float:left;display:inline-block;margin:0;margin-left:10px;margin:0;padding:10px 10px 0 10px">
30
-              <%= text_field 'q', style => 'display:inline-block;width:350px', placeholder => 'Search' %>
31
-            </form>
32
-          % }
33
-        </div>
34
-      </div>
35
-      <div>
36
-        <div style="margin:0; padding-top:12px">
37
-          % if ($api->logined) {
38
-            % unless ($current_user eq 'admin') {
39
-              <a class="btn btn-small" href="<%= url_for("/_new") %>">Create a new repo</a>
40
-              <a class="btn btn-small" href="<%= url_for("/$current_user/_settings") %>">Account Settings</a>
41
-            % }
42
-            % my $url = url_with->to_abs;
43
-            <a class="btn btn-small" href="<%= url_for("/_logout?from=$url") %>">Sign out</a>
44
-            <!-- Logined as <%= $current_user %> -->
45
-            <i class="icon-user"></i><a href="<%= url_for("/$current_user") %>"><%= $current_user %></a>
46
-          % } else {
47
-            <a class="btn btn-primary" href="<%= url_for('/_login') %>">Sign in</a>
24
+    <div class="header-left">
25
+      <div class="title"><a href="<%= url_for('/') %>">GitPrep</a></div>
26
+      % if ((url_for->path->parts->[0] || '') ne '_search') {
27
+        <form class="header-search" action="<%= url_for('/_search') %>">
28
+          <%= text_field 'q', style => 'display:inline-block;width:350px', placeholder => 'Search' %>
29
+        </form>
30
+      % }
31
+    </div>
32
+    <div class="header-right">
33
+      <div style="margin:0; padding-top:12px">
34
+        % if ($api->logined) {
35
+          % unless ($current_user eq 'admin') {
36
+            <a class="btn btn-small" href="<%= url_for("/_new") %>">Create a new repo</a>
37
+            <a class="btn btn-small" href="<%= url_for("/$current_user/_settings") %>">Account Settings</a>
48 38
           % }
49
-        </div>
39
+          % my $url = url_with->to_abs;
40
+          <a class="btn btn-small" href="<%= url_for("/_logout?from=$url") %>">Sign out</a>
41
+          <!-- Logined as <%= $current_user %> -->
42
+          <i class="icon-user"></i><a href="<%= url_for("/$current_user") %>"><%= $current_user %></a>
43
+        % } else {
44
+          <a class="btn btn-primary" href="<%= url_for('/_login') %>">Sign in</a>
45
+        % }
50 46
       </div>
51 47
     </div>
52 48
   </div>
53 49
 </div>
54
-<hr style="margin:0;">
55 50
 
56 51
 % if (!$no_project_header && (defined $user || defined $project)) {
57
-  <div style="padding-top:10px;background:#fafafa;border-bottom:1px solid #eee;margin-bottom:10px;">
52
+  <div>
58 53
     <div class="container">
59
-      <div style="margin-bottom:10px">
54
+      <div>
60 55
         <div>
61 56
           <ul class="breadcrumb" style="margin:0;background:none;padding-left:0;font-size:16px;">
62 57
             <li><a href="<%= url_for('/') %>"><i class="icon-home"></i></a></li>