Commits

Anonymous committed 5404c95

HTML / CSS tweaks to get all the images aligned.

Comments (0)

Files changed (2)

lib/Shlomif/Homepage/News.pm

     {
         $title = $1;
     }
+
+=begin Removed
+
+Removing because we no longer want such excessive "newsitem" classes in the
+text.
+
     $text =~ s!<p>!<p class="newsitem">!g;
     $text =~ s!<ol>!<ol class="newsitem">!g;
     $text =~ s!<ul>!<ul class="newsitem">!g;
+=end Removed
+
+=cut
+
     $filename =~ /^(\d{4})-(\d{2})-(\d{2})\.html$/;
     my ($y, $m, $d) = ($1, $2, $3);
     my $date = DateTime->new(year => $y, month => $m, day => $d);
     my $item = shift;
 
     my $title = $item->{title};
-    return "<h3 class=\"newsitem\">" . $item->{'date'}
+    return qq{<div class="news_item"><h3 class="newsitem">} . $item->{'date'}
         . (defined($title) ? ": $title" : "")
         . "</h3>\n\n"
         . $item->{'body'}
+        . qq{\n</div>\n}
         ;
 }
 

lib/newsitem.css.ttml

 /* h3.newsitem { text-indent: 3em } */
+[% IF 0 %]
 p.newsitem, ol.newsitem, ul.newsitem { margin-left : 3em }
 .newsitem p, .newsitem ol, .newsitem ul
 {
     margin-left: 0.5em;
 }
+[% END -%]
+.news_item
+{
+    margin-left: 3em;
+}