]> git.sesse.net Git - ffmpeg/blob - doc/t2h.init
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / doc / t2h.init
1 # no horiz rules between sections
2 $end_section = \&FFmpeg_end_section;
3 sub FFmpeg_end_section($$)
4 {
5 }
6
7 $EXTRA_HEAD =
8 '<link rel="icon" href="favicon.png" type="image/png" />
9 ';
10
11 $CSS_LINES = $ENV{"FFMPEG_CSS"} || <<EOT;
12 <link rel="stylesheet" type="text/css" href="default.css" />
13 EOT
14
15 my $TEMPLATE_HEADER = $ENV{"FFMPEG_HEADER"} || <<EOT;
16 <link rel="icon" href="favicon.png" type="image/png" />
17 </head>
18 <body>
19 <div id="container">
20 EOT
21
22 $PRE_BODY_CLOSE = '</div></div>';
23
24 $SMALL_RULE = '';
25 $BODYTEXT = '';
26
27 $print_page_foot = \&FFmpeg_print_page_foot;
28 sub FFmpeg_print_page_foot($$)
29 {
30     my $fh = shift;
31     my $program_string = defined &T2H_DEFAULT_program_string ?
32         T2H_DEFAULT_program_string() : program_string();
33     print $fh '<footer class="footer pagination-right">' . "\n";
34     print $fh '<span class="label label-info">' . $program_string;
35     print $fh "</span></footer></div>\n";
36 }
37
38 $float = \&FFmpeg_float;
39
40 sub FFmpeg_float($$$$)
41 {
42     my $text = shift;
43     my $float = shift;
44     my $caption = shift;
45     my $shortcaption = shift;
46
47     my $label = '';
48     if (exists($float->{'id'}))
49     {
50         $label = &$anchor($float->{'id'});
51     }
52     my $class = '';
53     my $subject = '';
54
55     if ($caption =~ /NOTE/)
56     {
57         $class = "alert alert-info";
58     }
59     elsif ($caption =~ /IMPORTANT/)
60     {
61         $class = "alert alert-warning";
62     }
63
64     return '<div class="float ' . $class . '">' . "$label\n" . $text . '</div>';
65 }
66
67 $print_page_head = \&FFmpeg_print_page_head;
68 sub FFmpeg_print_page_head($$)
69 {
70     my $fh = shift;
71     my $longtitle = "$Texi2HTML::THISDOC{'title_no_texi'}";
72     $longtitle .= ": $Texi2HTML::NO_TEXI{'This'}" if exists $Texi2HTML::NO_TEXI{'This'};
73     my $description = $DOCUMENT_DESCRIPTION;
74     $description = $longtitle if (!defined($description));
75     $description = "<meta name=\"description\" content=\"$description\">" if
76          ($description ne '');
77     $description = $Texi2HTML::THISDOC{'documentdescription'} if (defined($Texi2HTML::THISDOC{'documentdescription'}));
78     my $encoding = '';
79     $encoding = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$ENCODING\">" if (defined($ENCODING) and ($ENCODING ne ''));
80     $longtitle =~ s/Documentation.*//g;
81     $longtitle = "FFmpeg documentation : " . $longtitle;
82
83     print $fh <<EOT;
84 <!DOCTYPE html>
85 <html>
86 $Texi2HTML::THISDOC{'copying'}<!-- Created on $Texi2HTML::THISDOC{today} by $Texi2HTML::THISDOC{program} -->
87 <!--
88 $Texi2HTML::THISDOC{program_authors}
89 -->
90 <head>
91 <title>$longtitle</title>
92
93 $description
94 <meta name="keywords" content="$longtitle">
95 <meta name="resource-type" content="document">
96 <meta name="distribution" content="global">
97 <meta name="Generator" content="$Texi2HTML::THISDOC{program}">
98 $encoding
99 $CSS_LINES
100 $TEMPLATE_HEADER
101 EOT
102 }
103
104 # declare encoding in header
105 $IN_ENCODING = $ENCODING = "utf-8";
106
107 # no navigation elements
108 $SECTION_NAVIGATION = 0;
109 # the same for texi2html 5.0
110 $HEADERS = 0;
111
112 # TOC and Chapter headings link
113 $TOC_LINKS = 1;
114
115 # print the TOC where @contents is used
116 $INLINE_CONTENTS = 1;