This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git


The following commit(s) were added to refs/heads/master by this push:
     new d745fcd  Put the page content before the menu on phones
d745fcd is described below

commit d745fcd0e5fb0d6cb684b24d2356506dd2c5c1f9
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Mon Nov 2 07:36:44 2026 +0000

    Put the page content before the menu on phones
    
    site.vm now writes the content before the sidebar, so a phone shows it
    first; from 768 px the content floats right and the menu keeps its place
    on the left. Keyboard and screen reader users reach the content first.
---
 src/main/resources/META-INF/maven/site.vm | 29 +++++++++++++++--------------
 src/main/resources/css/maven-base.css     | 11 +++++++++++
 2 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/src/main/resources/META-INF/maven/site.vm 
b/src/main/resources/META-INF/maven/site.vm
index fe925e6..393777c 100644
--- a/src/main/resources/META-INF/maven/site.vm
+++ b/src/main/resources/META-INF/maven/site.vm
@@ -215,6 +215,21 @@
 #*      *##set( $leftColumnClass = $site.getCustomValue( 
'fluidoSkin.leftColumnClass', 'span2' ) )
 ##
       <div class="row-fluid">
+#*    *##end
+## the page content comes before the menu, so that it comes first on a phone; 
maven-base.css keeps the menu on the left
+##
+#*    *##set( $bodyColumnClass = $site.getCustomValue( 
'fluidoSkin.bodyColumnClass', 'span10' ) )
+##
+        <main id="bodyColumn"#if( $sideBarEnabled ) 
class="$bodyColumnClass"#end>
+#*      *##if( $convert.toBoolean( $site.getCustomValue( 
'fluidoSkin.sourceLineNumbersEnabled', 'false' ) ) )
+#*        *##set( $sourceStyle = "prettyprint linenums" )
+#*      *##else
+#*        *##set( $sourceStyle = "prettyprint" )
+#*      *##end
+##
+#*      *##if ( $bodyContent )$bodyContent.replaceAll( '<pre>(<code[ 
>](?!.*class=\"nohighlight nocode\"))', '<pre class="' + $sourceStyle + '">' + 
$esc.d + '1' ).replace( 'class="bodyTable"', 'class="table table-striped"' 
).replace( 'class="bodyTable bodyTableBorder"', 'class="table table-bordered 
table-striped"' )#end
+        </main>
+#*    *##if( $sideBarEnabled )
         <header id="leftColumn" class="$leftColumnClass">
           <nav class="well sidebar-nav">
 #*      *##publishDate( "navigation-top" $site.publishDate $site.version )
@@ -233,20 +248,6 @@
           </div>
 #*      *##end
         </header>
-#*    *##end
-##
-#*    *##set( $bodyColumnClass = $site.getCustomValue( 
'fluidoSkin.bodyColumnClass', 'span10' ) )
-##
-        <main id="bodyColumn"#if( $sideBarEnabled ) 
class="$bodyColumnClass"#end>
-#*      *##if( $convert.toBoolean( $site.getCustomValue( 
'fluidoSkin.sourceLineNumbersEnabled', 'false' ) ) )
-#*        *##set( $sourceStyle = "prettyprint linenums" )
-#*      *##else
-#*        *##set( $sourceStyle = "prettyprint" )
-#*      *##end
-##
-#*      *##if ( $bodyContent )$bodyContent.replaceAll( '<pre>(<code[ 
>](?!.*class=\"nohighlight nocode\"))', '<pre class="' + $sourceStyle + '">' + 
$esc.d + '1' ).replace( 'class="bodyTable"', 'class="table table-striped"' 
).replace( 'class="bodyTable bodyTableBorder"', 'class="table table-bordered 
table-striped"' )#end
-        </main>
-#*    *##if( $sideBarEnabled )
       </div>
 #*    *##end
     </div>
diff --git a/src/main/resources/css/maven-base.css 
b/src/main/resources/css/maven-base.css
index 5747cd6..faeae79 100644
--- a/src/main/resources/css/maven-base.css
+++ b/src/main/resources/css/maven-base.css
@@ -38,3 +38,14 @@ section > pre {
 #poweredBy {
   text-align: center;
 }
+
+/* site.vm puts the page content before the menu, so that it comes first on a 
phone; from 768 px wide the menu goes
+   back to the left. The gap between the columns stays the one Bootstrap 
computes for each width. */
+@media (min-width: 768px) {
+  .row-fluid > #bodyColumn {
+    float: right;
+  }
+  .row-fluid > #leftColumn {
+    margin-left: 0;
+  }
+}

Reply via email to