mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
PlayerView: focus as a mode
This commit is contained in:
parent
6eb20f8db3
commit
fdd49f8621
3 changed files with 12 additions and 19 deletions
12
README.md
12
README.md
|
|
@ -9,16 +9,16 @@ To see a live demo, check out [https://he4et.github.io/elseifplayer/](https://he
|
||||||
|
|
||||||
You can provide the direct link to your game:
|
You can provide the direct link to your game:
|
||||||
|
|
||||||
`/#/play/encodedURL/[theme]/[mode]/`
|
`/#/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`.
|
- `encodedURL` — storyfile location encoded with `encodeURIComponent`.
|
||||||
- `theme` — [UI theme](https://github.com/He4eT/elseifplayer/blob/master/src/themes/themes.js), optional.
|
- `theme` — [UI theme](https://github.com/He4eT/elseifplayer/blob/master/src/themes/themes.js), optional.
|
||||||
- `mode` — player interface mode, optional:
|
|
||||||
- the default mode is used if the option is not set.
|
|
||||||
- `focus` — single window mode without additional windows, such as the status bar.
|
|
||||||
|
|
||||||
### Examples
|
### 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" 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/#/play/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/focus/);
|
- [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" 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/#/play/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/dim/focus/);
|
- [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/);
|
||||||
|
|
|
||||||
12
src/index.js
12
src/index.js
|
|
@ -50,15 +50,15 @@ function App () {
|
||||||
<Route path='/play/:encodedUrl'>
|
<Route path='/play/:encodedUrl'>
|
||||||
{ playerView(themeEngine, false) }
|
{ playerView(themeEngine, false) }
|
||||||
</Route>
|
</Route>
|
||||||
<Route path='/play/:encodedUrl/focus'>
|
|
||||||
{ playerView(themeEngine, true) }
|
|
||||||
</Route>
|
|
||||||
<Route path='/play/:encodedUrl/:theme/focus'>
|
|
||||||
{ playerView(themeEngine, true) }
|
|
||||||
</Route>
|
|
||||||
<Route path='/play/:encodedUrl/:theme'>
|
<Route path='/play/:encodedUrl/:theme'>
|
||||||
{ playerView(themeEngine, false) }
|
{ playerView(themeEngine, false) }
|
||||||
</Route>
|
</Route>
|
||||||
|
<Route path='/focus/:encodedUrl'>
|
||||||
|
{ playerView(themeEngine, true) }
|
||||||
|
</Route>
|
||||||
|
<Route path='/focus/:encodedUrl/:theme'>
|
||||||
|
{ playerView(themeEngine, true) }
|
||||||
|
</Route>
|
||||||
|
|
||||||
<Route>
|
<Route>
|
||||||
<NotFoundView />
|
<NotFoundView />
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
.app.play {
|
.app.play, .app.focus {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 800px) {
|
|
||||||
.app.play main {
|
|
||||||
max-height: 90%;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue