]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/lilypond-texi2html.init
Merge branch 'translation' into staging
[lilypond.git] / Documentation / lilypond-texi2html.init
index cd370bb87d0f19b5a2ab48b286a7970798dfcdf9..414c5add23620ec791c28d7dca123272c8b1fc41 100644 (file)
@@ -1094,6 +1094,25 @@ sub lilypond_css_lines ($$)
       $Texi2HTML::THISDOC{'CSS_LINES'} .= "<script language=\"JavaScript\" src=\"${reldir}lily_search.js\"></script>\n";
     }
   }
+
+  ## This section makes the manual name visible to CSS through the body tag
+  ## so that styles can be applied per manual. It will add the manual
+  ## directory name (e.g., 'notation' or 'learning') as a CSS class, as well
+  ## as a development status.
+
+  # Parse the input file name to determine the manual we're dealing with.
+  my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'});
+
+  # Hard-coded value to indicate if this is a development version
+  # ('devStatus') or stable version ('stableStatus')
+  # TODO: Figure out how to automatically set this value based on the even/odd minor revision number or some other mechanism.
+  $documentstatus = 'devStatus';
+
+  # Create the extra information for the <body> tag.
+  # For example, the development Notation reference in English
+  # will output in HTML as <body lang='en' class='notation devStatus'>
+  $Texi2HTML::Config::BODYTEXT = 'lang="' . $Texi2HTML::THISDOC{current_lang} . '" class="' . $docu_name . ' ' . $documentstatus . '"';
+
 }