Dirty markup

This commit is contained in:
He4eT 2021-03-02 01:28:45 +05:00
commit dddf378977
5 changed files with 131 additions and 27 deletions

View file

@ -19,31 +19,93 @@ export default function ({ themeEngine }) {
const [targetUrl, setTargetUrl] = useState(null)
return (
<main>
<main className='view home'>
<h1>
ifplayer
</h1>
<p>
You can browse some <Link href='/top100'>
games from IFDB
</Link> or play a game from a file.
Interactive Fiction interpreter
that runs right in your browser.
<br />
Powered by <a
target="_blank"
href="https://github.com/He4eT/emglken">
Emglken
</a> and <a
target="_blank"
href="https://github.com/He4eT/cheap-glkote">
cheap-glkote
</a>.
</p>
<ul>
<li>
<ThemeSelector {...{
themeEngine
}} />
</li>
<li>
<p>
Source code can be found here: <a
target="_blank"
href="https://github.com/He4eT/ifplayer">
ifplayer
</a>.
</p>
<hr />
<h3>
Interface theme
</h3>
<p>
<ThemeSelector {...{
themeEngine
}} />
<br /><br />
<small>
Themes without borders
are better suited for small screens.
</small><br />
<small>
Double-click on the input field during the game
to enter full-screen mode.
</small>
</p>
<hr />
<h3>
Play a game from the list
</h3>
<p>
<Link href='/top100'>IFDB Top 100 games</Link>
</p>
<hr />
<h3>
Play the game from a file
</h3>
<p>
<details>
<summary>Supported formats</summary>
<ul>
<li>TADS games (.t3, .gam);</li>
<li>Z-machine games (.z3, .z4, .z5, .z8, .blorb);</li>
<li>Glulx VM games (.gblorb, .ulx);</li>
<li>Hugo games (.hex);</li>
<li>Text-only games are supported;</li>
</ul>
</details>
</p>
<p className='play'>
<label>
<div>
Local file:
</div>
<FileSelector {...{
setTargetName,
setTargetUrl
}} />
</li>
<li>
</label>
<label>
<div>
Direct link:
</div>
<URLSelector {...{
setTargetName,
setTargetUrl
}} />
</li>
</ul>
</label>
</p>
{ targetUrl
? playButton(targetName, targetUrl, themeEngine.currentTheme)
: null }

View file

@ -15,7 +15,7 @@ export default function ({ setTheme, theme, encodedUrl }) {
}, [encodedUrl])
return (
<main>
<main className='view playerView'>
<UrlPlayer url={targetUrl} />
</main>
)