Permalink
Browse files

fateserver: add FFmpeg website-style banner and navbar

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
  • Loading branch information...
TimothyGu authored and michaelni committed Jan 17, 2014
1 parent 2409b94 commit abf9ec1cd7462cd44299798949ead31662872177
Showing with 50 additions and 1 deletion.
  1. +26 −1 FATE.pm
  2. +8 −0 history.cgi
  3. +8 −0 index.cgi
  4. +8 −0 report.cgi
View
27 FATE.pm
@@ -27,7 +27,7 @@ BEGIN {
@ISA = qw/Exporter/;
@EXPORT = qw/split_header split_config split_rec parse_date agestr
split_stats load_summary load_report load_lastpass
doctype start end tag h1 span trow trowa trowh th td anchor
doctype start end tag h1 span trow trowa trowh th td anchor navbar
fail $fatedir $recent_age $ancient_age $hidden_age href
$gitweb/;
}
@@ -299,6 +299,31 @@ sub href {
}
}
sub navbar {
# Copied from ffmpeg-web
print <<EOF;
<div id="banner">
<a href="//ffmpeg.org/index.html">
<img src="//ffmpeg.org/ffmpeg-logo.png" alt="FFmpeg">
</a>
</div>
<div id="navbar">
<a href="//ffmpeg.org/index.html">News</a> |
<a href="//ffmpeg.org/about.html">About</a> |
<a href="//ffmpeg.org/download.html">Download</a> |
<a href="//ffmpeg.org/documentation.html">Documentation</a> |
<a href="//ffmpeg.org/bugreports.html">Bug Reports</a> |
<a href="//ffmpeg.org/contact.html">Contact</a> |
<a href="//ffmpeg.org/donations.html">Donations</a> |
<a href="//ffmpeg.org/consulting.html">Consulting</a> |
<a href="//ffmpeg.org/projects.html">Projects</a> |
<a href="//ffmpeg.org/legal.html">Legal</a> |
<a href="//ffmpeg.org/security.html">Security</a> |
<a href="http://fate.ffmpeg.org">FATE</a>
</div>
EOF
}
sub fail {
my ($msg) = @_;
print "Content-type: text/html\r\n\r\n";
View
@@ -35,13 +35,20 @@ start 'html', xmlns => "http://www.w3.org/1999/xhtml";
start 'head';
tag 'meta', 'http-equiv' => "Content-Type",
'content' => "text/html; charset=utf-8";
tag 'link', rel => 'stylesheet',
type => 'text/css',
href => '//ffmpeg.org/default.css';
tag 'link', rel => 'stylesheet',
type => 'text/css',
href => '/fate.css';
print "<title>FATE: $slot</title>\n";
end 'head';
start 'body';
start 'div', id => 'container';
navbar;
h1 "Report history for $slot";
start 'table', id => 'history', class => 'replist';
@@ -86,5 +93,6 @@ for my $date ((sort { $b cmp $a } @reps)[0..49]) {
}
end 'tbody';
end 'table';
end 'div';
end 'body';
end 'html';
View
@@ -103,6 +103,9 @@ start 'html', xmlns => "http://www.w3.org/1999/xhtml";
start 'head';
tag 'meta', 'http-equiv' => "Content-Type",
'content' => "text/html; charset=utf-8";
tag 'link', rel => 'stylesheet',
type => 'text/css',
href => '//ffmpeg.org/default.css';
tag 'link', rel => 'stylesheet',
type => 'text/css',
href => '/fate.css';
@@ -124,6 +127,10 @@ EOF
end 'head';
start 'body';
start 'div', id => 'container';
navbar;
h1 'FATE';
start 'table', id => 'index', class => 'replist';
@@ -262,5 +269,6 @@ for my $rep (sort repcmp @reps) {
}
end 'tbody';
end 'table';
end 'div';
end 'body';
end 'html';
View
@@ -75,6 +75,9 @@ start 'html', xmlns => "http://www.w3.org/1999/xhtml";
start 'head';
tag 'meta', 'http-equiv' => "Content-Type",
'content' => "text/html; charset=utf-8";
tag 'link', rel => 'stylesheet',
type => 'text/css',
href => '//ffmpeg.org/default.css';
tag 'link', rel => 'stylesheet',
type => 'text/css',
href => '/fate.css';
@@ -102,6 +105,10 @@ EOF
end 'head';
start 'body';
start 'div', id => 'container';
navbar;
h1 "$$hdr{slot} $$hdr{rev}", id => 'title';
start 'table', id => 'config';
@@ -200,5 +207,6 @@ if ($nfail) {
}
end 'table';
end 'div';
end 'body';
end 'html';

0 comments on commit abf9ec1

Please sign in to comment.