Permalink
Browse files

improved design

  • Loading branch information...
1 parent 6f12ef3 commit 5b5ac011793aaedcebc89ebe11de9bf22b527d70 @ap0calypse committed Mar 7, 2012
Showing with 106 additions and 8 deletions.
  1. +9 −8 bzg
  2. +97 −0 examples/style-improved.css
View
@@ -777,12 +777,12 @@ sub generate_file {
if ($line =~ m/\[CONTENT\]/gmx) {
if ($type ne "tags") {
$line =~ s/\[CONTENT\]//gmx;
- $line .= "<h2>$BZG_HASH->{$type}{$id}{'title'}</h2>";
+ $line .= "<div class='onecont'><h2>$BZG_HASH->{$type}{$id}{'title'}</h2>";
$line .= convert_text($BZG_HASH->{$type}{$id}{'text'}, $id);
}
else {
$line =~ s/\[CONTENT\]//gmx;
- $line .= "<h2>Articles with tag: $id</h2>";
+ $line .= "<div class='onecont'><h2>Articles with tag: $id</h2>";
for (@{$TAG_HASH{$id}}) {
my $dirstring = $BZG_HASH->{'articles'}{$_}{'title'};
($year, $month, $day) = split (/-/, $BZG_HASH->{'articles'}{$_}{'date'});
@@ -800,18 +800,19 @@ sub generate_file {
$BZG_HASH->{'articles'}{$_}{'title'} .
"</a></p>" unless $line eq 'articles';
}
+ $line .= "</div>";
}
if ($type eq 'articles') {
$line .= "<div class='b_art_info'>posted by " . $BZG_HASH->{$type}{$id}{'author'} .
" in " . join(", ", split / /, $BZG_HASH->{$type}{$id}{'tags'}) . " on <i>" .
$BZG_HASH->{$type}{$id}{'date'} . " " . $BZG_HASH->{$type}{$id}{'time'} .
- "</i></div>";
+ "</i></div></div>";
}
elsif ($type eq 'pages') {
$line .= "<div class='b_art_info'>posted by " . $BZG_HASH->{$type}{$id}{'author'} .
" on <i>" .
$BZG_HASH->{$type}{$id}{'date'} . " " . $BZG_HASH->{$type}{$id}{'time'} .
- "</i></div>";
+ "</i></div></div>";
}
}
@@ -892,12 +893,12 @@ sub generate_index {
$dirstring =~ s/ +/-/g;
$dirstring =~ s/[^a-z0-9A-Z-]//g;
$dirstring = lc(substr($dirstring, 0, 30));
- $line .= "<h2><a href='./articles/$year/$month/$day/$dirstring.html'>$BZG_HASH->{'articles'}{$id}{'title'}</a></h2>";
+ $line .= "<div class='onecont'><h2><a href='./articles/$year/$month/$day/$dirstring.html'>$BZG_HASH->{'articles'}{$id}{'title'}</a></h2>";
$line .= convert_text($BZG_HASH->{'articles'}{$id}{'text'}, $id, "index");
$line .= "<div class='b_art_info'>posted by " . $BZG_HASH->{'articles'}{$id}{'author'} .
" in " . join(", ", split / /, $BZG_HASH->{'articles'}{$id}{'tags'}) . " on <i>" .
$BZG_HASH->{'articles'}{$id}{'date'} . " " . $BZG_HASH->{'articles'}{$id}{'time'} .
- "</i></div>";
+ "</i></div></div>";
}
}
}
@@ -1031,8 +1032,8 @@ sub convert_text {
}
elsif ($in_code) {
$_ =~ s/'/´/gmx;
- $finaltext .= `echo '$_' | highlight -s 'vampire' -I -f -l -m $line_number --inline-css -S $code_lang` if $want_ln;
- $finaltext .= `echo '$_' | highlight -s 'vampire' -I -f --inline-css -S $code_lang` unless $want_ln;
+ $finaltext .= `echo '$_' | highlight -s 'bclear' -I -f -l -m $line_number --inline-css -S $code_lang` if $want_ln;
+ $finaltext .= `echo '$_' | highlight -s 'bclear' -I -f --inline-css -S $code_lang` unless $want_ln;
$line_number++;
}
elsif ($in_gnuplot) {
@@ -0,0 +1,97 @@
+body {
+ font-family: monospace, Verdana, Arial, Helvetica, sans-serif;
+ font-size: 14px;
+ background-color: #ccc;
+ color: #222;
+}
+
+div.content h2 {
+ padding-top: 15px;
+}
+
+a, a:active, a:visited {
+ color: #000;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #555;
+ text-decoration: none;
+}
+
+
+div.onecont {
+ float: left;
+ border: solid 1px #222;
+ padding: 10px;
+ width: 725px;
+ margin-bottom: 10px;
+}
+
+div.heading {
+ padding: 10px;
+ margin-left: 50px;
+ margin-right: auto;
+ margin-bottom: 10px;
+ width: 950px;
+ height: 80px;
+ border: solid 1px #222;
+}
+
+div.rss {
+ float: right;
+ text-align: right;
+}
+
+pre.sourcecode {
+ border: solid 1px #aaa;
+ padding: 5px;
+ background: #bbb;
+}
+
+div.b_art_info {
+ font-size: 10px;
+ background-color: #ddd;
+ color: #222;
+ border: solid 1px #aaa;
+ padding: 4px;
+}
+
+
+div.menu {
+ float: left;
+ width: 190px;
+ height: 500px;
+ border: solid 1px #222;
+ padding: 10px;
+}
+
+div.menupoint {
+ border: solid 1px #aaa;
+ padding: 5px;
+ background: #ddd;
+ font-size: 12px;
+ color: #000;
+ font-weight: bold;
+}
+
+div.content {
+ margin-left: 10px;
+ float: left;
+ width: 725px;
+ min-height: 500px;
+}
+
+div.main {
+ margin-left: 50px;
+ margin-right: auto;
+ width: 970px;
+}
+
+div.code {
+ margin-left: 10px;
+ margin-right: 10px;
+ background-color: #eee;
+ padding: 5px;
+ border: solid 1px #222;
+}

0 comments on commit 5b5ac01

Please sign in to comment.