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.

231 lines
4.6KB

  1. # no horiz rules between sections
  2. $end_section = \&Libav_end_section;
  3. sub Libav_end_section($$)
  4. {
  5. }
  6. $EXTRA_HEAD =
  7. '<link rel="icon" href="favicon.png" type="image/png" />
  8. ';
  9. $CSS_LINES = $ENV{"LIBAV_CSS"} || <<EOT;
  10. <style type="text/css">
  11. <!--
  12. .container {
  13. margin-right: auto;
  14. margin-left: auto;
  15. width: 1070px;
  16. }
  17. body {
  18. font-size: 14px;
  19. line-height: 20px;
  20. color: #333333;
  21. background-color: #ffffff;
  22. }
  23. a {
  24. color: #0088cc;
  25. text-decoration: none;
  26. }
  27. a:hover {
  28. color: #005580;
  29. text-decoration: underline;
  30. }
  31. p {
  32. margin: 0 0 10px;
  33. }
  34. h2,
  35. h3,
  36. h4 {
  37. margin: 10px 0;
  38. font-family: inherit;
  39. font-weight: bold;
  40. line-height: 1;
  41. border-color: #D6E9C6;
  42. color: #468847;
  43. border-style: solid;
  44. border-width: 0 0 1px;
  45. padding-left: 0.5em;
  46. }
  47. h1 a,
  48. h2 a,
  49. h3 a,
  50. h4 a {
  51. color: inherit;
  52. }
  53. h1 {
  54. font-size: 30px;
  55. line-height: 40px;
  56. }
  57. h2 {
  58. font-size: 20px;
  59. line-height: 40px;
  60. }
  61. h3 {
  62. font-size: 18px;
  63. line-height: 40px;
  64. }
  65. code,
  66. pre {
  67. padding: 0 3px 2px;
  68. font-family: monospace;
  69. font-size: 12px;
  70. color: #333333;
  71. border-radius: 3px;
  72. }
  73. pre {
  74. display: block;
  75. padding: 9.5px;
  76. margin: 0 0 10px;
  77. font-size: 13px;
  78. line-height: 20px;
  79. word-break: break-all;
  80. word-wrap: break-word;
  81. white-space: pre;
  82. white-space: pre-wrap;
  83. background-color: #f5f5f5;
  84. border: 1px solid #ccc;
  85. border-radius: 4px;
  86. }
  87. code {
  88. padding: 2px 4px;
  89. color: #d14;
  90. background-color: #f7f7f9;
  91. border: 1px solid #e1e1e8;
  92. }
  93. pre code {
  94. padding: 0;
  95. color: inherit;
  96. background-color: transparent;
  97. border: 0;
  98. }
  99. .alert {
  100. padding: 8px 35px 8px 14px;
  101. margin-bottom: 20px;
  102. text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  103. background-color: #fcf8e3;
  104. border: 1px solid #fbeed5;
  105. border-radius: 4px;
  106. color: #c09853;
  107. }
  108. .alert-danger,
  109. .alert-error {
  110. background-color: #f2dede;
  111. border-color: #eed3d7;
  112. color: #b94a48;
  113. }
  114. .alert-info {
  115. background-color: #d9edf7;
  116. border-color: #bce8f1;
  117. color: #3a87ad;
  118. }
  119. ul.toc {
  120. list-style-type: none;
  121. }
  122. -->
  123. </style>
  124. EOT
  125. my $TEMPLATE_HEADER = $ENV{"LIBAV_HEADER"} || <<EOT;
  126. <link rel="icon" href="favicon.png" type="image/png" />
  127. </head>
  128. <body>
  129. <div class="container">
  130. EOT
  131. $PRE_BODY_CLOSE = '</div></div>';
  132. $SMALL_RULE = '';
  133. $BODYTEXT = '';
  134. $print_page_foot = \&Libav_print_page_foot;
  135. sub Libav_print_page_foot($$)
  136. {
  137. my $fh = shift;
  138. my $program_string = defined &T2H_DEFAULT_program_string ?
  139. T2H_DEFAULT_program_string() : program_string();
  140. print $fh '<footer class="footer pagination-right">' . "\n";
  141. print $fh '<span class="label label-info">' . $program_string;
  142. print $fh "</span></footer></div>\n";
  143. }
  144. $float = \&Libav_float;
  145. sub Libav_float($$$$)
  146. {
  147. my $text = shift;
  148. my $float = shift;
  149. my $caption = shift;
  150. my $shortcaption = shift;
  151. my $label = '';
  152. if (exists($float->{'id'}))
  153. {
  154. $label = &$anchor($float->{'id'});
  155. }
  156. my $class = '';
  157. my $subject = '';
  158. if ($caption =~ /NOTE/)
  159. {
  160. $class = "alert alert-info";
  161. }
  162. elsif ($caption =~ /IMPORTANT/)
  163. {
  164. $class = "alert alert-warning";
  165. }
  166. return '<div class="float ' . $class . '">' . "$label\n" . $text . '</div>';
  167. }
  168. $print_page_head = \&Libav_print_page_head;
  169. sub Libav_print_page_head($$)
  170. {
  171. my $fh = shift;
  172. my $longtitle = "$Texi2HTML::THISDOC{'fulltitle_no_texi'}";
  173. $longtitle .= ": $Texi2HTML::NO_TEXI{'This'}" if exists $Texi2HTML::NO_TEXI{'This'};
  174. my $description = $DOCUMENT_DESCRIPTION;
  175. $description = $longtitle if (!defined($description));
  176. $description = "<meta name=\"description\" content=\"$description\">" if
  177. ($description ne '');
  178. $description = $Texi2HTML::THISDOC{'documentdescription'} if (defined($Texi2HTML::THISDOC{'documentdescription'}));
  179. my $encoding = '';
  180. $encoding = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$ENCODING\">" if (defined($ENCODING) and ($ENCODING ne ''));
  181. $longtitle =~ s/Documentation.*//g;
  182. $longtitle = "Libav documentation : " . $longtitle;
  183. print $fh <<EOT;
  184. <!DOCTYPE html>
  185. <html>
  186. $Texi2HTML::THISDOC{'copying'}<!-- Created on $Texi2HTML::THISDOC{today} by $Texi2HTML::THISDOC{program} -->
  187. <!--
  188. $Texi2HTML::THISDOC{program_authors}
  189. -->
  190. <head>
  191. <title>$longtitle</title>
  192. $description
  193. <meta name="keywords" content="$longtitle">
  194. <meta name="resource-type" content="document">
  195. <meta name="distribution" content="global">
  196. <meta name="Generator" content="$Texi2HTML::THISDOC{program}">
  197. $encoding
  198. $CSS_LINES
  199. $TEMPLATE_HEADER
  200. EOT
  201. }
  202. # no navigation elements
  203. $SECTION_NAVIGATION = 0;
  204. # the same for texi2html 5.0
  205. $HEADERS = 0;
  206. # TOC and Chapter headings link
  207. $TOC_LINKS = 1;
  208. # print the TOC where @contents is used
  209. $INLINE_CONTENTS = 1;