]> git.sesse.net Git - ffmpeg/blob - doc/t2h.init
Merge commit 'dcb7c868ec7af7d3a138b3254ef2e08f074d8ec5'
[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 my $TEMPLATE_HEADER1 = $ENV{"FFMPEG_HEADER1"} || <<EOT;
8 <!DOCTYPE html>
9 <html lang="en">
10   <head>
11     <meta charset="utf-8" />
12     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
13     <title>FFmpeg documentation</title>
14     <link rel="stylesheet" href="style.min.css" />
15 EOT
16
17 my $TEMPLATE_HEADER2 = $ENV{"FFMPEG_HEADER2"} || <<EOT;
18   </head>
19   <body>
20     <div style="width: 95%; margin: auto">
21 EOT
22
23 my $TEMPLATE_FOOTER = $ENV{"FFMPEG_FOOTER"} || <<EOT;
24     </div>
25   </body>
26 </html>
27 EOT
28
29 $SMALL_RULE = '';
30 $BODYTEXT = '';
31
32 $print_page_foot = \&FFmpeg_print_page_foot;
33 sub FFmpeg_print_page_foot($$)
34 {
35     my $fh = shift;
36     my $program_string = defined &T2H_DEFAULT_program_string ?
37         T2H_DEFAULT_program_string() : program_string();
38     print $fh '<footer class="footer pagination-right">' . "\n";
39     print $fh '<span class="label label-info">' . $program_string;
40     print $fh "</span></footer></div></div></body>\n";
41 }
42
43 $float = \&FFmpeg_float;
44
45 sub FFmpeg_float($$$$)
46 {
47     my $text = shift;
48     my $float = shift;
49     my $caption = shift;
50     my $shortcaption = shift;
51
52     my $label = '';
53     if (exists($float->{'id'}))
54     {
55         $label = &$anchor($float->{'id'});
56     }
57     my $class = '';
58     my $subject = '';
59
60     if ($caption =~ /NOTE/)
61     {
62         $class = "alert alert-info";
63     }
64     elsif ($caption =~ /IMPORTANT/)
65     {
66         $class = "alert alert-warning";
67     }
68
69     return '<div class="float ' . $class . '">' . "$label\n" . $text . '</div>';
70 }
71
72 $print_page_head = \&FFmpeg_print_page_head;
73 sub FFmpeg_print_page_head($$)
74 {
75     my $fh = shift;
76     my $longtitle = "$Texi2HTML::THISDOC{'fulltitle_no_texi'}";
77     $longtitle .= ": $Texi2HTML::NO_TEXI{'This'}" if exists $Texi2HTML::NO_TEXI{'This'};
78     my $description = $DOCUMENT_DESCRIPTION;
79     $description = $longtitle if (!defined($description));
80     $description = "<meta name=\"description\" content=\"$description\">" if
81          ($description ne '');
82     $description = $Texi2HTML::THISDOC{'documentdescription'} if (defined($Texi2HTML::THISDOC{'documentdescription'}));
83     my $encoding = '';
84     $encoding = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$ENCODING\">" if (defined($ENCODING) and ($ENCODING ne ''));
85     $longtitle =~ s/Documentation.*//g;
86     $longtitle = "FFmpeg documentation : " . $longtitle;
87
88     print $fh <<EOT;
89 $TEMPLATE_HEADER1
90 $description
91 <meta name="keywords" content="$longtitle">
92 <meta name="Generator" content="$Texi2HTML::THISDOC{program}">
93 $Texi2HTML::THISDOC{'copying'}<!-- Created on $Texi2HTML::THISDOC{today} by $Texi2HTML::THISDOC{program} -->
94 <!--
95 $Texi2HTML::THISDOC{program_authors}
96 -->
97 $encoding
98 $TEMPLATE_HEADER2
99 EOT
100 }
101
102 $print_page_foot = \&FFmpeg_print_page_foot;
103 sub FFmpeg_print_page_foot($$)
104 {
105     my $fh = shift;
106     print $fh <<EOT;
107 $TEMPLATE_FOOTER
108 EOT
109 }
110
111 # declare encoding in header
112 $IN_ENCODING = $ENCODING = "utf-8";
113
114 # no navigation elements
115 $SECTION_NAVIGATION = 0;
116 # the same for texi2html 5.0
117 $HEADERS = 0;
118
119 # TOC and Chapter headings link
120 $TOC_LINKS = 1;
121
122 # print the TOC where @contents is used
123 $INLINE_CONTENTS = 1;