]> git.deb.at Git - deb/packages.git/blobdiff - lib/Packages/CGI.pm
Big CSS cleanup, move all style definitions to CSS files.
[deb/packages.git] / lib / Packages / CGI.pm
index b2b261db705b7c009b9cb62c2534b2c3ed4039a7..e15e510f017edd512b27cb53426825844a524be4 100644 (file)
@@ -31,14 +31,11 @@ sub msg {
     push @msgs, $_[0];
 }
 sub note {
-    push @notes, $_[0];
-}
-sub notes {
     push @notes, [ @_ ];
 }
 sub print_errors {
     return unless @fatal_errors || @errors;
-    print '<div style="background-color:#F99;font-weight:bold;padding:0.5em;margin:0;">';
+    print '<div class="perror">';
     foreach ((@fatal_errors, @errors)) {
        print "<p>ERROR: $_</p>";
     }
@@ -46,7 +43,7 @@ sub print_errors {
 }
 sub print_debug {
     return unless $debug && @debug;
-    print '<div style="font-size:80%;border:solid thin grey">';
+    print '<div class="pdebug">';
     print '<h2>Debugging:</h2><pre>';
     foreach (@debug) {
        print "$_\n";
@@ -55,29 +52,30 @@ sub print_debug {
 }
 sub print_hints {
     return unless @hints;
-    print '<div>';
+    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 ) = @$_;
-       my $str = "";
 
+       print '<div class="pnotes">';
        if ($note) {
-           $str .= "<h2 class=\"pred\">$title</h2>";
+           print "<h2>$title</h2>";
        } else {
            $note = $title;
        }
-       $str .= "<p>$note</p>";
-       return $str;
+       print "<p>$note</p></div>";
     }
 }