« get me outta code hell

move more static site content into data files - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/upd8.js
diff options
context:
space:
mode:
author(quasar) nebula <towerofnix@gmail.com>2020-10-30 10:54:59 -0300
committer(quasar) nebula <towerofnix@gmail.com>2020-10-30 10:54:59 -0300
commit2aca98d1c52c7b27bff593674fa78b5de7a3faf0 (patch)
tree6a147c115c7b2231e90450fdaa61d10ed684a837 /upd8.js
parent9ee4d8d8825cb9f42b8d5c3e4fafd3f1ede38f63 (diff)
move more static site content into data files
Diffstat (limited to 'upd8.js')
-rw-r--r--upd8.js56
1 files changed, 9 insertions, 47 deletions
diff --git a/upd8.js b/upd8.js
index 522fb27..62a9cfa 100644
--- a/upd8.js
+++ b/upd8.js
@@ -113,53 +113,15 @@ const SITE_TITLE = 'Homestuck Music Wiki';
 const SITE_VERSION = 'autumnal polish haul';
 const SITE_RELEASE = '10 October 2020';
 
-const SITE_ABOUT = fixWS`
-    <p>Welcome to my fan-made Homestuck music wiki!</p>
-    <p><a href="https://www.homestuck.com/">Homestuck</a> has always been an incredible creative collaboration, and especially beloved by the community and critical in that collaboration is the webcomic and world's humongous soundtrack, comprising well over 500 tracks by dozens of musicians and artists. This wiki aims to be an interesting and useful resource for anyone interested in that music, as well as an archive for all things related.</p>
-    <p>Pertaining to the history of this site: it was originally made as a remake of Homestuck's official <a href="https://homestuck.bandcamp.com/">Bandcamp</a>, which saw its content particularly reduced on <a href="https://twitter.com/hamesatron/status/1187842783618297856">10/25/19</a>. This site aims to be a more reliable resource and reference: track art (conspicuously missing from the Bandcamp) is archived here, solo albums (among other missing albums, like [[album:Squiddles!]]) are all indexed in the one place, and URLs will always stay consistent. And of course, also included are links for listening on Bandcamp and other services.</p>
-    <p>The code for this website is open source (GPL-3.0), and can be explored or forked <a href="https://github.com/hsmusic/hsmusic.github.io/">here</a>. I don't actively keep track of issues or PRs raised there; if you want to get in touch with feature requests or comments on the code, my contact info is <a href="feedback/">here</a>!</p>
-    <p><i>Resource &amp; Author Credits</i></p>
-    <ul>
-        <li>Florrie: that's me! I programmed most of the site, and put the whole thing together. <a href="feedback/">Say hi</a>!</li>
-        <li><a href="https://homestuck.bandcamp.com/">Homestuck's Bandcamp</a>, the official host of Homestuck's music: I got almost all the official album listings and basic track info from here.</li>
-        <li>GiovanH's <a href="https://my.pcloud.com/publink/show?code=kZdJQ8kZNyIwh0Hn1ime6Ty7L2J87BE3E2ak">complete track art archive</a>: track art! A million thanks for putting this together and sharing this with me. (Prior to this, I used the <a href="https://web.archive.org/web/20190720035022/https://homestuck.bandcamp.com/music">Web Archive</a> to gather track art.)</li>
-        <li><a href="https://homestuck.net/music/references.html">NSND</a>: leitmotifs! Thanks to this site in combination with credits on the bandcamp and artists' own commentary, this wiki is a rather comprehensive resource for leitmotifs and other track references.</li>
-        <li><a href="https://www.bgreco.net/hsflash.html">bgreco.net (HQ Audio Flashes)</a>: thumbnail captures for the individual Flash animations! There were a couple captures missing that I took myself, but most Flash thumbnails are from here.</a></li>
-        <li>The <a href="https://homestuck-and-mspa-music.fandom.com/wiki/Homestuck_and_MSPA_Music_Wiki">Homestuck and MSPA Music Wiki</a> on Fandom: the inspiration for this wiki! I've wanted to make a more complete and explorable wiki ever since seeing it. The Fandom wiki has also been a very handy reference in putting this together, so much thanks to everyone who's worked on it!</li>
-        <li><a href="https://carrd.co/">carrd.co</a>: I stole your icons.svg file. It is mine now. :tobyfox_dog_sunglasses:</li>
-        <li>All organizers and contributors of the <a href="https://sollay-b.tumblr.com/post/188094230423/hello-a-couple-of-years-ago-allyssinian">Homestuck Vol. 5 Anthology</a> - community-made track art for [[album:Homestuck Vol. 5]]! All of this art is <i>excellent</i>. Each track credits its respective cover artist.</li>
-        <li>Likewise for the <a href="https://hsfanmusic.skaia.net/post/619761136023257089/unofficialmspafans-we-are-proud-to-announce-the">Beyond Canon Track Art Anthology</a> as well as <a href="https://alterniaart.tumblr.com/">Alternia/Bound</a>!</li>
-        <li>All comments on the site: I appreciate all feedback a lot! People have shared a ton of ideas and suggestions with me, and I <i>cannot</i> emphasize enough how motivating it is to share a project with like-minded folx interested in making it better with you.</li>
-    </ul>
-    <p><i>Feature Acknowledgements</i></p>
-    <ul>
-        <li><b>Thank you,</b> GiovanH, for linking me to a resource for higher quality cover art, and bringing to my attention the fact that clicking a cover art on Bandcamp to zoom in will often reveal a higher quality image.</li>
-        <li>cosmogonicalAuthor, for a variety of feature requests and comments! In particular: improving way the track list on author pages is sorted; expanding the introduction; expanding the introduction message to the website; and linking bonus art for Homestuck Vol. 5 - plus a few other good suggestions I haven't gotten to yet. Thanks!</li>
-        <li>Monckat, for suggesting the album Strife 2 before I'd begun adding fandom-created albums and unofficial releases to this wiki, and for working with an emailer to reupload the original cover art for [[track:the-thirteenth-hour]].</li>
-        <li>Kidpen, for suggesting the "Flashes that feature this track" feature.</li>
-        <li>an emailer, for suggesting the "Random track" feature.</li>
-        <li>foreverFlumoxed, for pointing out that [[flash:338]] contains reference to [[JOHN DO THE WINDY THING]] (this reminded me to add all the unreleased Flash tracks to the Unreleased Tracks album!), for recommending the restructure to [[album:Unreleased Tracks]], and for going to the massive effort of checking every track page and pointing out a bunch of missing cover arts and title typos!</li>
-        <li>Makin, for various initial help in data collection (especially commentary) and lifting the site off the ground by pinning it to the top of the /r/homestuck subreddit for a while, and for linking me the independent release of <a href="https://jamesdever.bandcamp.com/album/sburb">Sburb</a>.</li>
-        <li>an emailer, for sending a crop of the YT thumbnail art for [[After the Sun]] (plus the SoundCloud link for that track), for reporting the "Random" buttons being broken, and for linking a bunch of resources and various official uploads of tracks and albums.</li>
-        <li>Thanks for pointing out typos, errors in reference lists, and out of date details: cookiefonster, foreverFlummoxed, and an emailer.</li>
-    </ul>
-`;
-
-const SITE_CHANGELOG = fs.readFileSync(`${C.DATA_DIRECTORY}/changelog.html`).toString().trim(); // fight me bro
-
-const SITE_FEEDBACK = fixWS`
-    <p><strong>Feature requests?<br>Noticed any errors?<br>Itching to see that one missing album on the wiki?</strong></p>
-    <p>Please let me know! I appreciate feedback a lot, and always want to make this site better.</p>
-    <p>The best place to talk about this site is on its <a href="https://forum.homestuck.xyz/viewtopic.php?f=7&t=151">HomestuckXYZ forum thread</a>.</p>
-    <p>Or, if forums aren't really the thing for you, I've got an email too: towerofnix at gmail dot beans. (You know the domain.)</p>
-    <p>I used to have a Twitter account, but Twitter is bad and poofing from it was probably my greatest decision.</p>
-    <p>Thank you for sharing your feedback!</p>
-`;
-
-const SITE_JS_DISABLED = fixWS`
-    <p>Sorry, that link won't work unless you're running a web browser that supports relatively modern JavaScript.</p>
-    <p>Please press the back button to get where you were, or <a href="./">head back to the index</a>.</p>
-`;
+function readDataFile(file) {
+    // fight me bro
+    return fs.readFileSync(path.join(C.DATA_DIRECTORY, file)).toString().trim();
+}
+
+const SITE_ABOUT = readDataFile('about.html');
+const SITE_CHANGELOG = readDataFile('changelog.html');
+const SITE_FEEDBACK = readDataFile('feedback.html');
+const SITE_JS_DISABLED = readDataFile('js-disabled.html');
 
 // Might ena8le this later... we'll see! Eventually. May8e.
 const ENABLE_ARTIST_AVATARS = false;