Project

General

Profile

« Previous | Next » 

Revision 7905

web/vegpath/index.php: URL fragment redirect: Blink the namespace being loaded, rather than displaying "Loading" at the bottom of the page, to make it clearer what's being loaded

View differences:

web/vegpath/main.css
3 3
a:hover {text-decoration: underline;}
4 4
big, .big {font-size: 140%; font-weight: bold;}
5 5
code, .code {font-weight: normal; font-family: Courier, monospace;}
6
.progress {color: red; text-decoration: blink;}
6
.progress {text-decoration: blink;}
7 7

  
8 8
h2, h3, h4, h5, h6, blockquote {margin-bottom: 3pt;}
9 9
h3, h4 {margin-top: 8pt;}
web/vegpath/index.php
23 23
	global $alias, $h_level, $path, $ref;
24 24
	if (is_string($url_func)) $url_func = by_prefix($url_func);
25 25
	
26
	print("<h".$h_level.">".$alias.'#<big><a href="http://'.$alias
26
	print("<h".$h_level.' id="'.$name.'">'.$alias.'#<big><a href="http://'.$alias
27 27
		."#".$name.'">'.$name."</a></big><i>".$suffix."</i></h".$h_level.">\n");
28 28
	if ($ref === strtolower($name)) # found match, so redirect
29 29
	{
......
162 162
if (loc.hash)
163 163
{
164 164
	var fragment = rm_prefix('#', loc.hash)
165
	document.write('<h4 class="progress">Loading '+fragment+'...</h4>')
165
	var namespace = parse_dot_path(fragment).head
166
	document.getElementById(namespace).className = 'progress'
166 167
	document.location = '/'+fragment
167 168
}
168 169
			</script>

Also available in: Unified diff