mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
Add GameEntry component
This commit is contained in:
parent
a7603a4cf8
commit
9e4e101495
5 changed files with 96 additions and 5 deletions
58
src/views/GamesView.jsx
Normal file
58
src/views/GamesView.jsx
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
import { h } from 'preact'
|
||||
import { useEffect } from 'preact/hooks'
|
||||
import { Link } from 'wouter-preact'
|
||||
|
||||
import GameEntry from
|
||||
'~/src/components/GameEntry/GameEntry'
|
||||
|
||||
import './style/GamesView.css'
|
||||
|
||||
const tutorialGame = {
|
||||
name: 'The Dreamhold',
|
||||
ifdb: 'https://ifdb.org/viewgame?id=3myqnrs64nbtwdaz',
|
||||
url: 'http://mirror.ifarchive.org/if-archive/games/zcode/dreamhold.z8'
|
||||
}
|
||||
|
||||
export default function ({ setTheme, theme }) {
|
||||
useEffect(() => setTheme(theme), [theme])
|
||||
|
||||
return (
|
||||
<main className='view games'>
|
||||
|
||||
<h1>
|
||||
<a
|
||||
target='_blank'
|
||||
href='https://ifdb.org/'
|
||||
title='The Interactive Fiction Database'>
|
||||
IFDB
|
||||
</a> games
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
Choose one or <Link href='/'>
|
||||
go back
|
||||
</Link>.
|
||||
</p>
|
||||
|
||||
<h2>
|
||||
Tutorial
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
If you are not familiar with Interactive Fiction,
|
||||
you should start with this tutorial game
|
||||
by Andrew Plotkin.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<GameEntry {...{
|
||||
...tutorialGame,
|
||||
theme
|
||||
}} />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</main>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue