Sidebar optimization
authorMarcel Werk <burntime@woltlab.com>
Tue, 28 May 2013 13:20:41 +0000 (15:20 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 28 May 2013 13:20:41 +0000 (15:20 +0200)
com.woltlab.wcf/template/footer.tpl
com.woltlab.wcf/template/header.tpl
wcfsetup/install/files/style/layout.less

index 11ba24abe23c16b1eb0cf63f49014e128e9e8558..7a5730c2b022b223bf7571857cdc2c4fb8417e50 100644 (file)
@@ -3,6 +3,10 @@
                        {if $skipBreadcrumbs|empty}{include file='breadcrumbs' __microdata=false}{/if}
                        
                </section>
+               
+               {if $sidebarOrientation|isset && $sidebarOrientation == 'right'}
+                       {@$__sidebar}
+               {/if} 
        </div>
 </div>
 
index d84155eed60d7a648c99a67f0f3393db64913be0..54a540138bb64c1f3917dec5111c47bcda188143 100644 (file)
 
 <div id="main" class="{if $__wcf->getStyleHandler()->getStyle()->getVariable('useFluidLayout')}layoutFluid{else}layoutFixed{/if}{if $sidebarOrientation|isset && $sidebar|isset} sidebarOrientation{@$sidebarOrientation|ucfirst}{if $sidebarOrientation == 'right' && $sidebarCollapsed} sidebarCollapsed{/if}{/if}">
        <div>
-               {if $sidebar|isset}
-                       <aside class="sidebar"{if $sidebarOrientation|isset && $sidebarOrientation == 'right'} data-is-open="{if $sidebarCollapsed}false{else}true{/if}" data-sidebar-name="{$sidebarName}"{/if}>
-                               <div>
-                                       {event name='sidebarBoxesTop'}
-                                       
-                                       {@$sidebar}
-                                       
-                                       {event name='sidebarBoxesBottom'}
-                               </div>
-                       </aside>
-                       
-                       {if $sidebarOrientation|isset && $sidebarOrientation == 'right'}
-                               <script type="text/javascript">
-                                       //<![CDATA[
-                                       $(function() {
-                                               new WCF.Collapsible.Sidebar();
-                                       });
-                                       //]]>
-                               </script>
+               {capture assign='__sidebar'}
+                       {if $sidebar|isset}
+                               <aside class="sidebar"{if $sidebarOrientation|isset && $sidebarOrientation == 'right'} data-is-open="{if $sidebarCollapsed}false{else}true{/if}" data-sidebar-name="{$sidebarName}"{/if}>
+                                       <div>
+                                               {event name='sidebarBoxesTop'}
+                                               
+                                               {@$sidebar}
+                                               
+                                               {event name='sidebarBoxesBottom'}
+                                       </div>
+                               </aside>
+                               
+                               {if $sidebarOrientation|isset && $sidebarOrientation == 'right'}
+                                       <script type="text/javascript">
+                                               //<![CDATA[
+                                               $(function() {
+                                                       new WCF.Collapsible.Sidebar();
+                                               });
+                                               //]]>
+                                       </script>
+                               {/if}
                        {/if}
-               {/if}
+               {/capture}
+               
+               {if !$sidebarOrientation|isset || $sidebarOrientation == 'left'}
+                       {@$__sidebar}
+               {/if} 
                                
                <section id="content" class="content">
                        
index 27156eb76d630788e6984cde7940386c45b66f3b..f3bda629cbf4a09d4553d2ff074fbbf91f246532 100644 (file)
        }
        
        &.sidebarOrientationRight {
-               direction: rtl;
-               
-               > div {
-                       > .sidebar,
-                       > .content {
-                               direction: ltr;
-                       }
-               }
-               
                &.sidebarCollapsed > div {
                        > .sidebar {
                                width: 20px;