home page + opus result api working again
This commit is contained in:
@@ -1,5 +1,90 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from "vue";
|
||||
|
||||
const games = computed(() => [
|
||||
{
|
||||
id: "opus-magnum",
|
||||
title: "Opus Magnum",
|
||||
description: "Submit your best Opus Magnum puzzle solutions",
|
||||
appId: 558990,
|
||||
path: "/opus-magnum",
|
||||
},
|
||||
{
|
||||
id: "noita",
|
||||
title: "Noita",
|
||||
description: "Submit your greatest Noita achievements",
|
||||
appId: 881100,
|
||||
path: "/noita",
|
||||
},
|
||||
]);
|
||||
|
||||
const imageErrors = ref<Set<number>>(new Set());
|
||||
|
||||
const getHeaderImage = (appId: number) => {
|
||||
return `https://cdn.akamai.steamstatic.com/steam/apps/${appId}/header.jpg`;
|
||||
};
|
||||
|
||||
const onImageError = (appId: number) => {
|
||||
imageErrors.value.add(appId);
|
||||
};
|
||||
|
||||
const navigate = (path: string) => {
|
||||
window.location.href = path;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="min-h-screen bg-base-200 flex items-center justify-center px-4">
|
||||
<div class="w-full max-w-4xl">
|
||||
<!-- Header -->
|
||||
<div class="text-center mb-12">
|
||||
<h1 class="text-5xl font-bold mb-4">PolyLAN Submitter</h1>
|
||||
<p class="text-xl text-base-content/70">
|
||||
Choose a game and submit your best solutions
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Cards Grid -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
||||
<div
|
||||
v-for="game in games"
|
||||
:key="game.id"
|
||||
@click="navigate(game.path)"
|
||||
class="card bg-base-100 shadow-xl hover:shadow-2xl transition-all cursor-pointer transform hover:-translate-y-2 overflow-hidden"
|
||||
>
|
||||
<figure class="relative h-40 bg-base-300 overflow-hidden">
|
||||
<img
|
||||
v-if="!imageErrors.has(game.appId)"
|
||||
:src="getHeaderImage(game.appId)"
|
||||
:alt="game.title"
|
||||
@error="onImageError(game.appId)"
|
||||
class="w-full h-full object-cover"
|
||||
/>
|
||||
<div
|
||||
v-else
|
||||
class="w-full h-full bg-gradient-to-br from-blue-600 to-blue-400 flex items-center justify-center text-white"
|
||||
>
|
||||
<i class="mdi mdi-gamepad-variant text-5xl"></i>
|
||||
</div>
|
||||
<div class="absolute inset-0 bg-black/30 group-hover:bg-black/20 transition-colors"></div>
|
||||
</figure>
|
||||
<div class="card-body">
|
||||
<h2 class="card-title text-2xl">{{ game.title }}</h2>
|
||||
<p class="text-base-content/70">{{ game.description }}</p>
|
||||
<div class="card-actions justify-end mt-4">
|
||||
<button class="btn btn-primary">
|
||||
<i class="mdi mdi-arrow-right mr-2"></i>
|
||||
Get Started
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="text-center mt-12 text-base-content/50">
|
||||
<p>Select a game above to begin submitting</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="min-h-screen bg-base-200 flex items-center justify-center px-4">
|
||||
<div class="w-full max-w-2xl">
|
||||
<div class="card bg-base-100 shadow-xl">
|
||||
<div class="bg-gradient-to-br from-purple-600 to-purple-400 p-8 text-white">
|
||||
<i class="mdi mdi-wand-plus text-6xl"></i>
|
||||
</div>
|
||||
<div class="card-body text-center">
|
||||
<h1 class="card-title text-4xl justify-center">Noita Submitter</h1>
|
||||
<p class="text-lg text-base-content/70 mt-4">
|
||||
Coming soon! Noita submission system is under development.
|
||||
</p>
|
||||
<div class="card-actions justify-center mt-8">
|
||||
<a href="/" class="btn btn-primary">
|
||||
<i class="mdi mdi-arrow-left mr-2"></i>
|
||||
Back to Home
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,8 @@
|
||||
import { createApp } from 'vue'
|
||||
import Noita from '@/Noita.vue'
|
||||
import '@/style.css'
|
||||
|
||||
const selector = "#app"
|
||||
const mountData = document.querySelector<HTMLElement>(selector)
|
||||
const app = createApp(Noita, { ...mountData?.dataset })
|
||||
app.mount(selector)
|
||||
Reference in New Issue
Block a user