UNPKG

extwee

Version:

A story compiler tool using Twine-compatible formats

327 lines (311 loc) 11.2 kB
<!DOCTYPE html> <!--[if lte IE 8]><html class="lt-ie9"><![endif]--> <!--[if gt IE 8]><!--><html><!--<![endif]--> <head> <meta charset="utf-8"> <title>Jonah</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- "VERSION" "TIME" Jonah is based on: TiddlyWiki 1.2.39 by Jeremy Ruston, (jeremy [at] osmosoft [dot] com) Published under a BSD open source license Copyright (c) Osmosoft Limited 2005 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Osmosoft Limited nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <script title="engine"> (function(){ "ENGINE" "JONAH" testplay = "START_AT"; // CssLexer/CssParser // Copyright (C) 2010 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // var lexCss;var decodeCss;(function(){function w(W){var S=parseInt(W.substring(1),16);if(S>65535){return S-=65536,String.fromCharCode(55296+(S>>10),56320+(S&1023))}else{if(S==S){return String.fromCharCode(S)}else{if(W[1]<" "){return"" }else{return W[1]}}}}function L(W,S){return'"'+W.replace(/[\u0000-\u001f\\\"<>]/g,S)+'"'}function u(S){return v[S]||(v[S]="\\"+S.charCodeAt(0).toString(16)+" ")}function c(S){return y[S]||(y[S]=(S<"\x10"?"%0":"%")+S.charCodeAt(0).toString(16))}var v={"\\":"\\\\"},y={"\\":"%5c"},V="[\\t\\n\\f ]",e=V+"*",J="[\\n\\f]",q="[\\ud800-\\udbff][\\udc00-\\udfff]",z="[\\u0080-\\ud7ff\\ue000-\\ufffd]|"+q,O="[0-9a-fA-F]{1,6}"+V+"?",X="\\\\"+O,m="(?:"+O+"|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|"+q+")",a="\\\\"+m,N="(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|"+z+"|"+a+")",B="[^'\"\\n\\f\\\\]|\\\\[\\s\\S]",P="\"(?:'|"+B+')*"|\'(?:"|'+B+")*'",t="[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)",A="(?:[a-zA-Z_]|"+z+"|"+a+")",p="(?:[a-zA-Z0-9_-]|"+z+"|"+a+")",F=p+"+",D="-?"+A+p+"*",M="@"+D,n="#"+F,C=t,x="(?:@?-?"+A+"|#)"+p+"*",U=t+"%",l=t+D,j=t+"(?:%|"+D+")?",E="url[(]"+e+"(?:"+P+"|"+N+"*)"+e+"[)]",R="U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?",o="<!--",s="-->",h=V+"+",i="/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)",b="(?!url[(])"+D+"[(]",r="~=",G="[|]=",I="[^]=",d="[$]=",g="[*]=",Q="[~|^$*]=",f="[^\"'\\\\/]|/(?![/*])",K="\\uFEFF",H=new RegExp([K,R,E,b,x,P,j,o,s,h,i,Q,f].join("|"),"gi"),T=new RegExp("\\\\(?:"+m+"|"+J+")","g"),k=new RegExp("^url\\("+e+"[\"']?|[\"']?"+e+"\\)$","gi");decodeCss=function(S){return S.replace(T,w)};lexCss=function(Y){Y=""+Y;var ac=Y.replace(/\r\n?/g,"\n").match(H)||[];var Z=0;var ad=" ";for(var aa=0,S=ac.length;aa<S;++aa){var ae=decodeCss(ac[aa]);var ab=ae.length;var W=ae.charCodeAt(0);ae=(W=='"'.charCodeAt(0)||W=="'".charCodeAt(0))?L(ae.substring(1,ab-1),u):(W=="/".charCodeAt(0)&&ab>1||ae=="\\"||ae==s||ae==o||ae=="\ufeff"||W<=" ".charCodeAt(0))?" ":/url\(/i.test(ae)?"url("+L(ae.replace(k,""),c)+")":ae;if(ad!=ae||ae!=" "){ac[Z++]=ad=ae}}ac.length=Z;return ac}})(); var parseCssStylesheet,parseCssDeclarations; (function(){function l(b,a,f,c,e){for(var d=a++;a<f&&"{"!==b[a]&&";"!==b[a];)++a;if(a<f&&(e||";"===b[a])){e=d+1;var g=a;e<f&&" "===b[e]&&++e;g>e&&" "===b[g-1]&&--g;c.startAtrule&&c.startAtrule(b[d].toLowerCase(),b.slice(e,g));a="{"===b[a]?m(b,a,f,c):a+1;c.endAtrule&&c.endAtrule()}return a}function m(b,a,f,c){++a;for(c.startBlock&&c.startBlock();a<f;){var e=b[a].charAt(0);if("}"==e){++a;break}a=" "===e||";"===e?a+1:"@"===e?l(b,a,f,c,!1):"{"===e?m(b,a,f,c):n(b,a,f,c)}c.endBlock&&c.endBlock();return a} function n(b,a,f,c){var e=a,d=p(b,a,f,!0);if(0>d)return d=~d,d===e?d+1:d;var g=b[d];if("{"!==g)return d===e?d+1:d;a=d+1;d>e&&" "===b[d-1]&&--d;for(c.startRuleset&&c.startRuleset(b.slice(e,d));a<f;){g=b[a];if("}"===g){++a;break}a=" "===g?a+1:q(b,a,f,c)}c.endRuleset&&c.endRuleset();return a}function p(b,a,f,c){for(var e,d=[],g=-1;a<f;++a)if(e=b[a].charAt(0),"["===e||"("===e)d[++g]=e;else if("]"===e&&"["===d[g]||")"===e&&"("===d[g])--g;else if("{"===e||"}"===e||";"===e||"@"===e||":"===e&&!c)break;0<= g&&(a=~(a+1));return a}function r(b,a,f){for(;a<f&&";"!==b[a]&&"}"!==b[a];)++a;return a<f&&";"===b[a]?a+1:a}function q(b,a,f,c){var e=b[a++];if(!s.test(e))return r(b,a,f);var d;a<f&&" "===b[a]&&++a;if(a==f||":"!==b[a])return r(b,a,f);++a;a<f&&" "===b[a]&&++a;d=a;a=p(b,a,f,!1);if(0>a)a=~a;else{for(var g=[],h=0,k=d;k<a;++k)d=b[k]," "!==d&&(g[h++]=d);if(a<f){do{d=b[a];if(";"===d||"}"===d)break;h=0}while(++a<f);";"===d&&++a}h&&c.declaration&&c.declaration(e.toLowerCase(),g)}return a}parseCssStylesheet= function(b,a){var f=lexCss(b);a.startStylesheet&&a.startStylesheet();for(var c=0,e=f.length;c<e;){var d;if(" "===f[c])d=c+1;else{d=f;var g=e,h=a;d=c<g?"@"===d[c].charAt(0)?l(d,c,g,h,!0):n(d,c,g,h):c}c=d}a.endStylesheet&&a.endStylesheet()};var s=/^-?[a-z]/i;parseCssDeclarations=function(b,a){for(var f=lexCss(b),c=0,e=f.length;c<e;)c=" "!==f[c]?q(f,c,e,a):c+1}})(); }()); </script> <script title="modules"> "JQUERY" "MODERNIZR" </script> <style id="baseCSS"> #passages { position:relative; padding-bottom: 12em; } .content a { color: #4d6ad8; } a.internalLink, a.externalLink, a.back, a.return, [data-passage] { cursor: pointer; } a.brokenLink { background-color: red; color: black; } .marked { background-color: pink; margin-right: 12px; } .marked[title] { cursor: help; } #floater { position: fixed; right: 0; top: 0; z-index: 5; background-color: #fff; } .toolbar { padding: 0; visibility: hidden; } .toolbar a { cursor:pointer; } .passage:hover .toolbar { visibility: visible; } .passage li[data-bullet] { list-style-type: none; } .passage li[data-bullet]:before { content: attr(data-bullet); position: relative; left: -1em; } .toolbar a { margin-left: 12px; } #storeArea { display: none; } img { vertical-align:bottom; } #noscript { font-size: 120%; font-weight: bold; } #loadingbar { position:fixed; top:0; left:0; border-top: solid #4d6ad8 6px; transition: width 0.5s; } </style> <style id="defaultCSS"> body { font-family: Verdana,sans-serif; font-size: 62.5%; margin: 0; background-color: #f8f8f8; color: #303030; text-align: center; } h1,h2,h3 { color: #000; font-weight: normal; text-align: center; } #content1 { text-align: left; } h1 { font-size: 4em; line-height: 1.2em; margin-bottom: 0; margin-top: 1em; } h2 { font-size: 1.4em; font-style: italic; margin-top: 1em; } h3 { font-size: 1.3em; margin-bottom: 5em; margin-top: .8em; } .passage { background-color: #f8f8f8; font-size: 1.3em; line-height: 175%; margin-bottom: 2em; } .content a { font-weight: bold; text-decoration: none; } .content a:hover { text-decoration: underline; color: #8ea6ff; } .passage:not(:last-child):not(:hover) { opacity: 0.4; transition: 0.5s; -webkit-transition: 0.5s; } .passage center { max-width:50%; margin:auto; } input, button { font-size: 1.2em; } button { padding: 0.2em 0.8em; } input[type=text] { width: 20%; } .toolbar a { color: #999; text-decoration: none; } .toolbar a:hover { text-decoration: underline; color: #8ea6ff; } .title { color: #000; font: bold 1.4em Verdana,sans-serif; line-height: 200%; } #footer { font-size: 1.1em; font-style: italic; margin-top: 5em; text-align: center; } #footer a.externalLink { border-bottom: 1px solid #464646; color: #464646; font-weight: normal; } #floater { border-left: 1px solid #ddd; border-bottom: 2px solid #aaa; font-size: 1.1em; padding: 0 20px; text-align: center; line-height: 100%; } #floater ul { text-align: left; } #floater a { color: #999; cursor:pointer; font-weight: bold; text-decoration: none; } #floater a:hover { color: #8ea6ff; text-decoration: underline; } #content1 { margin: 0 12.7% 1em 12.7%; text-align: left; } .passage table { border-collapse: collapse; font-size: 100%; margin: .8em 1.0em; } .passage th,.passage td,.passage tr,.passage caption { padding: 3px; } .passage hr { height: 1px; } .toolbar { font-size: .5em; } .toolbar a { margin-left: 12px; } .passage ul, .passage ol { margin-left: .5em; padding-left: 1.5em; } li { list-style-type: square; } </style> <style id="transitionCSS"> .transition-in { opacity:0; position: absolute; } .passage { transition: 1s; -webkit-transition: 1s; } .transition-out { opacity:0 !important; } </style> <style id="storyCSS"></style> <style id="tagCSS"></style> </head> <body> <div id="loadingbar"></div> <div id="floater"><div class="container"> <div id="storyMenu" class="storyElement"></div> <p><a id="restart" href="#">Restart Story</a></p> </div></div> <div id="content1"><div id="content2"> <div id="header"></div><div id="titleLine"></div> <h1><span id="storyTitle" class="storyElement"></span></h1> <h2><span id="storySubtitle" class="storyElement"></span></h2> <h3><span id="storyAuthor" class="storyElement"></span></h3> <div id="passages"><noscript><div id="noscript">Please enable Javascript to play this story!</div></noscript> <style> #floater {display:none;} </style></div> <p id="footer"> This story was created with <a class="externalLink" href="http://twinery.org/">Twine</a> and is powered by <a class="externalLink" href="http://www.tiddlywiki.com/">TiddlyWiki</a>. </p> </div></div> <div id="storeArea" data-size="STORY_SIZE" hidden>"STORY"</div></body></html>