t2h.init 3.26 KB
Newer Older
1 2 3 4
# Init file for texi2html.

# This is deprecated, and the makeinfo/texi2any version is doc/t2h.pm

5
# no horiz rules between sections
6 7
$end_section = \&FFmpeg_end_section;
sub FFmpeg_end_section($$)
8 9 10
{
}

11 12 13 14 15 16 17
my $TEMPLATE_HEADER1 = $ENV{"FFMPEG_HEADER1"} || <<EOT;
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>FFmpeg documentation</title>
18
    <link rel="stylesheet" href="bootstrap.min.css" />
19
    <link rel="stylesheet" href="style.min.css" />
20
EOT
21

22 23 24
my $TEMPLATE_HEADER2 = $ENV{"FFMPEG_HEADER2"} || <<EOT;
  </head>
  <body>
Josh de Kock's avatar
Josh de Kock committed
25
    <div class="container">
26
EOT
27

28 29 30 31 32
my $TEMPLATE_FOOTER = $ENV{"FFMPEG_FOOTER"} || <<EOT;
    </div>
  </body>
</html>
EOT
33 34 35 36

$SMALL_RULE = '';
$BODYTEXT = '';

37 38
$print_page_foot = \&FFmpeg_print_page_foot;
sub FFmpeg_print_page_foot($$)
39 40
{
    my $fh = shift;
41 42
    my $program_string = defined &T2H_DEFAULT_program_string ?
        T2H_DEFAULT_program_string() : program_string();
43 44
    print $fh '<footer class="footer pagination-right">' . "\n";
    print $fh '<span class="label label-info">' . $program_string;
45
    print $fh "</span></footer></div></div></body>\n";
46 47
}

48
$float = \&FFmpeg_float;
49

50
sub FFmpeg_float($$$$)
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
{
    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/)
    {
67
        $class = "alert alert-info";
68 69 70
    }
    elsif ($caption =~ /IMPORTANT/)
    {
71
        $class = "alert alert-warning";
72 73 74 75 76
    }

    return '<div class="float ' . $class . '">' . "$label\n" . $text . '</div>';
}

77 78
$print_page_head = \&FFmpeg_print_page_head;
sub FFmpeg_print_page_head($$)
79 80
{
    my $fh = shift;
81
    my $longtitle = "$Texi2HTML::THISDOC{'fulltitle_no_texi'}";
82 83 84 85 86 87 88 89 90
    $longtitle .= ": $Texi2HTML::NO_TEXI{'This'}" if exists $Texi2HTML::NO_TEXI{'This'};
    my $description = $DOCUMENT_DESCRIPTION;
    $description = $longtitle if (!defined($description));
    $description = "<meta name=\"description\" content=\"$description\">" if
         ($description ne '');
    $description = $Texi2HTML::THISDOC{'documentdescription'} if (defined($Texi2HTML::THISDOC{'documentdescription'}));
    my $encoding = '';
    $encoding = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$ENCODING\">" if (defined($ENCODING) and ($ENCODING ne ''));
    $longtitle =~ s/Documentation.*//g;
91
    $longtitle = "FFmpeg documentation : " . $longtitle;
92 93

    print $fh <<EOT;
94 95 96 97
$TEMPLATE_HEADER1
$description
<meta name="keywords" content="$longtitle">
<meta name="Generator" content="$Texi2HTML::THISDOC{program}">
98 99 100 101 102
$Texi2HTML::THISDOC{'copying'}<!-- Created on $Texi2HTML::THISDOC{today} by $Texi2HTML::THISDOC{program} -->
<!--
$Texi2HTML::THISDOC{program_authors}
-->
$encoding
103 104 105 106 107 108 109 110 111 112
$TEMPLATE_HEADER2
EOT
}

$print_page_foot = \&FFmpeg_print_page_foot;
sub FFmpeg_print_page_foot($$)
{
    my $fh = shift;
    print $fh <<EOT;
$TEMPLATE_FOOTER
113
EOT
114 115
}

116 117 118
# declare encoding in header
$IN_ENCODING = $ENCODING = "utf-8";

119 120 121 122 123 124 125 126 127 128
# no navigation elements
$SECTION_NAVIGATION = 0;
# the same for texi2html 5.0
$HEADERS = 0;

# TOC and Chapter headings link
$TOC_LINKS = 1;

# print the TOC where @contents is used
$INLINE_CONTENTS = 1;