]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/lilypond-texi2html.init
Fix 1323 - links "Back to documentation index" in HTML docs
[lilypond.git] / Documentation / lilypond-texi2html.init
index 96f4cb2d28765dae72cef1fedbedbb0d4349dc33..57340912510302b52f96a6ee8a2c9953bb262cd2 100644 (file)
@@ -794,10 +794,12 @@ sub lilypond_css_lines ($$)
     $Texi2HTML::THISDOC{'CSS_LINES'} .=
        "<link rel=\"alternate stylesheet\" type=\"text/css\" href=\"$ref->{FILENAME}\" title=\"$ref->{TITLE}\">\n";
   }
-  # FIXME: the website doesn't use ie7-specific fixes; do the
-  # docs still need this?  -gp
-  $Texi2HTML::THISDOC{'CSS_LINES'} .=
-      "<!--[if lte IE 7]>\n<link href=\"lilypond-ie-fixes.css\" rel=\"stylesheet\" type=\"text/css\">\n<![endif]-->\n";
+
+  # The ie-fixes stylesheet is needed for the docs, but not the website.
+  if (not ($web_manual)) {
+    $Texi2HTML::THISDOC{'CSS_LINES'} .=
+       "<!--[if lte IE 7]>\n<link href=\"lilypond-ie-fixes.css\" rel=\"stylesheet\" type=\"text/css\">\n<![endif]-->\n";
+  }
 
   if ($ENV{'AJAX_SEARCH'} == 1) {
     # Add the JavaScript file only if we have an index.
@@ -1372,7 +1374,15 @@ sub lilypond_print_toc_div ($$)
       $lang = "";
     }
     my $reldir = $ENV{DEPTH};
-    my $uplink = $reldir."/Documentation/web/manuals.${lang}html";
+    # strip one depth level for translations
+    if ($lang and $lang ne "en" and substr ($reldir, 0, 3) eq '../') {
+       $reldir = substr ($reldir, 3);
+    }
+    # add a / at the end if there isn't one.
+    if (substr ($reldir, -1) ne '/') {
+        $reldir .= '/';
+    }
+    my $uplink = $reldir."Documentation/web/manuals.${lang}html";
 
     if (not $web_manual) {
       print $fh "<p class=\"toc_uplink\"><a href=\"$uplink\"