on master help sign in
Cat over Term
commit03d9cc6b7eef74b6dc03bd7e475531dc40bb07eb authorDevine Lu Linvega <aliceffekt@gmail.com> dateMon 29 Jul 2019, 11:15 (7 years ago) parent6096efe
2 files changed+5−4
links/main.css+1 scripts/wiki.js+4−4
links/main.css+1
@@ -79,6 +79,7 @@ body #portal ul li a:hover { text-decoration: underline; }
7979
8080/* Wiki */
8181
82+body #wiki { background: #ccc; color:#333; }
8283body #wiki #entry { max-width: calc(100% - 230px); margin-bottom: 30px; line-height: 15px }
8384body #wiki #entry a { text-decoration: underline; }
8485body #wiki ul.term { border-bottom: 0px; margin-bottom: 0px; padding-bottom: 0px}
scripts/wiki.js+4−4
@@ -37,16 +37,16 @@ function Wiki (sites) {
3737 this.refresh = () => {
3838 // Main
3939 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]) {
4441 let html = ''
4542 for (const id in this.byCat[this.loc]) {
4643 const name = this.byCat[this.loc][id].name
4744 html += `${this.templateTerm(name, this.byName[name])}<br />`
4845 }
4946 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
5050 } else {
5151 let html = `Unknown: ${this.loc}. Retun <a onclick='wiki.go("")'>home</a>, or try a <a onclick='wiki.go("${this.random()}")'>random page</a>.`
5252 this._entry.innerHTML = html