Showing 6 changed files with 43 additions and 35 deletions
-29
public/css/readme.css
... ...
@@ -1,29 +0,0 @@
1
-pre.README {
2
-  background             : white;
3
-  border-radius          : 1px;
4
-  border-top             : none;
5
-  border-top-left-radius : 0;
6
-  font-size              : 12px;
7
-  line-height            : 1em;
8
-  margin-bottom          : 80px;
9
-  padding                : 27px;
10
-}
11
-
12
-pre.README h1 { margin: 0; font-size: 2em;    }
13
-pre.README h2 { margin: 0; font-size: 1.5em;  }
14
-pre.README h3 { margin: 0; font-size: 1.17em; }
15
-pre.README h5 { margin: 0; font-size:  .83em; }
16
-pre.README h6 { margin: 0; font-size:  .75em; }
17
-
18
-pre.README h1 {
19
-  border-bottom : 1px solid #DDDDDD;
20
-}
21
-
22
-pre.README p {
23
-  margin  : 0;
24
-  padding : 0;
25
-}
26
-
27
-pre.README ul {
28
-  padding : 0 1em;
29
-}
+30
templates/css/common.html.ep
... ...
@@ -46,3 +46,33 @@
46 46
 .border-blue {
47 47
   border:1px solid #c5d5dd;
48 48
 }
49
+
50
+pre.README {
51
+  background             : white;
52
+  border-radius          : 1px;
53
+  border-top             : none;
54
+  border-top-left-radius : 0;
55
+  font-size              : 16px;
56
+  line-height            : 1.5em;
57
+  margin-bottom          : 80px;
58
+  padding                : 27px;
59
+}
60
+
61
+pre.README h1 { margin: 0; font-size: 2em;    }
62
+pre.README h2 { margin: 0; font-size: 1.5em;  }
63
+pre.README h3 { margin: 0; font-size: 1.17em; }
64
+pre.README h5 { margin: 0; font-size:  .83em; }
65
+pre.README h6 { margin: 0; font-size:  .75em; }
66
+
67
+pre.README h1 {
68
+  border-bottom : 1px solid #DDDDDD;
69
+}
70
+
71
+pre.README p {
72
+  margin  : 0;
73
+  padding : 0;
74
+}
75
+
76
+pre.README ul {
77
+  padding : 0 1em;
78
+}
+2 -2
templates/include/readme.html.ep
... ...
@@ -1,6 +1,6 @@
1 1
 <%
2 2
   use Mojo::ByteStream ();
3
-  use Text::Markdown qw( markdown );
3
+  use Text::Markdown ();
4 4
   
5 5
   # README
6 6
   my $lines;
... ...
@@ -15,7 +15,7 @@
15 15
     eval { $lines = app->git->blob($user, $project, $rev, 'README.md') };
16 16
     if ($lines) {
17 17
       my $readme = join "\n", @$lines;
18
-      $readme_e = markdown($readme);
18
+      $readme_e = Text::Markdown::markdown($readme);
19 19
     }
20 20
   }
21 21
 %>
+7 -1
templates/include/tree.html.ep
... ...
@@ -32,10 +32,16 @@
32 32
           % my $type = $tree->{type};
33 33
           % my $name = $tree->{name};
34 34
           % my $commit = $tree->{commit};
35
+          % my $mode_str = $tree->{mode_str};
35 36
           
36 37
           <div class="span3" style="width:170px">
37 38
             % my $child_dir = defined $dir && length $dir ? join('/', $dir, $name) : $name;
38
-            % if ($type eq 'blob') {
39
+            % if ($mode_str eq 'm---------') {
40
+              <i class="icon-folder-open"></i>
41
+              <a href="<%= url_for("/$user/$project/submodule/$rev/$child_dir") %>">
42
+                <%= $name %>
43
+              </a>              
44
+            % } elsif ($type eq 'blob') {
39 45
               % my $file = defined $dir && $dir ne '' ? "$dir/$name" : $name;
40 46
               <i class="icon-file"></i>
41 47
               <a href="<%= url_for("/$user/$project/blob/$rev/$file") %>">
-1
templates/layouts/common.html.ep
... ...
@@ -9,7 +9,6 @@
9 9
     % my $title = stash('title');
10 10
     <title><%= $title ? "$title \x{30fb} Gitprep" : 'Gitprep' %></title>
11 11
     %= stylesheet '/css/bootstrap.min.css', rel => 'stylesheet', media => 'screen';
12
-    %= stylesheet '/css/readme.css',        rel => 'stylesheet', media => 'screen';
13 12
     % for my $stylesheet (@$stylesheets) {
14 13
       %= stylesheet $stylesheet;
15 14
     % }
+4 -2
templates/tree.html.ep
... ...
@@ -40,8 +40,10 @@
40 40
     %= include '/include/code_menu', display => 'files';
41 41
     %= include '/include/page_path', type => 'tree', Path => $dir;
42 42
     %= include '/include/tree';
43
-
44
-    %= include '/include/readme';
43
+    
44
+    % if (!defined $dir || $dir eq '') {
45
+      %= include '/include/readme'
46
+    % }
45 47
   </div>
46 48
   
47 49
   %= include '/include/footer';