community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1784517 - in /comdev/projects.apache.org/site: js/projects.js styles.css
Date Mon, 27 Feb 2017 10:10:04 GMT
Author: sebb
Date: Mon Feb 27 10:10:04 2017
New Revision: 1784517

URL: http://svn.apache.org/viewvc?rev=1784517&view=rev
Log:
Add 'Link to here' section hovers

Modified:
    comdev/projects.apache.org/site/js/projects.js
    comdev/projects.apache.org/site/styles.css

Modified: comdev/projects.apache.org/site/js/projects.js
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/js/projects.js?rev=1784517&r1=1784516&r2=1784517&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Mon Feb 27 10:10:04 2017
@@ -732,7 +732,7 @@ function renderProjectsByLanguage() {
     for (l in lingos) {
         var lang = lingos[l];
         var li = document.createElement('li');
-        li.innerHTML = "<h3><a id='" + lang + "'>" + lang + " (" + lcount[lang]
+ ")</a>:</h3>";
+        li.innerHTML = "<h3><a id='" + lang + "'>" + lang + " (" + lcount[lang]
+ ")</a>"+linkToHere(lang)+":</h3>";
         var cul = document.createElement('ul');
         for (i in projectsSorted) {
             i = projectsSorted[i];
@@ -788,7 +788,7 @@ function renderProjectsByCategory() {
     for (l in cats) {
         var lang = cats[l];
         var li = document.createElement('li');
-        li.innerHTML = "<h3><a id='" + lang + "'>" + lang + " (" + ccount[lang]
+ ")</a>:</h3>";
+        li.innerHTML = "<h3><a id='" + lang + "'>" + lang + " (" + ccount[lang]
+ ")</a>"+linkToHere(lang)+":</h3>";
         var cul = document.createElement('ul');
         for (i in projectsSorted) {
             i = projectsSorted[i];
@@ -1656,6 +1656,11 @@ function renderReleases(releases) {
     } );
 }
 
+// Generate a 'Link to here' pop-up marker
+function linkToHere(id) {
+    return "<a class='sectionlink' href='#"+id+"' title='Link to here'>&para;</a>"
+}
+
 // Called by releases.html
 
 function buildReleases() {

Modified: comdev/projects.apache.org/site/styles.css
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/styles.css?rev=1784517&r1=1784516&r2=1784517&view=diff
==============================================================================
--- comdev/projects.apache.org/site/styles.css (original)
+++ comdev/projects.apache.org/site/styles.css Mon Feb 27 10:10:04 2017
@@ -275,3 +275,12 @@ h1, h2, h3, h4 {
         text-align: center;
         line-height: 3em;
 }
+
+.sectionlink {
+  display: none;
+}
+
+:hover>.sectionlink {
+  display: inline;
+  color: orange;
+}



Mime
View raw message