Browse Source

doc: update the documentation generator to match the new website

Signed-off-by: db0 <db0company@gmail.com>
Signed-off-by: Clément Bœsch <u@pkh.me>
db0 10 years ago
parent
commit
9ce64ba111
3 changed files with 35 additions and 188 deletions
  1. 0 165
      doc/default.css
  2. 4 0
      doc/style.min.css
  3. 31 23
      doc/t2h.init

+ 0 - 165
doc/default.css

@@ -1,165 +0,0 @@
-a.summary-letter {
-    text-decoration: none;
-}
-
-a {
-    color: #2D6198;
-}
-
-a:visited {
-    color: #884488;
-}
-
-#banner {
-    background-color: white;
-    position: relative;
-    text-align: center;
-}
-
-#banner img {
-    margin-bottom: 1px;
-    margin-top: 5px;
-}
-
-#body {
-    margin-left: 1em;
-    margin-right: 1em;
-}
-
-body {
-    background-color: #313131;
-    margin: 0;
-    text-align: justify;
-}
-
-.center {
-    margin-left: auto;
-    margin-right: auto;
-    text-align: center;
-}
-
-#container {
-    background-color: white;
-    color: #202020;
-    margin-left: 1em;
-    margin-right: 1em;
-}
-
-#footer {
-    text-align: center;
-}
-
-h1 a, h2 a, h3 a, h4 a {
-    text-decoration: inherit;
-    color: inherit;
-}
-
-h1, h2, h3, h4 {
-    padding-left: 0.4em;
-    border-radius: 4px;
-    padding-bottom: 0.25em;
-    padding-top: 0.25em;
-    border: 1px solid #6A996A;
-}
-
-h1 {
-    background-color: #7BB37B;
-    color: #151515;
-    font-size: 1.2em;
-    padding-bottom: 0.3em;
-    padding-top: 0.3em;
-}
-
-h2 {
-    color: #313131;
-    font-size: 1.0em;
-    background-color: #ABE3AB;
-}
-
-h3 {
-    color: #313131;
-    font-size: 0.9em;
-    margin-bottom: -6px;
-    background-color: #BBF3BB;
-}
-
-h4 {
-    color: #313131;
-    font-size: 0.8em;
-    margin-bottom: -8px;
-    background-color: #D1FDD1;
-}
-
-img {
-    border: 0;
-}
-
-#navbar {
-    background-color: #738073;
-    border-bottom: 1px solid #5C665C;
-    border-top: 1px solid #5C665C;
-    margin-top: 12px;
-    padding: 0.3em;
-    position: relative;
-    text-align: center;
-}
-
-#navbar a, #navbar_secondary a {
-    color: white;
-    padding: 0.3em;
-    text-decoration: none;
-}
-
-#navbar a:hover, #navbar_secondary a:hover {
-    background-color: #313131;
-    color: white;
-    text-decoration: none;
-}
-
-#navbar_secondary {
-    background-color: #738073;
-    border-bottom: 1px solid #5C665C;
-    border-left: 1px solid #5C665C;
-    border-right: 1px solid #5C665C;
-    padding: 0.3em;
-    position: relative;
-    text-align: center;
-}
-
-p {
-    margin-left: 1em;
-    margin-right: 1em;
-}
-
-pre {
-    margin-left: 3em;
-    margin-right: 3em;
-    padding: 0.3em;
-    border: 1px solid #bbb;
-    background-color: #f7f7f7;
-}
-
-dl dt {
-    font-weight: bold;
-}
-
-#proj_desc {
-    font-size: 1.2em;
-}
-
-#repos {
-    margin-left: 1em;
-    margin-right: 1em;
-    border-collapse: collapse;
-    border: solid 1px #6A996A;
-}
-
-#repos th {
-    background-color: #7BB37B;
-    border: solid 1px #6A996A;
-}
-
-#repos td {
-    padding: 0.2em;
-    border: solid 1px #6A996A;
-}

File diff suppressed because it is too large
+ 4 - 0
doc/style.min.css


+ 31 - 23
doc/t2h.init

@@ -4,23 +4,27 @@ sub FFmpeg_end_section($$)
 {
 }
 
-$EXTRA_HEAD =
-'<link rel="icon" href="favicon.png" type="image/png" />
-';
-
-$CSS_LINES = $ENV{"FFMPEG_CSS"} || <<EOT;
-<link rel="stylesheet" type="text/css" href="default.css" />
+my $TEMPLATE_HEADER1 = $ENV{"FFMPEG_HEADER1"} || <<EOT;
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+    <title>FFmpeg documentation</title>
+    <link rel="stylesheet" href="style.min.css" />
 EOT
 
-my $TEMPLATE_HEADER = $ENV{"FFMPEG_HEADER"} || <<EOT;
-<link rel="icon" href="favicon.png" type="image/png" />
-</head>
-<body>
-<div id="container">
-<div id="body">
+my $TEMPLATE_HEADER2 = $ENV{"FFMPEG_HEADER2"} || <<EOT;
+  </head>
+  <body>
+    <div style="width: 95%; margin: auto">
 EOT
 
-$PRE_BODY_CLOSE = '</div></div>';
+my $TEMPLATE_FOOTER = $ENV{"FFMPEG_FOOTER"} || <<EOT;
+    </div>
+  </body>
+</html>
+EOT
 
 $SMALL_RULE = '';
 $BODYTEXT = '';
@@ -82,21 +86,25 @@ sub FFmpeg_print_page_head($$)
     $longtitle = "FFmpeg documentation : " . $longtitle;
 
     print $fh <<EOT;
-<!DOCTYPE html>
-<html>
+$TEMPLATE_HEADER1
+$description
+<meta name="keywords" content="$longtitle">
+<meta name="Generator" content="$Texi2HTML::THISDOC{program}">
 $Texi2HTML::THISDOC{'copying'}<!-- Created on $Texi2HTML::THISDOC{today} by $Texi2HTML::THISDOC{program} -->
 <!--
 $Texi2HTML::THISDOC{program_authors}
 -->
-<head>
-<title>$longtitle</title>
-
-$description
-<meta name="keywords" content="$longtitle">
-<meta name="Generator" content="$Texi2HTML::THISDOC{program}">
 $encoding
-$CSS_LINES
-$TEMPLATE_HEADER
+$TEMPLATE_HEADER2
+EOT
+}
+
+$print_page_foot = \&FFmpeg_print_page_foot;
+sub FFmpeg_print_page_foot($$)
+{
+    my $fh = shift;
+    print $fh <<EOT;
+$TEMPLATE_FOOTER
 EOT
 }
 

Some files were not shown because too many files changed in this diff