From c1f5da698bdc3216ac3be67ca2b6f0323b7be885 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Sat, 3 Dec 2011 23:24:50 +0100 Subject: doc: provide fallback css and customize @float Add "note" or "important" class to the generated div. --- doc/t2h.init | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) (limited to 'doc/t2h.init') diff --git a/doc/t2h.init b/doc/t2h.init index 7c35cd8c53..d91d7b6bff 100644 --- a/doc/t2h.init +++ b/doc/t2h.init @@ -9,6 +9,63 @@ $EXTRA_HEAD = '; +$CSS_LINES = < + + +EOT my $LIBAV_NAVBAR = $ENV{"LIBAV_NAVBAR"} || ''; @@ -31,6 +88,35 @@ sub Libav_print_page_foot($$) print $fh "\n"; } +$float = \&Libav_float; + +sub Libav_float($$$$) +{ + my $text = shift; + my $float = shift; + my $caption = shift; + my $shortcaption = shift; + + my $label = ''; + if (exists($float->{'id'})) + { + $label = &$anchor($float->{'id'}); + } + my $class = ''; + my $subject = ''; + + if ($caption =~ /NOTE/) + { + $class = "note"; + } + elsif ($caption =~ /IMPORTANT/) + { + $class = "important"; + } + + return '
' . "$label\n" . $text . '
'; +} + $print_page_head = \&Libav_print_page_head; sub Libav_print_page_head($$) { -- cgit v1.2.3