Commits

Olemis Lang committed 94c408a

TracMacOS: Fixed position for main menu, banner & header

  • Participants
  • Parent commits a82852d

Comments (0)

Files changed (2)

File tracmacos/htdocs/mac.css

 */
   float: right;
   position: absolute;
-  right: 1em;
+  right: 3em;
   text-align: right;
-  top: 15px;
+  top: 10px;
 }
 
 /* Drop down menus */
   display: block;
   padding: 0px;
   position: absolute;
-  top: 5px;
+  top: 1px;
   z-index: 1;
 }
 
 }
 
 /* Main panel */
+#fixed-wrapper {
+  background-color: #FFFFFF;
+  clear: both;
+  position: fixed;
+  top: 0;
+  width: 100%;
+  z-index: 101;
+}
+
 #mainpanel {
   background-color: #E1E1E1;
-  clear: both;
   min-height: 18px;
-  width: 100%;
   
   border-bottom: 1px solid #999999;
   font-size: 10px;
   font-variant: normal;
   font-weight: normal;
   line-height: normal;
-  margin: 0.66em 0pt 0.33em;
-  padding: 0.2em 0pt;
+  margin: 4px 0pt 0pt 0pt;
+  padding: 0.4em 0pt 0.1em 0pt;
+}
+
+#mainpanel {
 }
 
 #mainbutton {
   background-image: url(logout_trac_16_x_16.png);
 }
 
+/* Banner & header */
+
+#banner {
+  background-color: #FFFFFF;
+  left: 0;
+  padding-top: 30px;
+  position: fixed;
+  top: 0px;
+  width: 100%;
+  z-index: 100;
+}
+
+#header {
+  height: 60px;
+  margin-top: -34px;
+  overflow: hidden;
+  padding-left: 50px;
+  width: 100%;
+}
+
+#header img {
+  height: 56px;
+  min-width: 56px;
+}
+
+#pname {
+  font-weight: bold;
+  height: 1.3em;
+  max-width: 65%;
+  overflow: hidden;
+}
+
+#psum {
+  font-size: 90%;
+  font-style: italic;
+  height: 2.8em;
+  max-width: 65%;
+  overflow: hidden;
+}
+
+#outer-wrapper {
+  margin-top: 90px;
+}
+
 /* Fonts & Typography */
 
 .wikipage>h1:first-child+p:first-letter, h1:first-child+p+div.wiki-toc+p+p:first-letter {
   font-family: 'Palatino Linotype',Palatino,'Times New Roman',serif;
   font-weight: bold;
   margin: 0px 0.05em 0.2em 0px; 
-  padding: 23px;
+  padding: 23px 29px 23px 18px;
 }
 
 .wikipage>h1+p+h2, h1+p+div.wiki-toc+p+p+h2 {
   background-position: left top;
   background-repeat: no-repeat;
   border: 1px solid #999999;
+  clear: left;
   margin-left: 22px;
   padding: 5px 0 5px 20px; 
 }

File tracmacos/templates/mac_theme.html

   </ul>
 
   <py:match path="body" once="true" buffer="false"><body>
-    <div id="mainpanel" class="nav">
-      <span> 
-        <ul style="padding: 0px;">
-          <li id="mainmenu"> 
-            <div id="mainbutton">
-              <div class="round4"></div>
-              <div class="round2"></div>
-              <div class="round1"></div>
-              <div class="box-inner"></div>
-              <div class="round1"></div>
-              <div class="round2"></div>
-              <div class="round4"></div>
-            </div>
-            ${navigation("mainnav", [])}
-          </li>
-        </ul>
-      </span>
-      <span id="navitem" class="active">
-        <py:with vars="active = [item.label for item in chrome.nav.get('mainnav', []) if item.active]">
-          <py:choose test="">
-            <py:when test="active">
-              ${active[0]}
-            </py:when>
-            <py:otherwise>
-              <a href="${req.href.about()}"> Trac</a>
-            </py:otherwise>
-          </py:choose>
-        </py:with>
-      </span>
-      <span id="ctxtnav" class="nav">
-        <h2>Context Navigation</h2>
-          <ul py:if="chrome.ctxtnav">
-            <li py:for="i, elm in enumerate(chrome.ctxtnav)" class="${i == 0 and 'first ' or None}${i+1 == len(chrome.ctxtnav) and 'last' or None}">$elm</li>
+    <div id="fixed-wrapper">
+      <div id="mainpanel" class="nav">
+        <span> 
+          <ul style="padding: 0px;">
+            <li id="mainmenu"> 
+              <div id="mainbutton">
+                <div class="round4"></div>
+                <div class="round2"></div>
+                <div class="round1"></div>
+                <div class="box-inner"></div>
+                <div class="round1"></div>
+                <div class="round2"></div>
+                <div class="round4"></div>
+              </div>
+              ${navigation("mainnav", [])}
+            </li>
           </ul>
-        <hr />
-      </span>
-      <span py:with="metaitems = ('login', 'openidlogin', 'logout', 'prefs', 'help', 'about')" 
-            id="metanav" class="nav">
-        <ul py:if="chrome.nav['metanav']">
-          <li py:for="idx, item in  enumerate(chrome.nav['metanav'])" py:if="item.name in metaitems"
-              class="${(classes(first_last(idx, chrome.nav['metanav']), active=item.active) or '') + ' ' + item.name}">
-            ${item.label}
-          </li>
-          <li class="more">
-            <em>more</em>
-            ${navigation("metanav", metaitems)}
-          </li>
-        </ul>
-      </span>
+        </span>
+        <span id="navitem" class="active">
+          <py:with vars="active = [item.label for item in chrome.nav.get('mainnav', []) if item.active]">
+            <py:choose test="">
+              <py:when test="active">
+                ${active[0]}
+              </py:when>
+              <py:otherwise>
+                <a href="${req.href.about()}"> Trac</a>
+              </py:otherwise>
+            </py:choose>
+          </py:with>
+        </span>
+        <span id="ctxtnav" class="nav">
+          <h2>Context Navigation</h2>
+            <ul py:if="chrome.ctxtnav">
+              <li py:for="i, elm in enumerate(chrome.ctxtnav)" class="${i == 0 and 'first ' or None}${i+1 == len(chrome.ctxtnav) and 'last' or None}">$elm</li>
+            </ul>
+          <hr />
+        </span>
+        <span py:with="metaitems = ('login', 'openidlogin', 'logout', 'prefs', 'help', 'about')" 
+              id="metanav" class="nav">
+          <ul py:if="chrome.nav['metanav']">
+            <li py:for="idx, item in  enumerate(chrome.nav['metanav'])" py:if="item.name in metaitems"
+                class="${(classes(first_last(idx, chrome.nav['metanav']), active=item.active) or '') + ' ' + item.name}">
+              ${item.label}
+            </li>
+            <li class="more"> <em>more</em> ${navigation("metanav", metaitems)}</li>
+          </ul>
+        </span>
+      </div>
     </div>
     <div id="banner" py:choose="">
       <form id="search" action="${href.search()}" method="get">
       </form>
       <div id="header" py:choose="" style="width: 65%;">
         <div py:when="chrome.logo.src" style="vertical-align: middle;"> 
-          <div style="float: left; min-height: 2.5em; height: auto;">
+          <div style="float: left; height: 60px;">
             <a id="logo" href="${chrome.logo.link or href.wiki('TracIni')+'#header_logo-section'}">
                 <img src="${chrome.logo.src}" alt="${chrome.logo.alt}" 
                      height="55px" width="153px" />