t2h.init 2.9 KB

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