mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +01:00
Experimentally, I've made the whole top navigation section fixed so that it stays in place as the page scrolls, and it's black and slightly transparent to give it a different feel. I'm not sure if I like it or not, but it does make the links handily available. I've also made the layout a bit more fluid to use the available width better. It's not quite right yet, but it works much better with wide displays (fixing #193) and also with narrow displays (fixing #262). git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@245 a4c988fc-2ded-0310-b66e-134b36920a42
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
function toggleAll(className) {
|
|
var elems = document.getElementsByClassName(className);
|
|
for (var i = 0; i < elems.length; i++) {
|
|
if (elems[i].style.display == 'block')
|
|
{
|
|
elems[i].style.display = 'none';
|
|
}
|
|
else
|
|
{
|
|
elems[i].style.display = 'block';
|
|
}
|
|
}
|
|
}
|
|
|
|
function SetCookie (name, value) {
|
|
var argv = SetCookie.arguments;
|
|
var argc = SetCookie.arguments.length;
|
|
var expires = (argc > 2) ? argv[2] : null;
|
|
var path = (argc > 3) ? argv[3] : null;
|
|
var domain = (argc > 4) ? argv[4] : null;
|
|
var secure = (argc > 5) ? argv[5] : false;
|
|
document.cookie = name + "=" + escape (value) +
|
|
((expires == null) ? "" : ("; expires=" +
|
|
expires.toGMTString())) +
|
|
((path == null) ? "" : ("; path=" + path)) +
|
|
((domain == null) ? "" : ("; domain=" + domain)) +
|
|
((secure == true) ? "; secure" : "");
|
|
}
|
|
|
|
var bikky = document.cookie;
|
|
|
|
function getCookie(name) { // use: getCookie("name");
|
|
var index = bikky.indexOf(name + "=");
|
|
if (index == -1) return null;
|
|
index = bikky.indexOf("=", index) + 1; // first character
|
|
var endstr = bikky.indexOf(";", index);
|
|
if (endstr == -1) endstr = bikky.length; // last character
|
|
return unescape(bikky.substring(index, endstr));
|
|
}
|
|
|
|
|
|
|