Changeset 38

Show
Ignore:
Timestamp:
03/06/07 23:30:50 (3 years ago)
Author:
eevee
Message:

New bbcode tags: [h] (highlight), [quote], and [center]. Not retroactive.

Location:
veekun/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/lib/Vee/BBCode.pm

    r1 r38  
    3737    u       => { param => 0, start => '<span class="bbcode_u">', end => '</span>' }, 
    3838    s       => { param => 0, start => '<span class="bbcode_s">', end => '</span>' }, 
     39    h       => { param => 0, start => '<span class="bbcode_h">', end => '</span>' }, 
    3940    color   => { param => 2, strip_quotes => 1, start => sub { 
    4041        my $color = shift; 
     
    5253    img     => { param => 1, strip_quotes => 1, raw => 1, start => sub { $_[0] ? qq'<img src="$_[0]" alt="' : '<img alt="" src="' }, end => '" class="bbcode_img"/>' }, 
    5354    code    => { param => 1, raw => 1, start => sub { '<span class="bbcode_code_header">' . ($_[0] ? "Code for $_[0]" : 'Code') . ':</span><span class="bbcode_code">' }, end => '</span>' }, 
     55    quote   => { param => 1, start => sub { '<fieldset class="bbcode_quote"><legend class="bbcode_quote_header">' . ($_[0] ? "Quote from $_[0]" : 'Quote') . ':</legend>' }, end => '</fieldset>' }, 
    5456    mono    => { param => 1, start => '<span class="bbcode_prop">', end => '</span>' }, 
    5557    raw     => { param => 1, raw => 1, start => '', end => '' }, 
    5658    hr      => { param => 0, no_close => 1, start => '<hr class="bbcode_hr"/>' }, 
     59    center  => { param => 0, no_close => 0, start => '<div class="bbcode_center">', end => '</div>' }, 
    5760#    list    => { param => 1, contents => { '*' => 1 }, }, 
    5861#    '*'     => { param => 0, container => { list => 1 }, self_closing => 1, }, 
  • veekun/trunk/root/style/bbcode.css

    r1 r38  
    11.bbcode_u { text-decoration: underline; } 
    22.bbcode_s { text-decoration: line-through; } 
     3.bbcode_h { outline: 2px solid gold; -moz-outline-radius: 4px; } 
    34.bbcode_code_header { display: block; margin: 4px 16px 0 16px; } 
    45.bbcode_code { display: block; margin: 0 16px 4px 16px; color: #ffe090; font-weight: normal; font-style: normal; font-size: 11px; font-family: monospace; border: 1px solid gray; } 
     6.bbcode_quote_header { margin-left: 12px; background: #406090; background: rgba(100%, 100%, 100%, .1); padding: 0 4px; -moz-border-radius-topleft: 8px; -moz-border-radius-topright: 8px; } 
     7.bbcode_quote { border: 1px solid black; background: #406090; background: rgba(100%, 100%, 100%, .1); } 
    58.bbcode_prop { font-family: monospace; } 
     9.bbcode_center { text-align: center; }