From 9f3e1d8c9ae1f0dcd1cd136676469ab3a3f6c2b2 Mon Sep 17 00:00:00 2001 From: He4eT Date: Thu, 29 Jun 2023 19:22:22 +0300 Subject: [PATCH] README.md: draft --- README.md | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 98fd40c..850062d 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,24 @@ -# ElseIFPlayer +# [ElseIFPlayer](https://he4et.github.io/elseifplayer/) Interactive Fiction player for the web. Powered by [cheap-glkote](https://github.com/He4eT/cheap-glkote) and [Emglken](https://github.com/curiousdannii/emglken). To see a live demo, check out [https://he4et.github.io/elseifplayer/](https://he4et.github.io/elseifplayer/). +## Getting Started + +- Make shure that you have NodeJS and NPM installed +- Install required packages with `npm install` +- Run local development server with `npm run dev` + +## Build + +For making a production build use +`npm run build ` + +- If you want to host player on `https://your.domain/` use `npm run build /` +- For `https://your.domain/some-directory/` use `npm run build /some-derectory` + ## Direct links You can provide the direct link to your game: @@ -12,13 +26,22 @@ You can provide the direct link to your game: `/#/mode/encodedURL/[theme]/` - `mode` — player interface mode: - - `play` — default multi-window mode. - - `focus` — single window mode without additional windows, such as the status bar. -- `encodedURL` — storyfile location encoded with `encodeURIComponent`. -- `theme` — [UI theme](https://github.com/He4eT/elseifplayer/blob/master/src/themes/themes.js), optional. + - `play` — default multi-window mode + - `focus` — single window mode without additional windows, such as the status bar +- `encodedURL` — storyfile location encoded with `encodeURIComponent` +- `theme` — [UI theme](https://github.com/He4eT/elseifplayer/blob/master/src/themes/themes.js), optional -### Examples -- [Play "Lost Pig" with default or last used theme](https://he4et.github.io/elseifplayer/#/play/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/); -- [Play "Lost Pig" without statusbar with default or last used theme](https://he4et.github.io/elseifplayer/#/focus/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/); -- [Play "Lost Pig" with Nord theme](https://he4et.github.io/elseifplayer/#/play/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/nord/); -- [Play "Lost Pig" without statusbar with Dim theme](https://he4et.github.io/elseifplayer/#/focus/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/dim/); +### CORS + +If the player and your storyfile located on different domains +you shoud set appropriate [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) settings. + +In case you cannot change the server settings [Parchment Proxy](https://iplayif.com/proxy/) can be used. + +### Direct Link Examples + +- [Play "Lost Pig" with default or last used theme](https://he4et.github.io/elseifplayer/#/play/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/) +- [Play "Lost Pig" without statusbar with default or last used theme](https://he4et.github.io/elseifplayer/#/focus/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/) +- [Play "Lost Pig" with Nord theme](https://he4et.github.io/elseifplayer/#/play/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/nord/) +- [Play "Lost Pig" without statusbar with Dim theme](https://he4et.github.io/elseifplayer/#/focus/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/dim/) +- [Play "Lost Pig" loaded with Parchment Proxy](https://he4et.github.io/elseifplayer/#/play/https%3A%2F%2Fiplayif.com%2Fproxy%2F%3Furl%3Dhttps%3A%2F%2Fifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8)