You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/11/01 04:01:49 UTC
svn commit: r1195789 - in /libcloud/site/trunk: content/js/clearlink.js
templates/basic.html templates/blocks/menu_docs.html
templates/blocks/sidebar.html templates/documentation.html
Author: tomaz
Date: Tue Nov 1 03:01:48 2011
New Revision: 1195789
URL: http://svn.apache.org/viewvc?rev=1195789&view=rev
Log:
Remove underline from the currently active link.
Added:
libcloud/site/trunk/content/js/clearlink.js
Modified:
libcloud/site/trunk/templates/basic.html
libcloud/site/trunk/templates/blocks/menu_docs.html
libcloud/site/trunk/templates/blocks/sidebar.html
libcloud/site/trunk/templates/documentation.html
Added: libcloud/site/trunk/content/js/clearlink.js
URL: http://svn.apache.org/viewvc/libcloud/site/trunk/content/js/clearlink.js?rev=1195789&view=auto
==============================================================================
--- libcloud/site/trunk/content/js/clearlink.js (added)
+++ libcloud/site/trunk/content/js/clearlink.js Tue Nov 1 03:01:48 2011
@@ -0,0 +1,31 @@
+/*
+CLCP v2.1 Clear Links to Current Page
+Jonathan Snook
+This code is offered unto the public domain
+http://www.snook.ca/jonathan/
+*/
+
+window.onload = clearCurrentLink;
+
+function clearCurrentLink(){
+
+ var nav = document.getElementById("menu");
+ var a = nav.getElementsByTagName("a");
+ for(var i=0;i<a.length;i++) {
+ if(a[i].href == window.location.href.split("#")[0]) {
+ removeNode(a[i]);
+ }
+ }
+}
+
+function removeNode(n){
+ if(n.hasChildNodes())
+ // gets the text from the link and moves it to the previous node.
+ for(var i=0;i<n.childNodes.length;i++) {
+ var strong = document.createElement('strong');
+ var label = n.childNodes[i].cloneNode(true);
+ label.style = "text-decoration: none !important;";
+ n.parentNode.appendChild(label);
+ }
+ n.parentNode.removeChild(n);
+}
Modified: libcloud/site/trunk/templates/basic.html
URL: http://svn.apache.org/viewvc/libcloud/site/trunk/templates/basic.html?rev=1195789&r1=1195788&r2=1195789&view=diff
==============================================================================
--- libcloud/site/trunk/templates/basic.html (original)
+++ libcloud/site/trunk/templates/basic.html Tue Nov 1 03:01:48 2011
@@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
- <script src="/js/jquery.boxy.js" type="text/javascript"></script>
+ <script src="/js/clearlink.js" type="text/javascript"></script>
<script src="/js/libcloud.js" type="text/javascript"></script>
<link rel="stylesheet" href="/css/screen.css" type="text/css">
<link rel="stylesheet" href="/css/libcloud.css" type="text/css">
Modified: libcloud/site/trunk/templates/blocks/menu_docs.html
URL: http://svn.apache.org/viewvc/libcloud/site/trunk/templates/blocks/menu_docs.html?rev=1195789&r1=1195788&r2=1195789&view=diff
==============================================================================
--- libcloud/site/trunk/templates/blocks/menu_docs.html (original)
+++ libcloud/site/trunk/templates/blocks/menu_docs.html Tue Nov 1 03:01:48 2011
@@ -1,4 +1,4 @@
-<ul>
+<ul id="menu">
<li><a href="/index.html">Website home</a></li>
<li><a href="/docs/index.html">Documentation home</a></li>
<li>Components</li>
Modified: libcloud/site/trunk/templates/blocks/sidebar.html
URL: http://svn.apache.org/viewvc/libcloud/site/trunk/templates/blocks/sidebar.html?rev=1195789&r1=1195788&r2=1195789&view=diff
==============================================================================
--- libcloud/site/trunk/templates/blocks/sidebar.html (original)
+++ libcloud/site/trunk/templates/blocks/sidebar.html Tue Nov 1 03:01:48 2011
@@ -1,5 +1,7 @@
{% block menu %}
-{% include "blocks/menu.html" %}
+<div id="menu">
+ {% include "blocks/menu.html" %}
+</div>
{% endblock %}
{% block other %}
Modified: libcloud/site/trunk/templates/documentation.html
URL: http://svn.apache.org/viewvc/libcloud/site/trunk/templates/documentation.html?rev=1195789&r1=1195788&r2=1195789&view=diff
==============================================================================
--- libcloud/site/trunk/templates/documentation.html (original)
+++ libcloud/site/trunk/templates/documentation.html Tue Nov 1 03:01:48 2011
@@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
- <script src="/js/jquery.boxy.js" type="text/javascript"></script>
+ <script src="/js/clearlink.js" type="text/javascript"></script>
<script src="/js/libcloud.js" type="text/javascript"></script>
<link rel="stylesheet" href="/css/screen.css" type="text/css">
<link rel="stylesheet" href="/css/libcloud.css" type="text/css">