incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1308039 - in /incubator/bloodhound/trunk/bloodhound_theme/bhtheme: htdocs/bloodhound.css htdocs/theme.js templates/bloodhound_theme.html
Date Sun, 01 Apr 2012 08:50:51 GMT
Author: gjm
Date: Sun Apr  1 08:50:51 2012
New Revision: 1308039

URL: http://svn.apache.org/viewvc?rev=1308039&view=rev
Log:
Theme code import: Implemented mainnav carousel

Added:
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/theme.js   (with props)
Modified:
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html

Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css?rev=1308039&r1=1308038&r2=1308039&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css Sun Apr  1 08:50:51
2012
@@ -164,6 +164,15 @@ a.prev:hover, a.next:hover {
 
 /* Navigation */
 
+#mainnav-scroll {
+  bottom: 0;
+  left: 0;
+  overflow: hidden;
+  position: absolute;
+  right: 330px;
+  top: 0;
+}
+
 #mainnav {
   border: none;
   background: none;
@@ -214,7 +223,6 @@ a.prev:hover, a.next:hover {
   padding-top: 5px;
   position: relative;
   right: 3px;
-  top: -33px;
   width: 320px;
 }
 
@@ -248,7 +256,7 @@ a.prev:hover, a.next:hover {
 
 #metanav .active {
   border-top: 2px solid #CC3333;
-	font-weight: bold;
+  font-weight: bold;
 }
 
 #metanav .last, #metanav .last:hover {

Added: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/theme.js
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/theme.js?rev=1308039&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/theme.js (added)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/theme.js Sun Apr  1 08:50:51
2012
@@ -0,0 +1,26 @@
+
+var FORWARD = 0.9;
+var BACK = -0.9;
+function move(target, direction) {
+  target = jQuery(target);
+  var pos = parseInt(target.css('marginLeft'), 10);
+  var tw = target.width();
+  var pw = target.parent().width();
+  var x = 0;
+  if (tw >= pw) {
+    x = pos + direction * pw;
+    if (x > 0)
+      x = 0;
+    else {
+      var last = target.find('.last');
+      var ll = last.offset().left;
+      var lw = last.width();
+      if (ll + lw <= pw && direction < 0)
+        x = pos;
+      else if (ll < pw && direction < 0)
+        x = pos - lw;
+    }
+  }
+  target.animate({marginLeft: x}, 'slow');
+}
+

Propchange: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/theme.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/theme.js
------------------------------------------------------------------------------
    svn:mime-type = text/javascript

Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html?rev=1308039&r1=1308038&r2=1308039&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html Sun
Apr  1 08:50:51 2012
@@ -16,6 +16,9 @@
   <py:match path="body" once="true" buffer="false"><body class="bh_body">
     <div class="fixed-wrapper" 
         py:with="logo_size = (chrome.logo.width or 170, chrome.logo.height or 48)">
+      <div id="metapanel" class="ui-corner-bottom" >  
+        ${navigation("metanav", [])}
+      </div>
       <div id="banner">
         <div id="header">
           <div style="vertical-align: middle; height: ${logo_size[1]}px;"> 
@@ -33,12 +36,12 @@
           </div>
         </div>
       </div>
-      <div id="metapanel" class="ui-corner-bottom" >  
-        ${navigation("metanav", [])}
-      </div>
+      <script src="${href.chrome('theme/theme.js')}"></script>
       <div id="mainpanel" style="top:${max(60, int(logo_size[1]))}px" 
           class="ui-corner-all">
-        ${navigation("mainnav", [])}
+        <div id="mainnav-scroll">
+          ${navigation("mainnav", [])}
+        </div>
         <div id="shortcuts">
           <div class="last">
             <img src="${href('chrome/theme/user.png')}" width="26px" height="26px"/>
@@ -57,8 +60,8 @@
             </button>
           </div>
           <div class="first">
-            <img src="${href('chrome/theme/left.png')}" width="20px" height="26px" />
-            <img src="${href('chrome/theme/right.png')}" width="20px" height="26px" />
+            <img src="${href('chrome/theme/left.png')}" width="20px" height="26px" onclick="move('#mainnav
ul', BACK)"/>
+            <img src="${href('chrome/theme/right.png')}" width="20px" height="26px" onclick="move('#mainnav
ul', FORWARD)" />
           </div>
         </div>
       </div>



Mime
View raw message