You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
3.2KB

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