diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-12 15:27:47 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-12 17:40:04 +0200 |
commit | d7d031b69f7dfa958d38e96e5ace4b2db023dade (patch) | |
tree | 1065a7c485f074196c25f2882c8707666bdcd4ac /pkgs/webapps/apache-theme/theme/footer.html | |
parent | 2a5cde8d47d5c887067176555596cf8feb5c4d8b (diff) | |
download | Nix-d7d031b69f7dfa958d38e96e5ace4b2db023dade.tar.gz Nix-d7d031b69f7dfa958d38e96e5ace4b2db023dade.tar.zst Nix-d7d031b69f7dfa958d38e96e5ace4b2db023dade.zip |
Move Apache theme to pkgs
Diffstat (limited to 'pkgs/webapps/apache-theme/theme/footer.html')
-rw-r--r-- | pkgs/webapps/apache-theme/theme/footer.html | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/webapps/apache-theme/theme/footer.html b/pkgs/webapps/apache-theme/theme/footer.html new file mode 100644 index 0000000..57a2012 --- /dev/null +++ b/pkgs/webapps/apache-theme/theme/footer.html | |||
@@ -0,0 +1,31 @@ | |||
1 | </div><!--/.wrapper--> | ||
2 | |||
3 | <script type="text/javascript"> | ||
4 | // grab the 2nd child and add the parent class. tr:nth-child(2) | ||
5 | document.getElementsByTagName('tr')[1].className = 'parent'; | ||
6 | // fix links when not adding a / at the end of the URI | ||
7 | var uri = window.location.pathname.substr(1); | ||
8 | if (uri.length > 0 && uri.substring(uri.length-1) != '/'){ | ||
9 | var indexes = document.getElementsByClassName('indexcolname'), | ||
10 | i = indexes.length; | ||
11 | while (i--){ | ||
12 | var a = indexes[i].getElementsByTagName('a')[0]; | ||
13 | a.href = '/' + uri + '/' + a.getAttribute('href',2); | ||
14 | } | ||
15 | } | ||
16 | |||
17 | function getAjax(url, success) { | ||
18 | var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); | ||
19 | xhr.open('GET', url); | ||
20 | xhr.onreadystatechange = function() { | ||
21 | if (xhr.readyState>3 && xhr.status==200) | ||
22 | success(xhr.responseText); | ||
23 | }; | ||
24 | xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); | ||
25 | xhr.send(); | ||
26 | return xhr; | ||
27 | } | ||
28 | getAjax("title", function(data) { | ||
29 | document.getElementById('pagetitle').innerHTML = data; | ||
30 | }); | ||
31 | </script> | ||