diff --git a/assets/css/style.css b/assets/css/style.css index e320b7914e..63ef54fc47 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -357,4 +357,9 @@ ul.navigation a { .warning { color: #9F6000; background-color: #FEEFB3; +} + +.editThisPage { + position:absolute; bottom:2%; right:2%; + font-size:16px; } \ No newline at end of file diff --git a/assets/js/shiro-site.js b/assets/js/shiro-site.js new file mode 100644 index 0000000000..9a74c7664d --- /dev/null +++ b/assets/js/shiro-site.js @@ -0,0 +1,16 @@ + +function addPageEditLink() { + + var ghRepo = "apache/shiro-site"; + var ghRelHref = "https://github.com/" + ghRepo + "/edit/master/"; + + var ghEditPageElement = $( "#ghEditPage" ); + var editThisPageElement = $(".editThisPage"); + + if (ghEditPageElement && ghEditPageElement.val() && editThisPageElement) { + var relGHPage = ghEditPageElement.val(); + + var ghEditHref = ghRelHref + relGHPage; + editThisPageElement.append("Edit this Page on Github"); + } +} \ No newline at end of file diff --git a/templates/default.vtl b/templates/default.vtl index 407c4cbb6f..bcec194174 100644 --- a/templates/default.vtl +++ b/templates/default.vtl @@ -56,6 +56,7 @@ + @@ -65,6 +66,10 @@ //Google Analytics jQuery.trackPage('UA-11551827-1'); }); + + $( document ).ready(function() { + addPageEditLink(); + }); @@ -102,6 +107,10 @@ Donate to the ASF | License
Copyright © 2008-$year The Apache Software Foundation
+ +