-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdoth.k
More file actions
16 lines (12 loc) · 1.14 KB
/
doth.k
File metadata and controls
16 lines (12 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
\d .h
jx:{[j;x]x:. x;N:(*."\\C")-4;$[$[.Q.qt[x];N<n:#x;0];(" "/:ha'["?[",/:$(0;0|j-N),|&\(n-N;j+N);$`home`up`down`end],,($n),"[",($j),"]";"");()],,htbl .q.sublist[j,N]x}
htbl:{g:{(#*y)#'(,,"<",x),y,,,"</",x:($x),">"};
,/htac[`table;(,`class)!,"striped"](htc[`thead]htc[`tr]@,/htc[`th]'$!x),htc[`tbody]@,/,/'+g[`tr]@,/`td g',:'$. x:+0!x}
sa:htac[`style;(,`type)!,"text/css"]"@import 'doth.css';"
sb:htac[`script;`type`src!("text/javascript";"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js")]""
sc:htac[`script;`type`src!("text/javascript";"doth.js")]""
html:{htc[`html]htc[`head;sa,sb,sc],htc[`body]x}
fram:{htc[`html]htc[`head]htc[`title;x],htac[`frameset;(`frameborder`cols)!("no";($116|316&43+(7+"?"~*z)*|/#:'y),",*")]@,/hta[`frame]'((,`src)!,*z;`name`src!`v,,*|z)}
.z.ph:{x:uh$[@x;x;*x];$[~#x;hy[`htm]fram[$.z.f;x]("?";"?",*x:$."\\a");x~,"?";hy[`htm]html$[#."\\a";htbl([]table:{hb["?",x]x}'$."\\a");""];"?["~2#x;hy[`htm]html@,/jx["J"$2_x]R
"?"=*x;@[{hy[`htm]html@,/jx[0j]R::1_x};x;he];"?"in x;@[{hy[t]@`/:tx[t:`$-3#n#x]@.(1+n:x?"?")_x};x;he]
#r:@[1::;`$":",p:HOME,"/",x;""];hy[`$(1+x?".")_x]"c"$r;hn["404 Not Found";`txt]p,": not found"]}