Split CSS files in debian.css and packages.css.
}
sub print_errors {
return unless @fatal_errors || @errors;
- print '<div style="margin:.2em;background-color:#F99;font-weight:bold;padding:0.5em;margin:0;">';
+ print '<div class="perror">';
foreach ((@fatal_errors, @errors)) {
print "<p>ERROR: $_</p>";
}
}
sub print_debug {
return unless $debug && @debug;
- print '<div style="margin:.2em;font-size:80%;border:solid thin grey">';
+ print '<div class="pdebug">';
print '<h2>Debugging:</h2><pre>';
foreach (@debug) {
print "$_\n";
}
sub print_hints {
return unless @hints;
- print '<div style="margin:.2em;">';
+ print '<div class="phints">';
foreach (@hints) {
- print "<p style=\"background-color:#FF9;padding:0.5em;margin:0\">$_</p>";
+ print "<p>$_</p>";
}
print '</div>';
}
sub print_msgs {
+ print '<div class="pmsgs">';
foreach (@msgs) {
print "<p>$_</p>";
}
+ print '</div>';
}
sub print_notes {
foreach (@notes) {
my ( $title, $note ) = @$_;
- print '<div style="margin:.2em;border: solid thin black; background-color: #bdf">';
+ print '<div class="pnotes">';
if ($note) {
- print "<h2 class=\"pred\">$title</h2>";
+ print "<h2>$title</h2>";
} else {
$note = $title;
}
} else {
my @files = unpack "L/(CC/a)", $contents{$pkg};
my $file = "";
- $$page_content .= '<pre style="border-top:solid #BFC3DC thin;padding:.5em;">';
+ $$page_content .= '<div id="pfilelist"><pre>';
for (my $i=0; $i<scalar @files;) {
$file = substr($file, 0, $files[$i++]).$files[$i++];
$$page_content .= "$file\n";
}
- $$page_content .= "</pre>";
+ $$page_content .= '</pre></div>';
}
} else {
fatal_error( "Invalid suite/arch combination" );
my ($pkgs, $pkgs_list, $opts, $keyword, $print_func, @func_args) = @_;
#my ($start, $end) = multipageheader( $input, scalar @pkgs, \%opts );
- my $str .= "<p>Found <em>".(scalar @$pkgs_list)."</em> matching packages.";
+ my $str = '<div id="psearchres">';
+ $str .= "<p>Found <em>".(scalar @$pkgs_list)."</em> matching packages.";
#my $count = 0;
my $have_exact;
if (grep { $_ eq $keyword } @$pkgs_list) {
$have_exact = 1;
- $str .= '<h2 style="padding:.3em;border-top:solid grey thin;border-bottom:solid grey thin;background-color:#bdf">Exact hits</h2>';
+ $str .= '<h2>Exact hits</h2>';
$str .= &$print_func( $keyword, $pkgs->{$keyword}||{},
map { $_->{$keyword}||{} } @func_args );
@$pkgs_list = grep { $_ ne $keyword } @$pkgs_list;
}
if (@$pkgs_list && (($opts->{searchon} ne 'names') || !$opts->{exact})) {
- $str .= '<h2 style="padding:.3em;border-top:solid grey thin;border-bottom:solid grey thin;background-color:#bdf">Other hits</h2>'
+ $str .= '<h2>Other hits</h2>'
if $have_exact;
foreach my $pkg (@$pkgs_list) {
$str .= "<p><a href=\"$SEARCH_URL/FIXME\">".
($#{$pkgs_list}+1)."</a> results have not been displayed because you requested only exact matches.</p>";
}
+ $str .= '</div>';
return $str;
}
my @versions = version_sort keys %{$pkgs->{$suite}{$archive}};
my $origin_str = "";
if ($sect->{$suite}{$archive}{$versions[0]}) {
- $origin_str .= " [<span style=\"color:red\">$sect->{$suite}{$archive}{$versions[0]}</span>]";
+ $origin_str .= " ".marker($sect->{$suite}{$archive}{$versions[0]});
}
$str .= sprintf( "<li><a href=\"$ROOT/%s/%s\">%s</a> (%s): %s %s\n",
$path, $pkg, $path, $subsect->{$suite}{$archive}{$versions[0]},
foreach my $v (@versions) {
my $archive_str = "";
if ($archives->{$suite}{$archive}{$v}) {
- $archive_str .= " [<span style=\"color:red\">$archives->{$suite}{$archive}{$v}</span>]";
+ $archive_str .= " ".marker($archives->{$suite}{$archive}{$v});
}
my @archs_to_print = grep { !$archs_printed{$_} } sort keys %{$pkgs->{$suite}{$archive}{$v}};
if (exists $pkgs->{$suite}{$archive}) {
my $origin_str = "";
if ($sect->{$suite}{$archive}{source}) {
- $origin_str .= " [<span style=\"color:red\">$sect->{$suite}{$archive}{source}</span>]";
+ $origin_str .= " ".marker($sect->{$suite}{$archive}{source});
}
if ($archives->{$suite}{$archive}{source}) {
- $origin_str .= " [<span style=\"color:red\">$archives->{$suite}{$archive}{source}</span>]";
+ $origin_str .= " ".marker($archives->{$suite}{$archive}{source});
}
$str .= sprintf( "<li><a href=\"$ROOT/%s/source/%s\">%s</a> (%s): %s %s",
$suite.(($archive ne 'us')?"/$archive":''), $pkg, $suite.(($archive ne 'us')?"/$archive":''), $subsect->{$suite}{$archive}{source},
$$page_content = '';
if (@results) {
$$page_content .= "<p>Found ".scalar(@results)." results</p>";
- $$page_content .= "<div id=\"pcontentsres\"><table><colgroup><col><col></colgroup><tr><th style=\"text-align:center\">File</th><th style=\"text-align:center\">Packages</th></tr>";
+ $$page_content .= "<div id=\"pcontentsres\"><table><colgroup><col><col></colgroup><tr><th>File</th><th>Packages</th></tr>";
foreach my $result (sort { $a->[0] cmp $b->[0] } @results) {
my $file = shift @$result;
$$page_content .= "<tr><td class=\"file\">$file</td><td>";
$$page_content .= join( ", ", map { "<a href=\"$ROOT/$suite/$_\">$_</a>" } sort keys %pkgs);
$$page_content .= '</td>';
}
- $$page_content .= '<tr><th style="text-align:center">File</th><th style="text-align:center">Packages</th></tr>' if @results > 20;
+ $$page_content .= '<tr><th>File</th><th>Packages</th></tr>' if @results > 20;
$$page_content .= '</table></div>';
}
} # sub do_search_contents
if ($suite eq "experimental") {
note( gettext( "Experimental package"),
- gettext( "Warning: This package is from the <span class=\"pred\">experimental</span> distribution. That means it is likely unstable or buggy, and it may even cause data loss. If you ignore this warning and install it nevertheless, you do it on your own risk.")."</p><p>".
+ gettext( "Warning: This package is from the <strong>experimental</strong> distribution. That means it is likely unstable or buggy, and it may even cause data loss. If you ignore this warning and install it nevertheless, you do it on your own risk.")."</p><p>".
gettext( "Users of experimental packages are encouraged to contact the package maintainers directly in case of problems." )
);
}
$package_page .= "<div id=\"pdeps\">\n";
$package_page .= sprintf( "<h2>".gettext( "Other Packages Related to %s" )."</h2>\n", $pkg );
if ($suite eq "experimental") {
- note( gettext( "Note that the \"<span class=\"pred\">experimental</span>\" distribution is not self-contained; missing dependencies are likely found in the \"<a href=\"/unstable/\">unstable</a>\" distribution." ) );
+ note( gettext( "Note that the <strong>experimental</strong> distribution is not self-contained; missing dependencies are likely found in the <a href=\"/unstable/\">unstable</a> distribution." ) );
}
$package_page .= pdeplegend( [ 'dep', gettext( 'depends' ) ],
$package_page .= "<div id=\"pdownload\">";
$package_page .= sprintf( "<h2>".gettext( "Download %s\n" )."</h2>",
$pkg ) ;
- $package_page .= "<table border=\"1\" summary=\"".gettext("The download table links to the download of the package and a file overview. In addition it gives information about the package size and the installed size.")."\">\n";
+ $package_page .= "<table summary=\"".gettext("The download table links to the download of the package and a file overview. In addition it gives information about the package size and the installed size.")."\">\n";
$package_page .= "<caption class=\"hidecss\">".gettext("Download for all available architectures")."</caption>\n";
$package_page .= "<tr>\n";
$package_page .= "<th>".gettext("Architecture")."</th><th>".gettext("Files")."</th><th>".gettext( "Package Size")."</th><th>".gettext("Installed Size")."</th></tr>\n";
} else {
$package_page .= gettext( "no current information" );
}
- $package_page .= "</td>\n<td align=right>"; #FIXME: css
+ $package_page .= '</td><td class="size">';
$package_page .= floor(($sizes_deb->{$a}/102.4)+0.5)/10 . " kB";
- $package_page .= "</td>\n<td align=right>"; #FIXME: css
+ $package_page .= '</td><td class="size">';
$package_page .= $sizes_inst->{$a} . " kB";
$package_page .= "</td>\n</tr>";
}
my $source_files = $page->get_src( 'files' );
my $source_dir = $page->get_src( 'directory' );
- $package_page .= sprintf( "<table cellspacing=\"0\" cellpadding=\"2\" summary=\"Download information for the files of this source package\">\n"
+ $package_page .= sprintf( "<table summary=\"Download information for the files of this source package\">\n"
."<tr><th>%s</th><th>%s</th><th>%s</th>",
gettext("File"),
gettext("Size (in kB)"),
$src_url .= "/$source_dir/$src_file_name";
$package_page .= "<tr><td><a href=\"$src_url\">$src_file_name</a></td>\n"
- ."<td class=\"dotalign\">".sprintf("%.1f", (floor(($src_file_size/102.4)+0.5)/10))."</td>\n"
- ."<td>$src_file_md5</td></tr>";
+ ."<td>".sprintf("%.1f", (floor(($src_file_size/102.4)+0.5)/10))."</td>\n"
+ ."<td class=\"md5sum\">$src_file_md5</td></tr>";
}
$package_page .= "</table>\n";
$package_page .= "</div> <!-- end pdownload -->\n";
}
sub marker {
- return "[<span class=\"pred\">$_[0]</span>]";
+ return "[<strong class=\"pmarker\">$_[0]</strong>]";
}
sub pdesc {
}
sub pdeplegend {
- my $str = "<table border=\"1\" summary=\"legend\"><tr>\n";
+ my $str = "<table id=\"pdeplegend\" summary=\"legend\"><tr>\n";
foreach my $entry (@_) {
$str .= "<td><img src=\"$ROOT/Pics/$entry->[0].gif\" alt=\"[$entry->[0]]\" width=\"16\" height=\"16\">= $entry->[1]</td>";
$DESC_LINE
$meta
<link href="$ROOT/debian.css" rel="stylesheet" type="text/css" media="all">
+<link href="$ROOT/packages.css" rel="stylesheet" type="text/css" media="all">
</head>
<body>
<div id="header">
#cdlogo {
}
-#hpacketsearch {
- display: block;
- padding-top: 1px;
- padding-left: 5px;
- margin-right: 0.2em;
- margin-left: auto;
- text-align: left;
- width: 25em;
- top: 0em;
- right: 0em;
-}
-
-#hpacketsearch p small {
- color: #990000;
- font-size: 0.8em;
- font-weight: normal;
-}
-
-#hpacketsearch p select {
- font-size: 88%;
-}
-
-#hpacketsearch p input {
- font-size: 88%;
-}
-
#navbar {
/* margin-top: 1em; */
clear: both;
margin: 0;
padding: 0;
}
-/* classes and div names for package pages */
-
-#pdesc, #pdeps, #pdownload, #pmoreinfo {
- margin-left: 1em;
- margin-right: 1em;
-}
-
-#pdesc p {
- text-align: justify;
-}
-
-.pdescshort {
- text-align: left;
- font-size: large;
- font-weight: bold;
-}
-
-#pdeps table tr td {
- font-size: 0.9em;
-}
-
-#pdeps ul {
- list-style-type: none;
- padding-left: 2em;
-}
-
-#pdeps li {
- text-indent: -2em;
-}
-
-#pdeps ul.uldep, #pdeps ul.uladep {
- list-style-type: disc;
- list-style-image: url(http://packages.debian.org/Pics/dep.gif);
-}
-
-#pdeps ul.ulrec, #pdeps ul.ulidep {
- list-style-type: disc;
- list-style-image: url(http://packages.debian.org/Pics/rec.gif);
-}
-
-#pdeps ul.ulsug {
- list-style-type: disc;
- list-style-image: url(http://packages.debian.org/Pics/sug.gif);
-}
-
-#pdeps ul.uldep li, #pdeps ul.ulrec li, #pdeps ul.ulsug li, #pdeps ul.uladep li, #pdeps ul.ulidep li {
- padding-left: 2em;
-}
-#pdeps dl {
- margin: 0;
-}
-
-#pdownload p, #pdownload form, #pdownload submit {
- display: inline;
-}
-
-#pdownload td {
- font-size: 0.85em;
- text-align: center;
-}
-
-#pmoreinfo p {
- font-size: 0.85em;
-}
-
/* colors for packages, warnings and news in ports */
-.pred, .warning, dt.new, .no {
+.warning, dt.new, .no {
color: red; /* FF0000 */
}
.psmalltrademark {
color: green;
}
-#pdownload table, table.ridgetable, table.reltable {
+table.ridgetable, table.reltable {
border-width: 4px;
border-color: gray;
margin: 0 1em 1em 1em;
border-style: ridge;
border-collapse: collapse;
}
-#pcontentsres table {
- margin: 0 1em 1em 1em;
- min-width: 50%;
- border: 2px gray;
- border-style: ridge;
- border-collapse: collapse;
-}
table.vote {
margin: 0 auto;
border-width: 3px;
border-style: ridge;
padding: 0.1em;
}
-#pcontentsres td.file {
- font-family: monospace;
-}
-#pcontentsres td {
-/* font-size: smaller;*/
- padding: .4em;
-}
table.reltable th {
background-color: #44CCCC;
}
--- /dev/null
+#hpacketsearch {
+ display: block;
+ padding-top: 1px;
+ padding-left: 5px;
+ margin-right: 0.2em;
+ margin-left: auto;
+ text-align: left;
+ width: 25em;
+ top: 0em;
+ right: 0em;
+}
+
+#hpacketsearch p small {
+ color: #990000;
+ font-size: 0.8em;
+ font-weight: normal;
+}
+
+#hpacketsearch p select {
+ font-size: 88%;
+}
+
+#hpacketsearch p input {
+ font-size: 88%;
+}
+
+/* classes and div names for package pages */
+
+#pdesc, #pdeps, #pdownload, #pmoreinfo {
+ margin-left: 1em;
+ margin-right: 1em;
+}
+
+#pdesc p {
+ text-align: justify;
+}
+
+.pdescshort {
+ text-align: left;
+ font-size: large;
+ font-weight: bold;
+}
+
+#pdeps table tr td {
+ font-size: 0.9em;
+}
+
+#pdeps ul {
+ list-style-type: none;
+ padding-left: 2em;
+}
+
+#pdeps li {
+ text-indent: -2em;
+}
+
+#pdeps ul.uldep, #pdeps ul.uladep {
+ list-style-type: disc;
+ list-style-image: url(http://packages.debian.org/Pics/dep.gif);
+}
+
+#pdeps ul.ulrec, #pdeps ul.ulidep {
+ list-style-type: disc;
+ list-style-image: url(http://packages.debian.org/Pics/rec.gif);
+}
+
+#pdeps ul.ulsug {
+ list-style-type: disc;
+ list-style-image: url(http://packages.debian.org/Pics/sug.gif);
+}
+
+#pdeps ul.uldep li, #pdeps ul.ulrec li, #pdeps ul.ulsug li, #pdeps ul.uladep li, #pdeps ul.ulidep li {
+ padding-left: 2em;
+}
+#pdeps dl {
+ margin: 0;
+}
+
+#pdownload p {
+ display: inline;
+}
+
+
+#pmoreinfo p {
+ font-size: 0.85em;
+}
+
+.pmarker {
+ color: red;
+}
+.perror {
+ margin: .2em;
+ background-color: #F99;
+ font-weight: bold;
+ padding: 0.5em;
+ margin: 0;
+}
+.pdebug {
+ margin: .2em;
+ font-size: 80%;
+ border: solid thin gray;
+}
+.phints {
+ background-color: #FF9;
+ padding: 0.5em;
+ margin: 0;
+}
+.pnotes {
+ margin: .2em;
+ border: solid thin black;
+ background-color: #bdf;
+}
+.pnotes h2 {
+ color: red;
+}
+
+table#pdeplegend, #pdownload table {
+ border-width: 4px;
+ border-color: gray;
+ margin: 0 1em 1em 1em;
+ border-style: ridge;
+ border-collapse: collapse;
+}
+
+#pcontentsres table {
+ margin: 0 1em 1em 1em;
+ min-width: 50%;
+ border: 2px gray;
+ border-style: ridge;
+ border-collapse: collapse;
+}
+#pcontentsres col, #pcontentsres th, #pdownload th, #pdownload td,
+ #pdeplegend td {
+ border: 2px #BFC3DC;
+ border-style: ridge;
+ padding: 0.1em;
+}
+#pcontentsres td.file {
+ font-family: monospace;
+}
+#pdownload td {
+ font-size: 0.85em;
+ text-align: center;
+}
+
+#pdownload td.size {
+ text-align: right;
+}
+#pdownload td.md5sum {
+ font-family: monospace;
+}
+#pcontentsres td {
+/* font-size: smaller;*/
+ padding: .4em;
+}
+#pcontentsres th {
+ text-align: center;
+}
+#psearchres h2 {
+ padding: .3em;
+ border-top: solid gray thin;
+ border-bottom: solid gray thin;
+ background-color: #bdf;
+}
+#pfilelist pre {
+ border-top: solid #BFC3DC thin;
+ padding: .5em;
+}