on master help sign in
Cat over Term
03d9cc6Devine Lu Linvega
links/main.css+1
@@ -79,6 +79,7 @@ body #portal ul li a:hover { text-decoration: underline; }
79
79
80/* Wiki */
80/* Wiki */
81
81
82+body #wiki { background: #ccc; color:#333; }
82body #wiki #entry { max-width: calc(100% - 230px); margin-bottom: 30px; line-height: 15px }
83body #wiki #entry { max-width: calc(100% - 230px); margin-bottom: 30px; line-height: 15px }
83body #wiki #entry a { text-decoration: underline; }
84body #wiki #entry a { text-decoration: underline; }
84body #wiki ul.term { border-bottom: 0px; margin-bottom: 0px; padding-bottom: 0px}
85body #wiki ul.term { border-bottom: 0px; margin-bottom: 0px; padding-bottom: 0px}
scripts/wiki.js+4−4
@@ -37,16 +37,16 @@ function Wiki (sites) {
37 this.refresh = () => {
37 this.refresh = () => {
38 // Main
38 // Main
39 if (this.loc) {
39 if (this.loc) {
40− if (this.byName[this.loc]) {
41− let html = `${this.templateTerm(this.loc, this.byName[this.loc])}<br />${this.templateRelated(this.loc, this.byName[this.loc])}`
42− this._entry.innerHTML = html
43− } else if (this.byCat[this.loc]) {
40+ if (this.byCat[this.loc]) {
44 let html = ''
41 let html = ''
45 for (const id in this.byCat[this.loc]) {
42 for (const id in this.byCat[this.loc]) {
46 const name = this.byCat[this.loc][id].name
43 const name = this.byCat[this.loc][id].name
47 html += `${this.templateTerm(name, this.byName[name])}<br />`
44 html += `${this.templateTerm(name, this.byName[name])}<br />`
48 }
45 }
49 this._entry.innerHTML = html
46 this._entry.innerHTML = html
47+ } else if (this.byName[this.loc]) {
48+ let html = `${this.templateTerm(this.loc, this.byName[this.loc])}<br />${this.templateRelated(this.loc, this.byName[this.loc])}`
49+ this._entry.innerHTML = html
50 } else {
50 } else {
51 let html = `Unknown: ${this.loc}. Retun <a onclick='wiki.go("")'>home</a>, or try a <a onclick='wiki.go("${this.random()}")'>random page</a>.`
51 let html = `Unknown: ${this.loc}. Retun <a onclick='wiki.go("")'>home</a>, or try a <a onclick='wiki.go("${this.random()}")'>random page</a>.`
52 this._entry.innerHTML = html
52 this._entry.innerHTML = html