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.

124 lines
3.1KB

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