mirror of
https://github.com/Oreolek/gamebookformat.git
synced 2024-06-01 07:48:12 +03:00
106 lines
3.6 KiB
HTML
106 lines
3.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset='utf-8'>
|
|
<meta name="viewport"
|
|
content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<title>Gamebook</title>
|
|
<script type="text/javascript" src="gamebookformatplay.js"></script>
|
|
<link rel="stylesheet" href="gamebookformat.css"
|
|
type="text/css" />
|
|
<script>
|
|
gamebook.id = 'references';
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="hideintrolink nodisplay"
|
|
onclick="gamebook.hideIntroSections()">(hide instructions)</div>
|
|
<div class="gamebook">
|
|
<div class="introsection">
|
|
<div class="introsectionheading">Introduction</div>
|
|
<div class="introsectionbody">
|
|
This gamebook demonstrates simple references between sections. Also notice that an intro section like this one can reference sections, like the start at <a class="sectionref enabledlink" data-ref="1">1</a> or the next section at <a class="sectionref enabledlink" data-ref="400">400</a>.
|
|
</div>
|
|
</div>
|
|
|
|
<div class="resumelink nodisplay"
|
|
onclick="gamebook.loadGame()">Resume saved game.</div>
|
|
|
|
<div class="startlink"
|
|
onclick="gamebook.turnTo(1)">Turn to 1 to begin.</div>
|
|
<script>
|
|
if (gamebook.hasSavedGame()) {
|
|
var resumeLinks = document.getElementsByClassName('resumelink');
|
|
Array.prototype.forEach.call(resumeLinks, function(e) {
|
|
e.classList.remove('nodisplay');
|
|
});
|
|
}
|
|
</script>
|
|
<div class="section" id="section1">
|
|
<div class="sectionnumber" id="para1">1</div>
|
|
<div class="sectiontext">
|
|
This is where the adventure begins. You can go on to the next section, see <a class="sectionref enabledlink" data-ref="400">400</a> or try the random selection feature at <a class="sectionref enabledlink" data-ref="399">399</a>.
|
|
</div>
|
|
</div>
|
|
<script>
|
|
if (this.gamebook) {
|
|
gamebook.addSection(1, document.getElementById('section1'));
|
|
}
|
|
</script><div class="section" id="section397">
|
|
<div class="sectionnumber" id="para397">397</div>
|
|
<div class="sectiontext">
|
|
The end.
|
|
</div>
|
|
</div>
|
|
<script>
|
|
if (this.gamebook) {
|
|
gamebook.addSection(397, document.getElementById('section397'));
|
|
}
|
|
</script><div class="section" id="section398">
|
|
<div class="sectionnumber" id="para398">398</div>
|
|
<div class="sectiontext">
|
|
Alternative ending.
|
|
</div>
|
|
</div>
|
|
<script>
|
|
if (this.gamebook) {
|
|
gamebook.addSection(398, document.getElementById('section398'));
|
|
}
|
|
</script><div class="section" id="section399">
|
|
<div class="sectionnumber" id="para399">399</div>
|
|
<div class="sectiontext">
|
|
<span class="random enabledlink">Pick a destination at random</span> from <a class="sectionref enabledlink" data-ref="400">400</a> or <a class="sectionref enabledlink" data-ref="397">397</a> or <a class="sectionref enabledlink" data-ref="398">398</a>.
|
|
</div>
|
|
</div>
|
|
<script>
|
|
if (this.gamebook) {
|
|
gamebook.addSection(399, document.getElementById('section399'));
|
|
}
|
|
</script><div class="section" id="section400">
|
|
<div class="sectionnumber" id="para400">400</div>
|
|
<div class="sectiontext">
|
|
This is the next section. Go on to the end at <a class="sectionref enabledlink" data-ref="397">397</a>.
|
|
</div>
|
|
</div>
|
|
<script>
|
|
if (this.gamebook) {
|
|
gamebook.addSection(400, document.getElementById('section400'));
|
|
}
|
|
</script> <div id="collections" class="collections">
|
|
</div>
|
|
<div id="collectionTemplate" class="collectionTemplate">
|
|
<span class="collectionheading"></span>
|
|
<span class="collectioncontents"></span>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
if (this.gamebook) {
|
|
gamebook.runActionsInIntroSections();
|
|
}
|
|
</script>
|
|
<div class="displayintrolink nodisplay"
|
|
onclick="gamebook.showIntroSections()">(show instructions)</div>
|
|
</div>
|
|
</body>
|
|
</html>
|