Some miscellaneous style alterations
[gitweb] / gitweb.cgi
index ea06c90313fa9d32153d38af235cfddd095b7bc4..1aba48a08b115007d5bcafb3c66c248253580e5e 100755 (executable)
@@ -4848,11 +4848,11 @@ sub git_difftree_body {
        my ($difftree, $hash, @parents) = @_;
        my ($parent) = $parents[0];
        my $have_blame = gitweb_check_feature('blame');
-       print "<div class=\"list_head\">\n";
        if ($#{$difftree} > 10) {
+               print "<div class=\"list_head\">\n";
                print(($#{$difftree} + 1) . " files changed:\n");
+               print "</div>\n";
        }
-       print "</div>\n";
 
        print "<table class=\"" .
              (@parents > 1 ? "combined " : "") .
@@ -5877,11 +5877,13 @@ sub git_log_body {
        $from = 0 unless defined $from;
        $to = $#{$commitlist} if (!defined $to || $#{$commitlist} < $to);
 
+       print "<section class=\"cards\">\n";
        for (my $i = 0; $i <= $to; $i++) {
                my %co = %{$commitlist->[$i]};
                next if !%co;
                my $commit = $co{'id'};
                my $ref = format_ref_marker($refs, $commit);
+               print "<article>\n";
                git_print_header_div('commit',
                               "<time datetime=\"$co{'age_string_iso8601'}\" title=\"$co{'age_string_iso8601'}\" class=\"age\">$co{'age_string'}</time>" .
                               esc_html($co{'title'}) . $ref,
@@ -5900,7 +5902,9 @@ sub git_log_body {
                print "<div class=\"log_body\">\n";
                git_print_log($co{'comment'});
                print "</div>\n";
+               print "</article>\n";
        }
+       print "</section>\n";
        if ($extra) {
                print "<div class=\"page_nav\">\n";
                print "$extra\n";
@@ -6625,51 +6629,66 @@ sub git_summary {
 
        print "</table>\n";
 
+       print("<section class=\"cards\">\n");
+
        # If XSS prevention is on, we don't include README.html.
        # TODO: Allow a readme in some safe format.
        if (!$prevent_xss && -s "$projectroot/$project/README.html") {
+               print("<article>\n");
                print "<div class=\"title\">readme</div>\n" .
                      "<div class=\"readme\">\n";
                insert_file("$projectroot/$project/README.html");
                print "\n</div>\n"; # class="readme"
+               print("</article>\n");
        }
 
        # we need to request one more than 16 (0..15) to check if
        # those 16 are all
        my @commitlist = $head ? parse_commits($head, 17) : ();
        if (@commitlist) {
+               print("<article>\n");
                git_print_header_div('shortlog');
                git_shortlog_body(\@commitlist, 0, 15, $refs,
                                  $#commitlist <=  15 ? undef :
                                  $cgi->a({-href => href(action=>"shortlog")}, "..."));
+               print("</article>\n");
        }
 
        if (@taglist) {
+               print("<article>\n");
                git_print_header_div('tags');
                git_tags_body(\@taglist, 0, 15,
                              $#taglist <=  15 ? undef :
                              $cgi->a({-href => href(action=>"tags")}, "..."));
+               print("</article>\n");
        }
 
        if (@headlist) {
+               print("<article>\n");
                git_print_header_div('heads');
                git_heads_body(\@headlist, $head, 0, 15,
                               $#headlist <= 15 ? undef :
                               $cgi->a({-href => href(action=>"heads")}, "..."));
+               print("</article>\n");
        }
 
        if (%remotedata) {
+               print("<article>\n");
                git_print_header_div('remotes');
                git_remotes_body(\%remotedata, 15, $head);
+               print("</article>\n");
        }
 
        if (@forklist) {
+               print("<article>\n");
                git_print_header_div('forks');
                git_project_list_body(\@forklist, 'age', 0, 15,
                                      $#forklist <= 15 ? undef :
                                      $cgi->a({-href => href(action=>"forks")}, "..."),
                                      'no_header');
+               print("</article>\n");
        }
+       print("</section>\n");
 
        git_footer_html();
 }