t2h.init 3.3 KB

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