* Moving hardcoded styles into CSS.
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Thu, 21 Apr 2005 20:56:55 +0000 (20:56 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Thu, 21 Apr 2005 20:56:55 +0000 (20:56 +0000)
includes/ImagePage.php
skins/monobook/main.css

index 582b4c1..50c9378 100644 (file)
@@ -65,16 +65,13 @@ class ImagePage extends Article {
                if ( count ( $exif ) == 1 && isset ( $exif["EXIF"] ) && $exif["EXIF"] == "NO" ) return ; # This image does not have EXIF data
                
                # Create the table
-               $r = "<table border='1' cellspacing='0' cellpadding='0' align='right'>" ;
-               $r .= "<caption>EXIF data</caption>" ;
+               $exifdata = wfMsg( 'exifdata' );
+               $r = "\n<table class='exif'>\n" ;
+               $r .= "<caption>$exifdata</caption>\n" ;
                foreach ( $exif AS $k => $v ) {
-                       $r .= "<tr>" ;
-                       $v = str_replace ( "\0" , "" , $v ) ;
-                       $r .= "<th><small>" . htmlspecialchars ( $k ) . "</small></th>" ;
-                       $r .= "<td><small>" . htmlspecialchars ( $v ) . "</small></td>" ;
-                       $r .= "</tr>" ;
-                       }
-               $r .= "</table>" ;
+                       $r .= '<tr><th>' . htmlspecialchars ( $k ) . '</th><td>' . htmlspecialchars ( $v ) . "</td></tr>\n";
+               }
+               $r .= '</table>';
                $wgOut->addHTML ( $r ) ;
                }
 
index c4ac547..e948e82 100644 (file)
@@ -1108,3 +1108,28 @@ li span.deleted {
        color: #888;
        font-style: italic;
 }
+
+/* Classes for EXIF data display */
+table.exif {
+       border: 1px solid gray;
+       background-color: #ffffff;
+       padding: 3px;
+       margin-left: 0.5em;
+       float: right;
+       font-size: small;
+       text-align: center;
+}
+
+table.exif caption {
+       font-weight: bold;
+}
+
+table.exif th {
+       font-size: small;
+       font-weight: bold;
+}
+
+table.exif td {
+       font-size: small;
+       font-style: italic;
+}