| 0 | 1 'use strict'; | 
|  | 2 | 
|  | 3 function head() { | 
|  | 4 	document.write(`\ | 
|  | 5 		<meta name="viewport" content="width=device-width, initial-scale=1"> | 
| 22 | 6 		<link rel="canonical" href="https://www.arkian.net${location.pathname}${location.search}" /> | 
| 0 | 7 		<style> | 
|  | 8 			@import "/site.css"; | 
|  | 9 		</style> | 
|  | 10 `	); | 
|  | 11 } | 
|  | 12 | 
|  | 13 function header() { | 
|  | 14 	document.write(`\ | 
|  | 15 		<div header> | 
|  | 16 			<span breadcrumbs> | 
|  | 17 				<a href="/">Arkian</a> | 
|  | 18 			</span> | 
|  | 19 			<span>by <a href="https://linkmy.style/fschmidt">fschmidt</a></span> | 
|  | 20 		</div> | 
|  | 21 `	); | 
|  | 22 } | 
|  | 23 | 
|  | 24 function showToc(content) { | 
|  | 25 	document.writeln('<ul>'); | 
|  | 26 	for( let id in content ) { | 
|  | 27 		let info = content[id]; | 
|  | 28 		document.writeln(`<li><a id="c_${id}" href="#${id}">${info.title}</a>`); | 
|  | 29 		let subs = info.subs; | 
|  | 30 		if( subs ) { | 
|  | 31 			showToc(subs); | 
|  | 32 		} | 
|  | 33 		document.writeln('</li>'); | 
|  | 34 	} | 
|  | 35 	document.writeln('</ul>'); | 
|  | 36 } | 
|  | 37 | 
|  | 38 function showContent(content,h) { | 
|  | 39 	for( let id in content ) { | 
|  | 40 		let info = content[id]; | 
|  | 41 		document.write(`\ | 
|  | 42 			<div heading> | 
|  | 43 				<h${h}><a id="${id}" href="#${id}">${info.title}</a></h${h}> | 
|  | 44 				<a href="#c_${id}">contents</a> | 
|  | 45 			</div> | 
|  | 46 `		); | 
|  | 47 		if( info.content ) | 
|  | 48 			document.write(info.content); | 
|  | 49 		let subs = info.subs; | 
|  | 50 		if( subs ) { | 
|  | 51 			showContent(subs,h+1) | 
|  | 52 		} | 
|  | 53 	} | 
|  | 54 } | 
| 6 | 55 | 
| 14 | 56 function mikraite(url,year) { | 
|  | 57 	document.writeln(`<p>From <a href="${url}">Mikraite Forum</a> in ${year}</p>`); | 
| 6 | 58 } |