2024-06-16 11:49:13 +00:00
|
|
|
import {GameTable} from "../_components/GameTable.tsx"
|
|
|
|
import { GameData } from "../_utils/game.ts";
|
|
|
|
|
|
|
|
|
|
|
|
export const layout = "base.tsx"
|
|
|
|
export const url = "/games.html"
|
|
|
|
|
|
|
|
export default function(data: Lume.Data, helpers: Lume.Helpers) {
|
|
|
|
const intro_section = data.content ? (
|
|
|
|
<section id={"list-games-section-intro"}>
|
|
|
|
{data.children}
|
|
|
|
</section>
|
|
|
|
) : null
|
|
|
|
|
|
|
|
const games: GameData[] = data.search.pages("game")
|
|
|
|
|
|
|
|
const games_section = (
|
|
|
|
<section id={"list-games-section-games"}>
|
|
|
|
<h2>
|
|
|
|
Videogames list
|
2024-07-07 02:45:11 +00:00
|
|
|
<small>
|
|
|
|
<a href={helpers.url("/games/feed.rss")}>
|
|
|
|
<i className={"fa-sharp fa-solid fa-rss"}/> Feed
|
|
|
|
</a>
|
|
|
|
</small>
|
|
|
|
<small>
|
|
|
|
<a href={helpers.url("/games/index.json")}>
|
2024-11-05 17:05:17 +00:00
|
|
|
<i className={"fa-sharp fa-solid fa-brackets-curly"}/> Raw
|
2024-07-07 02:45:11 +00:00
|
|
|
</a>
|
|
|
|
</small>
|
2024-06-16 11:49:13 +00:00
|
|
|
</h2>
|
|
|
|
<div>
|
2024-07-07 02:45:11 +00:00
|
|
|
<GameTable id={"list-games-table"} games={games} priority={"mixed"}/>
|
2024-06-16 11:49:13 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
)
|
|
|
|
|
|
|
|
return (
|
|
|
|
<main id={"list-games-main"}>
|
|
|
|
{intro_section}
|
|
|
|
{games_section}
|
2024-07-07 02:45:11 +00:00
|
|
|
<script src={"/_static/scripting/sort.js"}/>
|
|
|
|
<script src={"/_static/scripting/installSortOnLoad.js"}/>
|
2024-06-16 11:49:13 +00:00
|
|
|
</main>
|
|
|
|
)
|
|
|
|
}
|