-
Notifications
You must be signed in to change notification settings - Fork 0
/
kwiki4.html
199 lines (191 loc) · 5.48 KB
/
kwiki4.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"><html><head><title>Kingman Hall: Sandbox</title>
<link rel="stylesheet" href="style.css"></head><body>
<!-- This rainbow is an image; the title is superimposed on the image. -->
<a href="/"><div class="banner"><img src="spectrum.png">
<table cellspacing="0" cellpadding="0" border="0"><tr>
<td> </td>
<td>K</td>
<td>·</td>
<td>I</td>
<td>·</td>
<td>N</td>
<td>·</td>
<td>G</td>
<td>·</td>
<td>M</td>
<td>·</td>
<td>A</td>
<td>·</td>
<td>N</td>
<td> </td>
<td> </td>
<td> </td>
<td>H</td>
<td>·</td>
<td>A</td>
<td>·</td>
<td>L</td>
<td>·</td>
<td>L</td>
<td> </td>
</tr></table>
</div></a>
<style>
.wiki div.tags { margin: 0.75em 0 1.5em; padding: 0; }
.wiki #tags-menubar { position: absolute; margin-top: 3px; }
.wiki #tags-menubar td { padding: 0; color: #a00; }
.wiki #tags-menubar td.arrow { text-align: center; font-size: 7px;
color: #fcc; cursor: pointer; padding-bottom: 8px; }
.wiki #tags-menubar td.arrow:hover { color: #a00; }
.wiki #tags-menubar td.arrow.selected { color: #a00; }
.wiki div.tag-menu { position: absolute; background: #e4e4e4;
border: 2px solid white; border-top: none; padding: 2px; margin: -6px -4px;
white-space: nowrap; color: #888; font-size: 9px; visibility: hidden; }
.wiki div.tag-menu ul { list-style: none; margin: 0; padding: 0; }
.wiki div.tag-menu li { font-size: 11px; margin: 0; padding: 2px 0; }
.wiki #tags-form { margin: -3px -4px; padding: 0; visibility: hidden; }
.wiki #tags-form input { margin: 0; }
.wiki #tags-form td { padding: 0 0 0 5px; }
.wiki #tags-form td.field { width: 99%; padding: 0 5px 0 0; }
</style>
<script>
var editing = 0, just_cancelled = 0, current_menu = '';
var tags_form, tags_field, tags_submit, tags_cancel, tags_menubar;
var original_tags = 'home, policy';
function $(id) {
return document.getElementById(id);
}
function enter_tag_form() {
if (just_cancelled) {
just_cancelled = 0;
} else if (!current_menu) {
tags_form.style.visibility = 'visible';
tags_menubar.style.visibility = 'hidden';
}
}
function exit_tag_form() {
if (!editing) {
tags_form.style.visibility = 'hidden';
tags_menubar.style.visibility = 'visible';
}
}
function focus_tag_form() {
editing = 1;
}
function blur_tag_form() {
if (tags_field.value == original_tags) editing = 0;
exit_tag_form();
}
function cancel_tag_form() {
tags_field.value = original_tags;
editing = 0;
exit_tag_form();
just_cancelled = 1;
}
function show_menu(tag) {
if (tag != current_menu) {
var tag_menu = $('menu-' + tag);
var tag_arrow = $('arrow-' + tag);
tag_menu.style.visibility = 'visible';
tag_arrow.className = 'arrow selected';
hide_menu();
current_menu = tag;
}
}
function hover_menu(tag) {
if (current_menu) show_menu(tag);
}
function hide_menu() {
if (current_menu) {
$('menu-' + current_menu).style.visibility = 'hidden';
$('arrow-' + current_menu).className = 'arrow';
current_menu = '';
}
}
document.onclick = hide_menu;
</script>
<div class="wiki" id="wiki">
<div class="meta" id="meta">
<a href=".">index</a> ·
<span class="current">view</span> ·
<a href="./__id__:edit">edit</a> ·
<a href="./__id__:history">history</a><br>
version __version__ (__date__)
</div>
<h1 class="title">__title__</h1>
<div class="tags">
<div id="tags-menubar">
<table cellspacing=0 cellpadding=0 border=0>
<tr><td id="tag-home" onmouseover="hover_menu('home')">home</td><td>, </td>
<td id="tag-policy" onmouseover="hover_menu('policy')">policy</td></tr>
<tr><td id="arrow-home" class="arrow" onmouseover="hover_menu('home')"
onclick="event.stopPropagation(); show_menu('home')">▼</td><td></td>
<td id="arrow-policy" class="arrow" onmouseover="hover_menu('policy')"
onclick="event.cancelBubble = 1; show_menu('policy')">▼</td></tr>
<tr><td>
<div class="tag-menu" id="menu-home">
4 other pages tagged <span class="tags">home</span>:<ul>
<li><a href="Home">Home</a>
<li><a href="Home Foo">Home Foo</a>
<li><a href="a">This is a somewhat long title</a>
<li><a href="b">This is a somewhat even longer title</a></ul>
</div>
</td><td></td><td>
<div class="tag-menu" id="menu-policy">
3 other pages tagged <span class="tags">policy</span>:<ul>
<li><a href="Bylaws">Bylaws</a>
<li><a href="Constitution">Constitution</a>
<li><a href="Policies">Policies</a></ul>
</div>
</td></tr>
</table>
</div>
<div onmouseover="enter_tag_form(event)" onmouseout="exit_tag_form(event)">
<form id="tags-form" method=post action="./__id__:save">
<table cellpadding=0 cellspacing=0><tr><td class="field">
<input class="tags text" id="tags-field" type=text name=tags size=50
value="home, policy" onfocus="focus_tag_form()" onblur="blur_tag_form()">
</td><td>
<input type=submit name=submit id="tags-submit" value="save tags">
</td><td>
<input type=button id="tags-cancel" value="cancel" onclick="cancel_tag_form()">
</td></tr></table>
</form>
</div>
</div>
</div>
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
__body__
</div>
<script>
tags_form = $('tags-form');
tags_field = $('tags-field');
tags_submit = $('tags-submit');
tags_cancel = $('tags-cancel');
tags_menubar = $('tags-menubar');
</script>