]> Shamusworld >> Repos - ardour-manual-diverged/commitdiff
simplify tree generation, restore broken autoscrolling (could use some tweaking)
authorJörn Nettingsmeier <nettings@stackingdwarves.net>
Mon, 3 Feb 2014 01:45:21 +0000 (02:45 +0100)
committerJörn Nettingsmeier <nettings@stackingdwarves.net>
Mon, 3 Feb 2014 01:45:21 +0000 (02:45 +0100)
_manual/17_mixing/02_panning.html
_manual/17_mixing/02_panning/02_balance_control.html
_plugins/manual.rb
source/css/app.css

index 41a23606ea765f333eb8d54c53537cf904ee5b33..5af2467f86428842b53b6fa3d6fa74e85ef460de 100644 (file)
@@ -41,8 +41,8 @@ title: Panning
   of these situations, but in the future will offer more.
 </p>
 <p>
-  In addition to the panners, Ardour has a stereo balance control for subtle
-  corrections to an existing stereo image.
+  In addition to the panners, Ardour has a balance control for subtle
+  corrections to existing stereo images.
 </p>
 
 {% children %}
index 0821b1b3c5ebac71221be40d6768dacb4ca521ec..3c2f838f2d79e01fe7901c96a9b1ebf5e11c2f74 100644 (file)
@@ -8,12 +8,15 @@ title: Balance Control
   traditional <strong>balance control</strong> by right-clicking on the
   panner widget.
 </p>
+<img class="left" src="/images/stereo-balance.png" alt="Stereo Balance
+control"/>
 <p>
   When the balance is centered, the incoming signals will be unaffected.
   Moving it to one side will linearly attenuate the signal of the opposite
   side.
 </p>
 <div class="well">
-  While it is considerably less flexible than the stereo panner, it work
-  with arbitrary content without the danger of comb filter artefacts.
+  While the balance control is considerably less flexible than the stereo 
+  panner, it works with arbitrary content without danger of introducing
+  comb filter artefacts.
 </div>
index b3d8dad24463c9cef7a1d238afdb7468e06ea696..24a532c6503518d5f3af410188e69ff8153366bf 100644 (file)
@@ -165,9 +165,9 @@ module Manual
       position ? [current, position, level + 1] : [current]
     end
 
-    def sanitize_NMTOKEN(s)
-      'ID'+s.gsub(/[^0-9A-z:_.-]/, '_')
-    end
+#    def sanitize_NMTOKEN(s)
+#      'ID'+s.gsub(/[^0-9A-z:_.-]/, '_')
+#    end
     
     def render(context)
 
@@ -181,14 +181,14 @@ module Manual
       current_a = current.split('/').reject(&:empty?)
 
       tree = Manual.traverse_data(@@data_tree) do |entry|
-
+      
           url = entry[:url]
 
           url_a = url.split('/').reject(&:empty?)
 
           depth = url_a.length
           is_current, position, level = *process_hierarchy(current_a, url_a)
-
+          
           # this massively speeds up build time by not including the whole menu tree for each page
           next if depth > 1 && current_a[0] != url_a[0]
 
@@ -205,7 +205,7 @@ module Manual
 
               erb = ::ERB.new <<-HTML
                   <dt class="<%= css_classes %>">
-                      <a id="<%= sanitize_NMTOKEN(entry[:url]) %>" href="<%= entry[:url] %>"><%= entry[:menu_title] %></a>
+                      <a href="<%= entry[:url] %>"><%= entry[:menu_title] %></a>
                   </dt>
                   <dd class="<%= css_classes %>">
                       <% if entry[:children].any? %>
@@ -225,7 +225,7 @@ module Manual
 
                 erb = ::ERB.new <<-HTML
                     <dt class="<%= css_classes %>">
-                        <a id="<%= sanitize_NMTOKEN(entry[:url]) %>" href="<%= entry[:url] %>"><%= entry[:menu_title] %></a>
+                        <a href="<%= entry[:url] %>"><%= entry[:menu_title] %></a>
                     </dt>
                     <dd class="<%= css_classes %>">
                     </dd>
@@ -234,9 +234,18 @@ module Manual
                 erb.result(binding)
              end
           end
+          
+         
       end
 
-      "<dl>#{tree.join}</dl>"
+      "<dl>#{tree.join}</dl>
+      <script type='text/javascript'><!--
+        offset = document.getElementsByClassName('active')[0].offsetTop;
+        height = document.getElementById('tree').clientHeight;
+        if (offset > (height * .7)) {
+          tree.scrollTop = offset - height * .3;
+        }
+      --></script>"
 
     end
 
index ad851c631142359337500db8eb416b2b277e4754..e2972dcf4995596e78c5d4bfd95d6c5add239e6a 100644 (file)
     white-space:nowrap;
 }
 
-#content img {
-    margin: 1em 0 1em 0;
-
-}
 #content td {
     padding: 0 1em 0 1em;
 }