This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(replace: "↶")[👈] | |
(replace: "↷")[👉] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400;1,600&display=swap'); | |
tw-story { | |
display: block; /* reset */ | |
width: 90vw; /* width on viewports <1000 */ | |
margin: auto; | |
padding: 2rem 0; | |
padding-bottom: 2rem; | |
background: #fff; /* reset */ | |
color: #404040; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[DEFAULT CHOICE PASSAGE NAME]] <!-- This is the passage you will go to if no action is taken --> | |
[[PASSAGE NAME]] | |
<!-- Timer code below --> | |
{(live: XX+8s)[(replace: "PASSAGE NAME")[**~~PASSAGE NAME~~**]]}<!-- This will cross out a link to a passage. The time (live: XX+8s) is meant to make it happen 8 seconds after the 10 second countdown starts. --> | |
{(live: XXs)[(stop:) <!-- "XXs" is the amount of seconds you want to wait before the countdown starts --> | |
(set: $counter to 10) | |
Time left: |amount>[$counter] | |
(live: 1s)[ | |
(set: $counter to it - 1) | |
(if: $counter is 0)[(go-to: "DEFAULT CHOICE PASSAGE NAME")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* My Harelowe Game Styles */ | |
@import url('https://fonts.googleapis.com/css?family=Poppins:200,600'); | |
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono:300,700'); | |
html, tw-story { | |
background-color: #F2F2F2; | |
color: #242424; | |
} | |
tw-sidebar { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_expires.c> | |
<FilesMatch "serviceworker.js"> | |
ExpiresDefault "access plus 0 seconds" | |
</FilesMatch> | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"lang": "en", | |
"name": "My Game", | |
"short_name": "My Game", | |
"description": "My super awesome twine game", | |
"start_url": "/index.html", | |
"background_color": "#000000", | |
"theme_color": "#202020", | |
"display": "standalone", | |
"icons": [{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
if (navigator.serviceWorker) { | |
navigator.serviceWorker.register('/serviceworker.js'); | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const version = 'V0.03'; | |
const staticCacheName = version + 'staticfiles'; | |
addEventListener('install', installEvent => { | |
skipWaiting(); | |
installEvent.waitUntil( | |
caches.open(staticCacheName) | |
.then(staticCache =>{ | |
// These files don't block installation | |
staticCache.addAll([ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Setup | |
########## Include for desktop projects ########## | |
# Tell computers with touch screens to use the mouse | |
if Utils.isDesktop() or not Utils.isTouch() | |
Framer.Extras.TouchEmulator.disable() | |
preventer = () -> alert "Please use your mouse and not the touch screen." | |
preventer2 = (event) -> if event.pointerType is "touch" then preventer() # Edge-only | |
window.addEventListener("touchstart", preventer, false) | |
window.addEventListener("pointerdown", preventer2, false) | |
# Ensures that the alert also fires for Edge |