style: ajusta responsividade geral do projeto
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<div class="relative min-h-screen overflow-hidden bg-[#f5f5f5] px-4 py-10 font-sans text-[#0c0a09] md:px-8 md:py-16">
|
||||
<div
|
||||
class="relative min-h-screen overflow-x-hidden bg-[#f5f5f5] px-3 py-8 font-sans text-[#0c0a09] sm:px-4 md:px-6 md:py-12 xl:px-8 xl:py-16">
|
||||
<div
|
||||
class="pointer-events-none absolute left-1/2 top-8 h-[460px] w-[min(92vw,820px)] -translate-x-1/2 rounded-[48px] bg-[radial-gradient(circle_at_20%_30%,rgba(196,184,232,0.6),transparent_28%),radial-gradient(circle_at_72%_24%,rgba(244,197,168,0.5),transparent_30%),radial-gradient(circle_at_52%_78%,rgba(167,229,211,0.56),transparent_34%)] blur-2xl"
|
||||
aria-hidden="true"></div>
|
||||
|
||||
<main class="relative mx-auto grid w-full max-w-[800px] gap-8">
|
||||
<main class="relative mx-auto grid w-full min-w-0 max-w-[800px] gap-6 md:gap-8">
|
||||
<header class="flex flex-col gap-5 sm:flex-row sm:items-center sm:justify-between">
|
||||
<p
|
||||
class="m-0 inline-flex rounded-full bg-[rgba(196,184,232,0.6)] px-3 py-1 text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#0c0a09]">
|
||||
@@ -26,15 +27,17 @@
|
||||
</div>
|
||||
|
||||
<template v-else-if="game">
|
||||
<div class="overflow-hidden rounded-2xl border border-[#e7e5e4] bg-white shadow-[0_4px_16px_rgba(0,0,0,0.04)]">
|
||||
<div
|
||||
class="min-w-0 overflow-hidden rounded-2xl border border-[#e7e5e4] bg-white shadow-[0_4px_16px_rgba(0,0,0,0.04)]">
|
||||
<div v-if="game.images?.header" class="relative h-48 w-full overflow-hidden bg-[#f0efed] sm:h-64">
|
||||
<img :src="game.images.header" :alt="game.title" class="h-full w-full object-cover" />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-6 p-6 md:p-8">
|
||||
<div class="flex flex-wrap items-start justify-between gap-4">
|
||||
<div class="grid gap-2">
|
||||
<h1 class="font-serif text-[32px] font-light leading-[1.1] tracking-[-0.64px] text-[#0c0a09]">
|
||||
<div class="grid min-w-0 gap-6 p-4 sm:p-5 md:p-6 xl:p-8">
|
||||
<div class="flex min-w-0 flex-col items-start justify-between gap-4 lg:flex-row">
|
||||
<div class="grid min-w-0 gap-2">
|
||||
<h1
|
||||
class="min-w-0 break-words font-serif text-[28px] font-light leading-[1.1] tracking-[-0.64px] text-[#0c0a09] sm:text-[32px]">
|
||||
{{ game.title }}
|
||||
</h1>
|
||||
<p class="text-[15px] leading-[1.47] tracking-[0.15px] text-[#777169]">
|
||||
@@ -42,11 +45,11 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<div class="flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:flex-wrap">
|
||||
<button type="button" :disabled="togglingFavorite"
|
||||
:aria-label="isFavorited ? 'Remover dos favoritos' : 'Adicionar aos favoritos'"
|
||||
@click="toggleFavorite"
|
||||
class="inline-flex h-9 items-center justify-center gap-2 rounded-full border border-[#e7e5e4] px-4 text-[13px] font-medium transition hover:bg-[#f0efed] disabled:cursor-not-allowed disabled:opacity-50">
|
||||
class="inline-flex min-h-9 items-center justify-center gap-2 rounded-full border border-[#e7e5e4] px-4 py-2 text-[13px] font-medium transition hover:bg-[#f0efed] disabled:cursor-not-allowed disabled:opacity-50">
|
||||
<Icon :name="togglingFavorite
|
||||
? 'mdi:loading'
|
||||
: isFavorited
|
||||
@@ -64,25 +67,25 @@
|
||||
</button>
|
||||
|
||||
<button v-if="!isEditing" type="button" @click="startEditing"
|
||||
class="inline-flex h-9 items-center justify-center gap-2 rounded-full border border-[#e7e5e4] px-4 text-[13px] font-medium text-[#0c0a09] transition hover:bg-[#f0efed]">
|
||||
class="inline-flex min-h-9 items-center justify-center gap-2 rounded-full border border-[#e7e5e4] px-4 py-2 text-[13px] font-medium text-[#0c0a09] transition hover:bg-[#f0efed]">
|
||||
<Icon name="mdi:pencil-outline" class="text-sm" />
|
||||
Editar
|
||||
</button>
|
||||
|
||||
<div v-if="confirmingDelete" class="flex gap-2">
|
||||
<div v-if="confirmingDelete" class="flex flex-col gap-2 sm:flex-row">
|
||||
<button type="button" :disabled="isDeleting" @click="deleteGame"
|
||||
class="inline-flex h-9 items-center justify-center gap-1 rounded-full bg-red-50 px-4 text-[13px] font-medium text-red-600 transition hover:bg-red-100 disabled:opacity-50">
|
||||
class="inline-flex min-h-9 items-center justify-center gap-1 rounded-full bg-red-50 px-4 py-2 text-[13px] font-medium text-red-600 transition hover:bg-red-100 disabled:opacity-50">
|
||||
<Icon :name="isDeleting ? 'mdi:loading' : 'mdi:check'" class="text-sm"
|
||||
:class="isDeleting && 'animate-spin'" />
|
||||
Confirmar
|
||||
</button>
|
||||
<button type="button" @click="confirmingDelete = false"
|
||||
class="inline-flex h-9 items-center justify-center rounded-full border border-[#e7e5e4] px-4 text-[13px] font-medium text-[#777169] transition hover:border-[#0c0a09]">
|
||||
class="inline-flex min-h-9 items-center justify-center rounded-full border border-[#e7e5e4] px-4 py-2 text-[13px] font-medium text-[#777169] transition hover:border-[#0c0a09]">
|
||||
Cancelar
|
||||
</button>
|
||||
</div>
|
||||
<button v-else type="button" @click="confirmingDelete = true"
|
||||
class="inline-flex h-9 items-center justify-center gap-2 rounded-full border border-[#e7e5e4] px-4 text-[13px] font-medium text-[#777169] transition hover:border-red-300 hover:text-red-600">
|
||||
class="inline-flex min-h-9 items-center justify-center gap-2 rounded-full border border-[#e7e5e4] px-4 py-2 text-[13px] font-medium text-[#777169] transition hover:border-red-300 hover:text-red-600">
|
||||
<Icon name="mdi:trash-can-outline" class="text-sm" />
|
||||
Deletar
|
||||
</button>
|
||||
@@ -99,12 +102,12 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-5 sm:grid-cols-2">
|
||||
<div class="grid min-w-0 gap-5 lg:grid-cols-2">
|
||||
<div>
|
||||
<p class="mb-2 text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">
|
||||
Gêneros
|
||||
</p>
|
||||
<div class="flex flex-wrap gap-1.5">
|
||||
<div class="flex min-w-0 flex-wrap gap-1.5">
|
||||
<span v-for="genre in game.genres" :key="genre"
|
||||
class="inline-flex items-center rounded-full bg-[rgba(196,184,232,0.4)] px-2.5 py-1 text-[12px] font-semibold uppercase leading-none tracking-[0.8px] text-[#0c0a09]">
|
||||
{{ genre }}
|
||||
@@ -116,7 +119,7 @@
|
||||
<p class="mb-2 text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">
|
||||
Plataformas
|
||||
</p>
|
||||
<div class="flex flex-wrap gap-1.5">
|
||||
<div class="flex min-w-0 flex-wrap gap-1.5">
|
||||
<span v-for="platform in game.platforms" :key="platform"
|
||||
class="inline-flex items-center rounded-full bg-[rgba(167,229,211,0.5)] px-2.5 py-1 text-[12px] font-semibold uppercase leading-none tracking-[0.8px] text-[#0c0a09]">
|
||||
{{ platform }}
|
||||
@@ -136,15 +139,21 @@
|
||||
<dl class="grid gap-2">
|
||||
<div v-if="game.system_requirements.cpu" class="flex gap-3">
|
||||
<dt class="w-10 shrink-0 text-[13px] font-semibold text-[#777169]">CPU</dt>
|
||||
<dd class="text-[13px] text-[#0c0a09]">{{ game.system_requirements.cpu }}</dd>
|
||||
<dd class="min-w-0 break-words text-[13px] text-[#0c0a09]">
|
||||
{{ game.system_requirements.cpu }}
|
||||
</dd>
|
||||
</div>
|
||||
<div v-if="game.system_requirements.gpu" class="flex gap-3">
|
||||
<dt class="w-10 shrink-0 text-[13px] font-semibold text-[#777169]">GPU</dt>
|
||||
<dd class="text-[13px] text-[#0c0a09]">{{ game.system_requirements.gpu }}</dd>
|
||||
<dd class="min-w-0 break-words text-[13px] text-[#0c0a09]">
|
||||
{{ game.system_requirements.gpu }}
|
||||
</dd>
|
||||
</div>
|
||||
<div v-if="game.system_requirements.ram" class="flex gap-3">
|
||||
<dt class="w-10 shrink-0 text-[13px] font-semibold text-[#777169]">RAM</dt>
|
||||
<dd class="text-[13px] text-[#0c0a09]">{{ game.system_requirements.ram }}</dd>
|
||||
<dd class="min-w-0 break-words text-[13px] text-[#0c0a09]">
|
||||
{{ game.system_requirements.ram }}
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
@@ -174,72 +183,72 @@
|
||||
<label
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">Título</label>
|
||||
<input v-model="editForm.title" type="text"
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-1.5">
|
||||
<label
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">Descrição</label>
|
||||
<textarea v-model="editForm.description" rows="3"
|
||||
class="w-full resize-none rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white"></textarea>
|
||||
class="w-full min-w-0 resize-none rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-1.5">
|
||||
<label
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">Developer</label>
|
||||
<input v-model="editForm.developer" type="text"
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-5 md:grid-cols-2">
|
||||
<div class="grid min-w-0 gap-5 xl:grid-cols-2">
|
||||
<div class="grid gap-1.5">
|
||||
<label
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">Gêneros</label>
|
||||
<input v-model="editForm.genresRaw" type="text" placeholder="Separe com vírgula"
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
<div class="grid gap-1.5">
|
||||
<label
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">Plataformas</label>
|
||||
<input v-model="editForm.platformsRaw" type="text" placeholder="Separe com vírgula"
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-5 md:grid-cols-2">
|
||||
<div class="grid min-w-0 gap-5 xl:grid-cols-2">
|
||||
<div class="grid gap-1.5">
|
||||
<label
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">Thumbnail
|
||||
URL</label>
|
||||
<input v-model="editForm.thumbnail" type="url"
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
<div class="grid gap-1.5">
|
||||
<label class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">Header
|
||||
URL</label>
|
||||
<input v-model="editForm.header" type="url"
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-5 md:grid-cols-3">
|
||||
<div class="grid min-w-0 gap-5 xl:grid-cols-3">
|
||||
<div class="grid gap-1.5">
|
||||
<label
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">CPU</label>
|
||||
<input v-model="editForm.cpu" type="text"
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
<div class="grid gap-1.5">
|
||||
<label
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">GPU</label>
|
||||
<input v-model="editForm.gpu" type="text"
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
<div class="grid gap-1.5">
|
||||
<label
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">RAM</label>
|
||||
<input v-model="editForm.ram" type="text"
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -251,13 +260,13 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-3 border-t border-[#e7e5e4] pt-5">
|
||||
<div class="flex flex-col gap-3 border-t border-[#e7e5e4] pt-5 sm:flex-row sm:justify-end">
|
||||
<button type="button" @click="cancelEditing"
|
||||
class="inline-flex h-10 items-center justify-center rounded-full border border-[#d6d3d1] bg-transparent px-5 text-[15px] font-medium leading-none text-[#0c0a09] transition hover:border-[#0c0a09]">
|
||||
class="inline-flex min-h-10 items-center justify-center rounded-full border border-[#d6d3d1] bg-transparent px-5 py-2 text-[15px] font-medium leading-none text-[#0c0a09] transition hover:border-[#0c0a09]">
|
||||
Cancelar
|
||||
</button>
|
||||
<button type="submit" :disabled="isSaving"
|
||||
class="inline-flex h-10 items-center justify-center gap-2 rounded-full bg-[#292524] px-5 text-[15px] font-medium leading-none text-white transition hover:bg-[#0c0a09] disabled:cursor-not-allowed disabled:opacity-70">
|
||||
class="inline-flex min-h-10 items-center justify-center gap-2 rounded-full bg-[#292524] px-5 py-2 text-[15px] font-medium leading-none text-white transition hover:bg-[#0c0a09] disabled:cursor-not-allowed disabled:opacity-70">
|
||||
<Icon v-if="isSaving" name="mdi:loading" class="animate-spin text-base" />
|
||||
<span>{{ isSaving ? 'Salvando...' : 'Salvar alterações' }}</span>
|
||||
</button>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<div class="relative min-h-screen overflow-hidden bg-[#f5f5f5] px-4 py-10 font-sans text-[#0c0a09] md:px-8 md:py-16">
|
||||
<div
|
||||
class="relative min-h-screen overflow-x-hidden bg-[#f5f5f5] px-3 py-8 font-sans text-[#0c0a09] sm:px-4 md:px-6 md:py-12 xl:px-8 xl:py-16">
|
||||
<div
|
||||
class="pointer-events-none absolute left-1/2 top-8 h-[460px] w-[min(92vw,820px)] -translate-x-1/2 rounded-[48px] bg-[radial-gradient(circle_at_20%_30%,rgba(196,184,232,0.6),transparent_28%),radial-gradient(circle_at_72%_24%,rgba(244,197,168,0.5),transparent_30%),radial-gradient(circle_at_52%_78%,rgba(167,229,211,0.56),transparent_34%)] blur-2xl"
|
||||
aria-hidden="true"></div>
|
||||
|
||||
<main class="relative mx-auto grid w-full max-w-[720px] gap-8" aria-labelledby="criar-title">
|
||||
<main class="relative mx-auto grid w-full min-w-0 max-w-[720px] gap-6 md:gap-8" aria-labelledby="criar-title">
|
||||
<header class="flex flex-col gap-5 sm:flex-row sm:items-end sm:justify-between">
|
||||
<div>
|
||||
<p
|
||||
@@ -12,7 +13,7 @@
|
||||
Catálogo
|
||||
</p>
|
||||
<h1 id="criar-title"
|
||||
class="my-5 max-w-[720px] font-serif text-[40px] font-light leading-[1.08] tracking-[-0.96px] text-[#0c0a09] md:text-[48px]">
|
||||
class="my-5 max-w-[720px] break-words font-serif text-[34px] font-light leading-[1.08] tracking-[-0.96px] text-[#0c0a09] sm:text-[40px] md:text-[48px]">
|
||||
Novo jogo
|
||||
</h1>
|
||||
<p class="m-0 max-w-[560px] text-base font-normal leading-6 tracking-[0.16px] text-[#4e4e4e]">
|
||||
@@ -22,7 +23,7 @@
|
||||
</header>
|
||||
|
||||
<form
|
||||
class="grid gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-6 shadow-[0_4px_16px_rgba(0,0,0,0.04)] md:p-8"
|
||||
class="grid min-w-0 gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] sm:p-5 md:p-6 xl:p-8"
|
||||
aria-label="Formulário de criação de jogo" @submit.prevent="submitForm">
|
||||
<div>
|
||||
<span
|
||||
@@ -46,7 +47,7 @@
|
||||
Título <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<input id="title" v-model="form.title" type="text" placeholder="Ex: Counter-Strike 2" required
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-1.5">
|
||||
@@ -55,7 +56,7 @@
|
||||
Descrição <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<textarea id="description" v-model="form.description" rows="3" placeholder="Descreva o jogo..." required
|
||||
class="w-full resize-none rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white"></textarea>
|
||||
class="w-full min-w-0 resize-none rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-1.5">
|
||||
@@ -64,17 +65,17 @@
|
||||
Developer <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<input id="developer" v-model="form.developer" type="text" placeholder="Ex: Valve" required
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-5 md:grid-cols-2">
|
||||
<div class="grid min-w-0 gap-5 xl:grid-cols-2">
|
||||
<div class="grid gap-1.5">
|
||||
<label for="genres"
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">
|
||||
Gêneros <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<input id="genres" v-model="form.genresRaw" type="text" placeholder="Ex: FPS, Ação, Multiplayer" required
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
<p class="text-xs leading-[1.4] text-[#777169]">Separe com vírgula</p>
|
||||
</div>
|
||||
|
||||
@@ -84,7 +85,7 @@
|
||||
Plataformas <span class="text-red-500">*</span>
|
||||
</label>
|
||||
<input id="platforms" v-model="form.platformsRaw" type="text" placeholder="Ex: PC, PlayStation 5" required
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
<p class="text-xs leading-[1.4] text-[#777169]">Separe com vírgula</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -99,14 +100,14 @@
|
||||
Opcional — URLs públicas das imagens do jogo.
|
||||
</p>
|
||||
|
||||
<div class="grid gap-5 md:grid-cols-2">
|
||||
<div class="grid min-w-0 gap-5 xl:grid-cols-2">
|
||||
<div class="grid gap-1.5">
|
||||
<label for="thumbnail"
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">
|
||||
Thumbnail URL
|
||||
</label>
|
||||
<input id="thumbnail" v-model="form.thumbnail" type="url" placeholder="https://..."
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
|
||||
<div class="grid gap-1.5">
|
||||
@@ -115,7 +116,7 @@
|
||||
Header URL
|
||||
</label>
|
||||
<input id="header" v-model="form.header" type="url" placeholder="https://..."
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -127,24 +128,24 @@
|
||||
</span>
|
||||
<p class="mb-4 mt-3 text-[13px] leading-[1.5] text-[#777169]">Opcional.</p>
|
||||
|
||||
<div class="grid gap-5 md:grid-cols-3">
|
||||
<div class="grid min-w-0 gap-5 xl:grid-cols-3">
|
||||
<div class="grid gap-1.5">
|
||||
<label for="cpu"
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">CPU</label>
|
||||
<input id="cpu" v-model="form.cpu" type="text" placeholder="Ex: Intel i5-8400"
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
<div class="grid gap-1.5">
|
||||
<label for="gpu"
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">GPU</label>
|
||||
<input id="gpu" v-model="form.gpu" type="text" placeholder="Ex: GTX 1060"
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
<div class="grid gap-1.5">
|
||||
<label for="ram"
|
||||
class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">RAM</label>
|
||||
<input id="ram" v-model="form.ram" type="text" placeholder="Ex: 8 GB"
|
||||
class="w-full rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] bg-[#fafafa] px-4 py-2.5 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09] focus:bg-white" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -157,13 +158,13 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-3 border-t border-[#e7e5e4] pt-5">
|
||||
<div class="flex flex-col gap-3 border-t border-[#e7e5e4] pt-5 sm:flex-row sm:justify-end">
|
||||
<NuxtLink to="/catalogo"
|
||||
class="inline-flex h-10 items-center justify-center rounded-full border border-[#d6d3d1] bg-transparent px-5 text-[15px] font-medium leading-none text-[#0c0a09] transition hover:border-[#0c0a09]">
|
||||
class="inline-flex min-h-10 items-center justify-center rounded-full border border-[#d6d3d1] bg-transparent px-5 py-2 text-[15px] font-medium leading-none text-[#0c0a09] transition hover:border-[#0c0a09]">
|
||||
Cancelar
|
||||
</NuxtLink>
|
||||
<button type="submit" :disabled="isSubmitting"
|
||||
class="inline-flex h-10 items-center justify-center gap-2 rounded-full bg-[#292524] px-5 text-[15px] font-medium leading-none text-white transition hover:bg-[#0c0a09] disabled:cursor-not-allowed disabled:opacity-70">
|
||||
class="inline-flex min-h-10 items-center justify-center gap-2 rounded-full bg-[#292524] px-5 py-2 text-[15px] font-medium leading-none text-white transition hover:bg-[#0c0a09] disabled:cursor-not-allowed disabled:opacity-70">
|
||||
<Icon v-if="isSubmitting" name="mdi:loading" class="animate-spin text-base" />
|
||||
<span>{{ isSubmitting ? 'Salvando...' : 'Salvar jogo' }}</span>
|
||||
</button>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<div class="relative min-h-screen overflow-hidden bg-[#f5f5f5] px-4 py-10 font-sans text-[#0c0a09] md:px-8 md:py-16">
|
||||
<div
|
||||
class="relative min-h-screen overflow-x-hidden bg-[#f5f5f5] px-3 py-8 font-sans text-[#0c0a09] sm:px-4 md:px-6 md:py-12 xl:px-8 xl:py-16">
|
||||
<div
|
||||
class="pointer-events-none absolute left-1/2 top-8 h-[460px] w-[min(92vw,820px)] -translate-x-1/2 rounded-[48px] bg-[radial-gradient(circle_at_20%_30%,rgba(196,184,232,0.6),transparent_28%),radial-gradient(circle_at_72%_24%,rgba(244,197,168,0.5),transparent_30%),radial-gradient(circle_at_52%_78%,rgba(167,229,211,0.56),transparent_34%)] blur-2xl"
|
||||
aria-hidden="true"></div>
|
||||
|
||||
<main class="relative mx-auto grid w-full max-w-[1120px] gap-8" aria-labelledby="catalogo-title">
|
||||
<main class="relative mx-auto grid w-full min-w-0 max-w-[1120px] gap-6 md:gap-8" aria-labelledby="catalogo-title">
|
||||
<header class="flex flex-col gap-5 sm:flex-row sm:items-end sm:justify-between">
|
||||
<div>
|
||||
<p
|
||||
@@ -12,7 +13,7 @@
|
||||
Catálogo
|
||||
</p>
|
||||
<h1 id="catalogo-title"
|
||||
class="my-5 max-w-[720px] font-serif text-[40px] font-light leading-[1.08] tracking-[-0.96px] text-[#0c0a09] md:text-[48px]">
|
||||
class="my-5 max-w-[720px] break-words font-serif text-[34px] font-light leading-[1.08] tracking-[-0.96px] text-[#0c0a09] sm:text-[40px] md:text-[48px]">
|
||||
Catálogo de jogos
|
||||
</h1>
|
||||
<p class="m-0 max-w-[560px] text-base font-normal leading-6 tracking-[0.16px] text-[#4e4e4e]">
|
||||
@@ -20,9 +21,9 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex shrink-0 flex-col gap-3 sm:flex-row sm:items-center">
|
||||
<div class="flex min-w-0 shrink-0 flex-col gap-3 sm:flex-row sm:items-center">
|
||||
<NuxtLink to="/catalogo/criar"
|
||||
class="inline-flex h-10 items-center justify-center gap-2 rounded-full bg-[#292524] px-5 text-[15px] font-medium leading-none text-white transition hover:bg-[#0c0a09]">
|
||||
class="inline-flex min-h-10 items-center justify-center gap-2 rounded-full bg-[#292524] px-5 py-2 text-[15px] font-medium leading-none text-white transition hover:bg-[#0c0a09]">
|
||||
<Icon name="mdi:plus" class="text-base" />
|
||||
Novo jogo
|
||||
</NuxtLink>
|
||||
@@ -30,16 +31,17 @@
|
||||
</header>
|
||||
|
||||
<section
|
||||
class="grid gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-6 shadow-[0_4px_16px_rgba(0,0,0,0.04)] md:p-8"
|
||||
class="grid min-w-0 gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] sm:p-5 md:p-6 xl:p-8"
|
||||
aria-label="Lista do catálogo de jogos">
|
||||
<div class="grid gap-5 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] md:items-end">
|
||||
<div class="grid min-w-0 gap-5 xl:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] xl:items-end">
|
||||
<AppSelect id="genre-filter" v-model="selectedGenre" label="Gênero" :options="genreOptions"
|
||||
:disabled="isLoading" />
|
||||
<AppSelect id="platform-filter" v-model="selectedPlatform" label="Plataforma" :options="platformOptions"
|
||||
:disabled="isLoading" />
|
||||
</div>
|
||||
|
||||
<div v-if="isLoading" class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3" role="status" aria-live="polite">
|
||||
<div v-if="isLoading" class="grid min-w-0 gap-4 md:grid-cols-2 2xl:grid-cols-3" role="status"
|
||||
aria-live="polite">
|
||||
<div v-for="item in 6" :key="item" class="h-56 animate-pulse rounded-xl bg-[#f0efed]"></div>
|
||||
</div>
|
||||
|
||||
@@ -57,9 +59,9 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div v-else class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
<div v-else class="grid min-w-0 gap-4 md:grid-cols-2 2xl:grid-cols-3">
|
||||
<article v-for="game in filteredGames" :key="game.id"
|
||||
class="flex flex-col overflow-hidden rounded-xl border border-[#e7e5e4] bg-white transition hover:shadow-[0_4px_16px_rgba(0,0,0,0.08)]">
|
||||
class="flex min-w-0 flex-col overflow-hidden rounded-xl border border-[#e7e5e4] bg-white transition hover:shadow-[0_4px_16px_rgba(0,0,0,0.08)]">
|
||||
<div class="relative h-36 bg-[#f0efed]">
|
||||
<img v-if="game.images?.thumbnail" :src="game.images.thumbnail" :alt="game.title"
|
||||
class="h-full w-full object-cover" />
|
||||
@@ -71,10 +73,10 @@
|
||||
" @click="toggleFavorite(game)"
|
||||
class="absolute right-2 top-2 inline-flex h-8 w-8 items-center justify-center rounded-full bg-white/80 shadow backdrop-blur-sm transition hover:bg-white disabled:cursor-not-allowed disabled:opacity-50">
|
||||
<Icon :name="togglingId === game.title
|
||||
? 'mdi:loading'
|
||||
: favoriteIds.has(game.title)
|
||||
? 'mdi:heart'
|
||||
: 'mdi:heart-outline'
|
||||
? 'mdi:loading'
|
||||
: favoriteIds.has(game.title)
|
||||
? 'mdi:heart'
|
||||
: 'mdi:heart-outline'
|
||||
" :class="[
|
||||
'text-base',
|
||||
togglingId === game.title
|
||||
@@ -88,7 +90,7 @@
|
||||
|
||||
<div class="flex flex-1 flex-col gap-3 p-4">
|
||||
<div class="grid gap-1">
|
||||
<h3 class="text-base font-medium leading-6 tracking-[0.16px] text-[#0c0a09]">
|
||||
<h3 class="min-w-0 break-words text-base font-medium leading-6 tracking-[0.16px] text-[#0c0a09]">
|
||||
{{ game.title }}
|
||||
</h3>
|
||||
<p class="text-xs leading-[1.4] tracking-[0.16px] text-[#777169]">
|
||||
@@ -107,8 +109,9 @@
|
||||
{{ game.description }}
|
||||
</p>
|
||||
|
||||
<div class="flex items-center justify-between gap-2 border-t border-[#f0efed] pt-3">
|
||||
<div v-if="confirmingDeleteId === game.id" class="flex gap-2">
|
||||
<div
|
||||
class="flex min-w-0 flex-col gap-2 border-t border-[#f0efed] pt-3 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div v-if="confirmingDeleteId === game.id" class="flex flex-wrap gap-2">
|
||||
<button type="button" :disabled="deletingId === game.id" @click="confirmDelete(game)"
|
||||
class="inline-flex h-7 items-center justify-center gap-1 rounded-full bg-red-50 px-3 text-[12px] font-medium text-red-600 transition hover:bg-red-100 disabled:opacity-50">
|
||||
<Icon :name="deletingId === game.id ? 'mdi:loading' : 'mdi:check'" class="text-xs"
|
||||
@@ -127,7 +130,7 @@
|
||||
</button>
|
||||
|
||||
<NuxtLink :to="`/catalogo/${game.id}`"
|
||||
class="inline-flex h-7 items-center justify-center gap-1 rounded-full border border-[#e7e5e4] px-3 text-[12px] font-medium text-[#0c0a09] transition hover:border-[#0c0a09]">
|
||||
class="inline-flex min-h-7 items-center justify-center gap-1 rounded-full border border-[#e7e5e4] px-3 py-1 text-center text-[12px] font-medium text-[#0c0a09] transition hover:border-[#0c0a09]">
|
||||
Ver detalhes
|
||||
<Icon name="mdi:arrow-right" class="text-xs" />
|
||||
</NuxtLink>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div
|
||||
class="relative min-h-[calc(100vh-66px)] overflow-hidden bg-[#f5f5f5] px-3 py-8 font-sans text-[#0c0a09] sm:px-5 sm:py-12 md:px-8 md:py-16">
|
||||
class="relative min-h-[calc(100vh-66px)] overflow-x-hidden bg-[#f5f5f5] px-3 py-8 font-sans text-[#0c0a09] sm:px-4 sm:py-12 md:px-6 md:py-16 xl:px-8">
|
||||
<div
|
||||
class="pointer-events-none absolute left-1/2 top-6 h-[360px] w-[min(94vw,760px)] -translate-x-1/2 rounded-[40px] bg-[radial-gradient(circle_at_20%_30%,rgba(167,229,211,0.62),transparent_28%),radial-gradient(circle_at_72%_24%,rgba(168,200,232,0.56),transparent_30%),radial-gradient(circle_at_52%_78%,rgba(232,184,196,0.5),transparent_34%)] blur-2xl sm:top-8 sm:h-[420px] sm:rounded-[48px]"
|
||||
aria-hidden="true"></div>
|
||||
|
||||
<main class="relative mx-auto grid w-full max-w-[960px] gap-6 sm:gap-8" aria-labelledby="account-title">
|
||||
<main class="relative mx-auto grid w-full min-w-0 max-w-[960px] gap-6 sm:gap-8" aria-labelledby="account-title">
|
||||
<header class="min-w-0">
|
||||
<p
|
||||
class="m-0 inline-flex rounded-full bg-[rgba(168,200,232,0.56)] px-3 py-1 text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#0c0a09]">
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<dl class="grid min-w-0 gap-3 sm:gap-4">
|
||||
<div v-for="item in profileRows" :key="item.label"
|
||||
class="grid min-w-0 gap-1 border-t border-[#e7e5e4] pt-3 sm:grid-cols-[140px_minmax(0,1fr)] sm:gap-5 sm:pt-4 md:grid-cols-[160px_minmax(0,1fr)]">
|
||||
class="grid min-w-0 gap-1 border-t border-[#e7e5e4] pt-3 lg:grid-cols-[140px_minmax(0,1fr)] lg:gap-5 lg:pt-4 xl:grid-cols-[160px_minmax(0,1fr)]">
|
||||
<dt class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">
|
||||
{{ item.label }}
|
||||
</dt>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<div class="relative min-h-screen overflow-hidden bg-[#f5f5f5] px-4 py-10 font-sans text-[#0c0a09] md:px-8 md:py-16">
|
||||
<div
|
||||
class="relative min-h-screen overflow-x-hidden bg-[#f5f5f5] px-3 py-8 font-sans text-[#0c0a09] sm:px-4 md:px-6 md:py-12 xl:px-8 xl:py-16">
|
||||
<div
|
||||
class="pointer-events-none absolute left-1/2 top-8 h-[460px] w-[min(92vw,820px)] -translate-x-1/2 rounded-[48px] bg-[radial-gradient(circle_at_20%_30%,rgba(232,184,196,0.6),transparent_28%),radial-gradient(circle_at_72%_24%,rgba(244,197,168,0.5),transparent_30%),radial-gradient(circle_at_52%_78%,rgba(168,200,232,0.56),transparent_34%)] blur-2xl"
|
||||
aria-hidden="true"></div>
|
||||
|
||||
<main class="relative mx-auto grid w-full max-w-[1120px] gap-8" aria-labelledby="favoritos-title">
|
||||
<main class="relative mx-auto grid w-full min-w-0 max-w-[1120px] gap-6 md:gap-8" aria-labelledby="favoritos-title">
|
||||
<header class="flex flex-col gap-5 sm:flex-row sm:items-end sm:justify-between">
|
||||
<div>
|
||||
<p
|
||||
@@ -12,7 +13,7 @@
|
||||
Favoritos
|
||||
</p>
|
||||
<h1 id="favoritos-title"
|
||||
class="my-5 max-w-[720px] font-serif text-[40px] font-light leading-[1.08] tracking-[-0.96px] text-[#0c0a09] md:text-[48px]">
|
||||
class="my-5 max-w-[720px] break-words font-serif text-[34px] font-light leading-[1.08] tracking-[-0.96px] text-[#0c0a09] sm:text-[40px] md:text-[48px]">
|
||||
Meus favoritos
|
||||
</h1>
|
||||
<p class="m-0 max-w-[560px] text-base font-normal leading-6 tracking-[0.16px] text-[#4e4e4e]">
|
||||
@@ -22,7 +23,7 @@
|
||||
</header>
|
||||
|
||||
<section
|
||||
class="grid gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-6 shadow-[0_4px_16px_rgba(0,0,0,0.04)] md:p-8"
|
||||
class="grid min-w-0 gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] sm:p-5 md:p-6 xl:p-8"
|
||||
aria-label="Lista de jogos favoritos">
|
||||
<div>
|
||||
<span
|
||||
@@ -56,24 +57,24 @@
|
||||
|
||||
<div v-else class="overflow-hidden rounded-xl border border-[#e7e5e4]">
|
||||
<div
|
||||
class="hidden bg-[#fafafa] px-4 py-3 text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169] md:grid md:grid-cols-[minmax(0,1fr)_160px] md:gap-4">
|
||||
class="hidden bg-[#fafafa] px-4 py-3 text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169] lg:grid lg:grid-cols-[minmax(0,1fr)_160px] lg:gap-4">
|
||||
<span>Jogo</span>
|
||||
<span>Ação</span>
|
||||
</div>
|
||||
|
||||
<ul class="grid divide-y divide-[#e7e5e4]">
|
||||
<li v-for="game in favorites" :key="game.id"
|
||||
class="grid items-center gap-4 bg-white p-4 md:grid-cols-[minmax(0,1fr)_160px] md:gap-4">
|
||||
<div class="flex items-center gap-3">
|
||||
class="grid min-w-0 items-center gap-4 bg-white p-4 lg:grid-cols-[minmax(0,1fr)_160px] lg:gap-4">
|
||||
<div class="flex min-w-0 items-center gap-3">
|
||||
<Icon name="mdi:heart" class="shrink-0 text-rose-500" />
|
||||
<span class="text-base font-medium leading-6 tracking-[0.16px] text-[#0c0a09]">
|
||||
<span class="min-w-0 break-words text-base font-medium leading-6 tracking-[0.16px] text-[#0c0a09]">
|
||||
{{ game.game_id }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<button type="button" :disabled="removingId === game.game_id"
|
||||
:aria-label="`Remover ${game.game_id} dos favoritos`" @click="removeFavorite(game)"
|
||||
class="inline-flex h-9 items-center justify-center gap-2 rounded-full border border-[#e7e5e4] px-4 text-[13px] font-medium leading-none text-[#777169] transition hover:border-red-300 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-50">
|
||||
class="inline-flex min-h-9 w-full items-center justify-center gap-2 rounded-full border border-[#e7e5e4] px-4 py-2 text-[13px] font-medium leading-none text-[#777169] transition hover:border-red-300 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-50 sm:w-fit lg:w-full">
|
||||
<Icon :name="removingId === game.game_id ? 'mdi:loading' : 'mdi:heart-remove-outline'"
|
||||
:class="['text-sm', removingId === game.game_id && 'animate-spin']" />
|
||||
<span class="hidden sm:inline">{{
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<div class="relative min-h-screen overflow-hidden bg-[#f5f5f5] px-4 py-10 font-sans text-[#0c0a09] md:px-8 md:py-16">
|
||||
<div
|
||||
class="relative min-h-screen overflow-x-hidden bg-[#f5f5f5] px-3 py-8 font-sans text-[#0c0a09] sm:px-4 md:px-6 md:py-12 xl:px-8 xl:py-16">
|
||||
<div
|
||||
class="pointer-events-none absolute left-1/2 top-8 h-[460px] w-[min(92vw,820px)] -translate-x-1/2 rounded-[48px] bg-[radial-gradient(circle_at_20%_30%,rgba(244,197,168,0.62),transparent_28%),radial-gradient(circle_at_72%_24%,rgba(167,229,211,0.5),transparent_30%),radial-gradient(circle_at_52%_78%,rgba(168,200,232,0.52),transparent_34%)] blur-2xl"
|
||||
aria-hidden="true"></div>
|
||||
|
||||
<main class="relative mx-auto grid w-full max-w-[1120px] gap-8" aria-labelledby="gift-card-title">
|
||||
<main class="relative mx-auto grid w-full min-w-0 max-w-[1120px] gap-6 md:gap-8" aria-labelledby="gift-card-title">
|
||||
<header class="flex flex-col gap-5 sm:flex-row sm:items-end sm:justify-between">
|
||||
<div>
|
||||
<p
|
||||
@@ -12,7 +13,7 @@
|
||||
Carteira
|
||||
</p>
|
||||
<h1 id="gift-card-title"
|
||||
class="my-5 max-w-[720px] font-serif text-[40px] font-light leading-[1.08] tracking-[-0.96px] text-[#0c0a09] md:text-[48px]">
|
||||
class="my-5 max-w-[720px] break-words font-serif text-[34px] font-light leading-[1.08] tracking-[-0.96px] text-[#0c0a09] sm:text-[40px] md:text-[48px]">
|
||||
Gift Cards
|
||||
</h1>
|
||||
<p class="m-0 max-w-[560px] text-base font-normal leading-6 tracking-[0.16px] text-[#4e4e4e]">
|
||||
@@ -21,9 +22,9 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="grid gap-8 lg:grid-cols-2">
|
||||
<div class="grid min-w-0 gap-6 md:gap-8 xl:grid-cols-2">
|
||||
<section
|
||||
class="grid gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-6 shadow-[0_4px_16px_rgba(0,0,0,0.04)] md:p-8"
|
||||
class="grid min-w-0 gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] sm:p-5 md:p-6 xl:p-8"
|
||||
aria-label="Criar gift card">
|
||||
<div>
|
||||
<span
|
||||
@@ -41,11 +42,11 @@
|
||||
Valor inicial (R$)
|
||||
</label>
|
||||
<input id="balance" v-model.number="createForm.balance" type="number" min="1" step="0.01" required
|
||||
class="h-11 rounded-xl border border-[#e7e5e4] px-4 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
class="h-11 w-full min-w-0 rounded-xl border border-[#e7e5e4] px-4 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
placeholder="100.00" />
|
||||
</div>
|
||||
<button type="submit" :disabled="isCreating"
|
||||
class="inline-flex h-10 w-fit items-center justify-center gap-2 rounded-full bg-[#292524] px-6 text-[15px] font-medium text-white transition hover:bg-[#0c0a09] disabled:cursor-not-allowed disabled:opacity-70">
|
||||
class="inline-flex min-h-10 w-full items-center justify-center gap-2 rounded-full bg-[#292524] px-6 py-2 text-[15px] font-medium text-white transition hover:bg-[#0c0a09] disabled:cursor-not-allowed disabled:opacity-70 sm:w-fit">
|
||||
<Icon v-if="isCreating" name="mdi:loading" class="animate-spin text-base" />
|
||||
<span>{{ isCreating ? 'Criando...' : 'Criar gift card' }}</span>
|
||||
</button>
|
||||
@@ -53,7 +54,7 @@
|
||||
</section>
|
||||
|
||||
<section
|
||||
class="grid gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-6 shadow-[0_4px_16px_rgba(0,0,0,0.04)] md:p-8"
|
||||
class="grid min-w-0 gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] sm:p-5 md:p-6 xl:p-8"
|
||||
aria-label="Consultar e resgatar gift card">
|
||||
<div>
|
||||
<span
|
||||
@@ -71,11 +72,11 @@
|
||||
Código do cartão
|
||||
</label>
|
||||
<input id="code" v-model="operationForm.code" type="text" required maxlength="10"
|
||||
class="h-11 rounded-xl border border-[#e7e5e4] px-4 text-[15px] uppercase text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
class="h-11 w-full min-w-0 rounded-xl border border-[#e7e5e4] px-4 text-[15px] uppercase text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
placeholder="AB12CD34EF" />
|
||||
</div>
|
||||
<button type="submit" :disabled="isConsulting"
|
||||
class="inline-flex h-10 w-fit items-center justify-center gap-2 rounded-full border border-[#d6d3d1] bg-transparent px-6 text-[15px] font-medium text-[#0c0a09] transition hover:border-[#0c0a09] disabled:cursor-not-allowed disabled:opacity-70">
|
||||
class="inline-flex min-h-10 w-full items-center justify-center gap-2 rounded-full border border-[#d6d3d1] bg-transparent px-6 py-2 text-[15px] font-medium text-[#0c0a09] transition hover:border-[#0c0a09] disabled:cursor-not-allowed disabled:opacity-70 sm:w-fit">
|
||||
<Icon v-if="isConsulting" name="mdi:loading" class="animate-spin text-base" />
|
||||
<span>{{ isConsulting ? 'Consultando...' : 'Consultar saldo' }}</span>
|
||||
</button>
|
||||
@@ -87,11 +88,11 @@
|
||||
Valor do resgate (R$)
|
||||
</label>
|
||||
<input id="amount" v-model.number="operationForm.amount" type="number" min="0.01" step="0.01" required
|
||||
class="h-11 rounded-xl border border-[#e7e5e4] px-4 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
class="h-11 w-full min-w-0 rounded-xl border border-[#e7e5e4] px-4 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
placeholder="25.00" />
|
||||
</div>
|
||||
<button type="submit" :disabled="isRedeeming"
|
||||
class="inline-flex h-10 w-fit items-center justify-center gap-2 rounded-full bg-[#292524] px-6 text-[15px] font-medium text-white transition hover:bg-[#0c0a09] disabled:cursor-not-allowed disabled:opacity-70">
|
||||
class="inline-flex min-h-10 w-full items-center justify-center gap-2 rounded-full bg-[#292524] px-6 py-2 text-[15px] font-medium text-white transition hover:bg-[#0c0a09] disabled:cursor-not-allowed disabled:opacity-70 sm:w-fit">
|
||||
<Icon v-if="isRedeeming" name="mdi:loading" class="animate-spin text-base" />
|
||||
<span>{{ isRedeeming ? 'Resgatando...' : 'Resgatar valor' }}</span>
|
||||
</button>
|
||||
@@ -112,7 +113,7 @@
|
||||
</div>
|
||||
|
||||
<section
|
||||
class="grid gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-6 shadow-[0_4px_16px_rgba(0,0,0,0.04)] md:p-8"
|
||||
class="grid min-w-0 gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] sm:p-5 md:p-6 xl:p-8"
|
||||
aria-label="Meus gift cards">
|
||||
<div>
|
||||
<span
|
||||
@@ -142,17 +143,16 @@
|
||||
<div v-else class="overflow-hidden rounded-xl border border-[#e7e5e4]">
|
||||
<ul class="grid divide-y divide-[#e7e5e4]">
|
||||
<li v-for="card in giftCards" :key="card.id"
|
||||
class="flex flex-col gap-3 bg-white p-4 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div class="grid gap-1">
|
||||
<span class="font-mono text-base font-medium tracking-wider text-[#0c0a09]">{{
|
||||
card.code
|
||||
}}</span>
|
||||
class="flex min-w-0 flex-col gap-3 bg-white p-4 lg:flex-row lg:items-center lg:justify-between">
|
||||
<div class="grid min-w-0 gap-1">
|
||||
<span class="min-w-0 break-words font-mono text-base font-medium tracking-wider text-[#0c0a09]">{{
|
||||
card.code }}</span>
|
||||
<span class="text-xs text-[#777169]">Criado em {{ formatDate(card.created_at) }}</span>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<div class="flex min-w-0 flex-wrap items-center gap-3">
|
||||
<span class="text-[15px] font-medium text-[#292524]">{{
|
||||
formatCurrency(card.balance)
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span class="inline-flex rounded-full px-2.5 py-1 text-xs font-semibold uppercase" :class="card.is_active
|
||||
? 'bg-[rgba(167,229,211,0.62)] text-[#0c0a09]'
|
||||
: 'bg-[#f0efed] text-[#777169]'
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<div
|
||||
class="relative min-h-[calc(100vh-66px)] overflow-hidden bg-[#f5f5f5] px-4 py-10 font-sans text-[#0c0a09] md:px-8 md:py-16">
|
||||
class="relative min-h-[calc(100vh-66px)] overflow-x-hidden bg-[#f5f5f5] px-3 py-8 font-sans text-[#0c0a09] sm:px-4 md:px-6 md:py-12 xl:px-8 xl:py-16">
|
||||
<div
|
||||
class="pointer-events-none absolute left-1/2 top-8 h-[500px] w-[min(94vw,900px)] -translate-x-1/2 rounded-[48px] bg-[radial-gradient(circle_at_18%_28%,rgba(167,229,211,0.62),transparent_28%),radial-gradient(circle_at_76%_22%,rgba(244,197,168,0.5),transparent_30%),radial-gradient(circle_at_54%_82%,rgba(168,200,232,0.56),transparent_34%)] blur-2xl"
|
||||
aria-hidden="true"></div>
|
||||
|
||||
<main class="relative mx-auto grid w-full max-w-[1180px] gap-8" aria-labelledby="home-title">
|
||||
<section class="grid gap-6 lg:grid-cols-[minmax(0,1.45fr)_minmax(300px,0.55fr)] lg:items-stretch">
|
||||
<div class="grid gap-6">
|
||||
<main class="relative mx-auto grid w-full min-w-0 max-w-[1180px] gap-6 md:gap-8" aria-labelledby="home-title">
|
||||
<section class="grid min-w-0 gap-6 2xl:grid-cols-[minmax(0,1.45fr)_minmax(300px,0.55fr)] 2xl:items-stretch">
|
||||
<div class="grid min-w-0 gap-6">
|
||||
<header>
|
||||
<p
|
||||
class="m-0 inline-flex rounded-full bg-[rgba(167,229,211,0.62)] px-3 py-1 text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#0c0a09]">
|
||||
Dashboard
|
||||
</p>
|
||||
<h1 id="home-title"
|
||||
class="my-5 max-w-[760px] break-words font-serif text-[40px] font-light leading-[1.05] tracking-[-1.2px] text-[#0c0a09] md:text-[60px] md:tracking-[-1.6px]">
|
||||
class="my-5 max-w-[760px] break-words font-serif text-[34px] font-light leading-[1.05] tracking-[-1.2px] text-[#0c0a09] sm:text-[40px] md:text-[52px] xl:text-[60px] xl:tracking-[-1.6px]">
|
||||
Olá, {{ userName }}.
|
||||
</h1>
|
||||
<p class="m-0 max-w-[620px] text-base font-normal leading-6 tracking-[0.16px] text-[#4e4e4e]">
|
||||
@@ -23,9 +23,9 @@
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<div class="grid gap-4 sm:grid-cols-2 xl:grid-cols-4">
|
||||
<div class="grid min-w-0 gap-4 md:grid-cols-2 2xl:grid-cols-4">
|
||||
<NuxtLink v-for="card in dashboardCards" :key="card.label" :to="card.to"
|
||||
class="grid min-h-[156px] content-between rounded-2xl border border-[#e7e5e4] bg-white p-5 shadow-[0_4px_16px_rgba(0,0,0,0.04)] transition hover:border-[#d6d3d1] hover:shadow-[0_8px_24px_rgba(0,0,0,0.07)]">
|
||||
class="grid min-h-[156px] min-w-0 content-between rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] transition hover:border-[#d6d3d1] hover:shadow-[0_8px_24px_rgba(0,0,0,0.07)] sm:p-5">
|
||||
<div class="flex items-center justify-between gap-3">
|
||||
<span class="inline-flex h-10 w-10 items-center justify-center rounded-xl" :class="card.accent">
|
||||
<Icon :name="card.icon" class="text-xl text-[#0c0a09]" />
|
||||
@@ -37,7 +37,8 @@
|
||||
<p class="m-0 text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169]">
|
||||
{{ card.label }}
|
||||
</p>
|
||||
<strong class="break-words text-[22px] font-medium leading-[1.18] tracking-[0.16px] text-[#0c0a09]">
|
||||
<strong
|
||||
class="min-w-0 break-words text-[22px] font-medium leading-[1.18] tracking-[0.16px] text-[#0c0a09]">
|
||||
{{ card.value }}
|
||||
</strong>
|
||||
<p class="m-0 text-[13px] leading-[1.5] tracking-[0.13px] text-[#777169]">
|
||||
@@ -84,9 +85,9 @@
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
<section class="grid gap-8 lg:grid-cols-[minmax(0,1.35fr)_minmax(320px,0.65fr)]">
|
||||
<section class="grid min-w-0 gap-6 md:gap-8 2xl:grid-cols-[minmax(0,1.35fr)_minmax(320px,0.65fr)]">
|
||||
<article
|
||||
class="grid gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-6 shadow-[0_4px_16px_rgba(0,0,0,0.04)] md:p-8"
|
||||
class="grid min-w-0 gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] sm:p-5 md:p-6 xl:p-8"
|
||||
aria-labelledby="weekly-ranking-title">
|
||||
<div class="flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between">
|
||||
<div>
|
||||
@@ -101,8 +102,8 @@
|
||||
</div>
|
||||
|
||||
<NuxtLink to="/ranking-jogos"
|
||||
class="inline-flex h-10 w-fit items-center justify-center gap-2 rounded-full border border-[#d6d3d1] bg-transparent px-5 text-[15px] font-medium leading-none text-[#0c0a09] transition hover:border-[#0c0a09]">
|
||||
Ver ranking completo
|
||||
class="inline-flex min-h-10 w-full min-w-0 items-center justify-center gap-2 rounded-full border border-[#d6d3d1] bg-transparent px-5 py-2 text-center text-[15px] font-medium leading-[1.2] text-[#0c0a09] transition hover:border-[#0c0a09] sm:w-fit">
|
||||
<span class="min-w-0 break-words">Ver ranking completo</span>
|
||||
<Icon name="mdi:arrow-right" class="text-base" />
|
||||
</NuxtLink>
|
||||
</div>
|
||||
@@ -119,25 +120,28 @@
|
||||
|
||||
<ol v-else-if="ranking.items.length" class="grid overflow-hidden rounded-xl border border-[#e7e5e4]">
|
||||
<li v-for="(game, index) in ranking.items.slice(0, 5)" :key="game.id ?? game.name"
|
||||
class="grid gap-3 border-b border-[#e7e5e4] bg-white p-4 last:border-b-0 sm:grid-cols-[56px_minmax(0,1fr)_minmax(120px,auto)_minmax(120px,auto)] sm:items-center">
|
||||
class="flex min-w-0 flex-col gap-3 border-b border-[#e7e5e4] bg-white p-4 last:border-b-0 sm:flex-row sm:items-center">
|
||||
<span
|
||||
class="inline-flex h-9 w-9 items-center justify-center rounded-full bg-[#292524] text-[15px] font-medium leading-none text-white">
|
||||
class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-[#292524] text-[15px] font-medium leading-none text-white">
|
||||
{{ index + 1 }}
|
||||
</span>
|
||||
<div class="min-w-0">
|
||||
<strong class="block break-words text-base font-medium leading-6 tracking-[0.16px] text-[#0c0a09]">
|
||||
<div class="min-w-0 flex-1">
|
||||
<strong
|
||||
class="block min-w-0 break-words text-base font-medium leading-6 tracking-[0.16px] text-[#0c0a09]">
|
||||
{{ game.name }}
|
||||
</strong>
|
||||
<span class="text-[13px] leading-[1.5] tracking-[0.13px] text-[#777169]">
|
||||
{{ game.platform ?? 'Plataforma não informada' }}
|
||||
</span>
|
||||
</div>
|
||||
<span class="text-[15px] leading-[1.47] tracking-[0.15px] text-[#292524]">
|
||||
{{ formatNumber(game.active_players) }} jogadores
|
||||
</span>
|
||||
<span class="text-[15px] leading-[1.47] tracking-[0.15px] text-[#292524]">
|
||||
{{ formatNumber(game.weekly_points) }} pts
|
||||
</span>
|
||||
<div class="flex min-w-0 flex-wrap gap-x-4 gap-y-1 sm:justify-end">
|
||||
<span class="whitespace-nowrap text-[15px] leading-[1.47] tracking-[0.15px] text-[#292524]">
|
||||
{{ formatNumber(game.active_players) }} jogadores
|
||||
</span>
|
||||
<span class="whitespace-nowrap text-[15px] leading-[1.47] tracking-[0.15px] text-[#292524]">
|
||||
{{ formatNumber(game.weekly_points) }} pts
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
@@ -147,9 +151,9 @@
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<aside class="grid gap-4">
|
||||
<aside class="grid min-w-0 gap-4">
|
||||
<article
|
||||
class="grid gap-4 rounded-2xl border border-[#e7e5e4] bg-white p-6 shadow-[0_4px_16px_rgba(0,0,0,0.04)]"
|
||||
class="grid min-w-0 gap-4 rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] sm:p-5 md:p-6"
|
||||
aria-labelledby="profile-gamer-summary">
|
||||
<div class="flex items-start justify-between gap-3">
|
||||
<div>
|
||||
@@ -184,13 +188,13 @@
|
||||
</div>
|
||||
|
||||
<NuxtLink to="/perfil-gamer"
|
||||
class="inline-flex h-10 items-center justify-center rounded-full border border-[#d6d3d1] bg-transparent px-5 text-[15px] font-medium leading-none text-[#0c0a09] transition hover:border-[#0c0a09]">
|
||||
class="inline-flex min-h-10 min-w-0 items-center justify-center rounded-full border border-[#d6d3d1] bg-transparent px-5 py-2 text-center text-[15px] font-medium leading-[1.2] text-[#0c0a09] transition hover:border-[#0c0a09]">
|
||||
Abrir perfil gamer
|
||||
</NuxtLink>
|
||||
</article>
|
||||
|
||||
<article
|
||||
class="grid gap-4 rounded-2xl border border-[#e7e5e4] bg-white p-6 shadow-[0_4px_16px_rgba(0,0,0,0.04)]"
|
||||
class="grid min-w-0 gap-4 rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] sm:p-5 md:p-6"
|
||||
aria-labelledby="shortcuts-title">
|
||||
<div>
|
||||
<span
|
||||
@@ -205,21 +209,21 @@
|
||||
|
||||
<div class="grid gap-2">
|
||||
<NuxtLink v-for="shortcut in shortcuts" :key="shortcut.to" :to="shortcut.to"
|
||||
class="flex min-h-11 items-center justify-between gap-3 rounded-xl border border-[#e7e5e4] px-4 text-[15px] font-medium leading-[1.47] tracking-[0.15px] text-[#0c0a09] transition hover:border-[#0c0a09]">
|
||||
<span class="inline-flex items-center gap-2">
|
||||
<Icon :name="shortcut.icon" class="text-base text-[#777169]" />
|
||||
class="flex min-h-11 min-w-0 items-center justify-between gap-3 rounded-xl border border-[#e7e5e4] px-4 text-[15px] font-medium leading-[1.47] tracking-[0.15px] text-[#0c0a09] transition hover:border-[#0c0a09]">
|
||||
<span class="inline-flex min-w-0 items-center gap-2">
|
||||
<Icon :name="shortcut.icon" class="shrink-0 text-base text-[#777169]" />
|
||||
{{ shortcut.label }}
|
||||
</span>
|
||||
<Icon name="mdi:arrow-right" class="text-base text-[#777169]" />
|
||||
<Icon name="mdi:arrow-right" class="shrink-0 text-base text-[#777169]" />
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</article>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
<section class="grid gap-4 md:grid-cols-3" aria-label="Prévia dos serviços">
|
||||
<section class="grid min-w-0 gap-4 xl:grid-cols-3" aria-label="Prévia dos serviços">
|
||||
<article v-for="service in servicePreviews" :key="service.title"
|
||||
class="grid gap-4 rounded-2xl border border-[#e7e5e4] bg-white p-6 shadow-[0_4px_16px_rgba(0,0,0,0.04)]">
|
||||
class="grid min-w-0 gap-4 rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] sm:p-5 md:p-6">
|
||||
<div class="flex items-start justify-between gap-3">
|
||||
<div>
|
||||
<span
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<template>
|
||||
<div class="relative min-h-screen overflow-hidden bg-[#f5f5f5] px-4 py-10 font-sans text-[#0c0a09] md:px-8 md:py-16">
|
||||
<div
|
||||
class="relative min-h-screen overflow-x-hidden bg-[#f5f5f5] px-3 py-8 font-sans text-[#0c0a09] sm:px-4 md:px-6 md:py-12 xl:px-8 xl:py-16">
|
||||
<div
|
||||
class="pointer-events-none absolute left-1/2 top-8 h-[460px] w-[min(92vw,820px)] -translate-x-1/2 rounded-[48px] bg-[radial-gradient(circle_at_20%_30%,rgba(232,184,196,0.55),transparent_28%),radial-gradient(circle_at_72%_24%,rgba(168,200,232,0.56),transparent_30%),radial-gradient(circle_at_52%_78%,rgba(167,229,211,0.58),transparent_34%)] blur-2xl"
|
||||
aria-hidden="true"></div>
|
||||
|
||||
<main class="relative mx-auto grid w-full max-w-[960px] gap-8" aria-labelledby="perfil-gamer-title">
|
||||
<main class="relative mx-auto grid w-full min-w-0 max-w-[960px] gap-6 md:gap-8"
|
||||
aria-labelledby="perfil-gamer-title">
|
||||
<header class="flex flex-col gap-5 sm:flex-row sm:items-end sm:justify-between">
|
||||
<div>
|
||||
<p
|
||||
@@ -12,7 +14,7 @@
|
||||
Perfil
|
||||
</p>
|
||||
<h1 id="perfil-gamer-title"
|
||||
class="my-5 max-w-[720px] font-serif text-[40px] font-light leading-[1.08] tracking-[-0.96px] text-[#0c0a09] md:text-[48px]">
|
||||
class="my-5 max-w-[720px] break-words font-serif text-[34px] font-light leading-[1.08] tracking-[-0.96px] text-[#0c0a09] sm:text-[40px] md:text-[48px]">
|
||||
Perfil Gamer
|
||||
</h1>
|
||||
<p class="m-0 max-w-[560px] text-base font-normal leading-6 tracking-[0.16px] text-[#4e4e4e]">
|
||||
@@ -22,7 +24,7 @@
|
||||
</header>
|
||||
|
||||
<section
|
||||
class="grid gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-6 shadow-[0_4px_16px_rgba(0,0,0,0.04)] md:p-8"
|
||||
class="grid min-w-0 gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] sm:p-5 md:p-6 xl:p-8"
|
||||
aria-label="Formulário do perfil gamer">
|
||||
<div>
|
||||
<span
|
||||
@@ -50,7 +52,7 @@
|
||||
Nickname
|
||||
</label>
|
||||
<input id="nickname" v-model="form.nickname" type="text" required maxlength="80"
|
||||
class="h-11 rounded-xl border border-[#e7e5e4] px-4 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
class="h-11 w-full min-w-0 rounded-xl border border-[#e7e5e4] px-4 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
placeholder="Seu apelido no GameVerse" />
|
||||
</div>
|
||||
|
||||
@@ -59,7 +61,7 @@
|
||||
Bio
|
||||
</label>
|
||||
<textarea id="bio" v-model="form.bio" rows="4"
|
||||
class="rounded-xl border border-[#e7e5e4] px-4 py-3 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
class="w-full min-w-0 rounded-xl border border-[#e7e5e4] px-4 py-3 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
placeholder="Conte um pouco sobre você como jogador"></textarea>
|
||||
</div>
|
||||
|
||||
@@ -68,7 +70,7 @@
|
||||
País
|
||||
</label>
|
||||
<input id="country" v-model="form.country" type="text" maxlength="80"
|
||||
class="h-11 rounded-xl border border-[#e7e5e4] px-4 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
class="h-11 w-full min-w-0 rounded-xl border border-[#e7e5e4] px-4 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
placeholder="Brasil" />
|
||||
</div>
|
||||
|
||||
@@ -77,7 +79,7 @@
|
||||
Plataformas favoritas
|
||||
</label>
|
||||
<input id="platforms" v-model="form.platformsText" type="text"
|
||||
class="h-11 rounded-xl border border-[#e7e5e4] px-4 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
class="h-11 w-full min-w-0 rounded-xl border border-[#e7e5e4] px-4 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
placeholder="Steam, Epic Games, PlayStation" />
|
||||
<p class="m-0 text-xs text-[#777169]">Separe por vírgula.</p>
|
||||
</div>
|
||||
@@ -87,7 +89,7 @@
|
||||
Jogos favoritos
|
||||
</label>
|
||||
<input id="games" v-model="form.gamesText" type="text"
|
||||
class="h-11 rounded-xl border border-[#e7e5e4] px-4 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
class="h-11 w-full min-w-0 rounded-xl border border-[#e7e5e4] px-4 text-[15px] text-[#0c0a09] outline-none transition focus:border-[#0c0a09]"
|
||||
placeholder="Valorant, Elden Ring, Hades" />
|
||||
<p class="m-0 text-xs text-[#777169]">Separe por vírgula.</p>
|
||||
</div>
|
||||
@@ -98,15 +100,15 @@
|
||||
class="h-20 w-20 rounded-full border border-[#e7e5e4] object-cover" />
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap gap-3 pt-2">
|
||||
<div class="flex flex-col gap-3 pt-2 sm:flex-row sm:flex-wrap">
|
||||
<button type="submit" :disabled="isSaving"
|
||||
class="inline-flex h-10 items-center justify-center gap-2 rounded-full bg-[#292524] px-6 text-[15px] font-medium text-white transition hover:bg-[#0c0a09] disabled:cursor-not-allowed disabled:opacity-70">
|
||||
class="inline-flex min-h-10 items-center justify-center gap-2 rounded-full bg-[#292524] px-6 py-2 text-[15px] font-medium text-white transition hover:bg-[#0c0a09] disabled:cursor-not-allowed disabled:opacity-70">
|
||||
<Icon v-if="isSaving" name="mdi:loading" class="animate-spin text-base" />
|
||||
<span>{{ isSaving ? 'Salvando...' : submitLabel }}</span>
|
||||
</button>
|
||||
|
||||
<button v-if="perfil" type="button" :disabled="isSaving" @click="removerPerfil"
|
||||
class="inline-flex h-10 items-center justify-center rounded-full border border-red-300 bg-transparent px-6 text-[15px] font-medium text-red-700 transition hover:border-red-500 disabled:cursor-not-allowed disabled:opacity-70">
|
||||
class="inline-flex min-h-10 items-center justify-center rounded-full border border-red-300 bg-transparent px-6 py-2 text-[15px] font-medium text-red-700 transition hover:border-red-500 disabled:cursor-not-allowed disabled:opacity-70">
|
||||
Remover perfil
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<div class="relative min-h-screen overflow-hidden bg-[#f5f5f5] px-4 py-10 font-sans text-[#0c0a09] md:px-8 md:py-16">
|
||||
<div
|
||||
class="relative min-h-screen overflow-x-hidden bg-[#f5f5f5] px-3 py-8 font-sans text-[#0c0a09] sm:px-4 md:px-6 md:py-12 xl:px-8 xl:py-16">
|
||||
<div
|
||||
class="pointer-events-none absolute left-1/2 top-8 h-[460px] w-[min(92vw,820px)] -translate-x-1/2 rounded-[48px] bg-[radial-gradient(circle_at_20%_30%,rgba(167,229,211,0.62),transparent_28%),radial-gradient(circle_at_72%_24%,rgba(244,197,168,0.5),transparent_30%),radial-gradient(circle_at_52%_78%,rgba(168,200,232,0.56),transparent_34%)] blur-2xl"
|
||||
aria-hidden="true"></div>
|
||||
|
||||
<main class="relative mx-auto grid w-full max-w-[1120px] gap-8" aria-labelledby="ranking-title">
|
||||
<main class="relative mx-auto grid w-full min-w-0 max-w-[1120px] gap-6 md:gap-8" aria-labelledby="ranking-title">
|
||||
<header class="flex flex-col gap-5 sm:flex-row sm:items-end sm:justify-between">
|
||||
<div>
|
||||
<p
|
||||
@@ -12,7 +13,7 @@
|
||||
Rankings
|
||||
</p>
|
||||
<h1 id="ranking-title"
|
||||
class="my-5 max-w-[720px] font-serif text-[40px] font-light leading-[1.08] tracking-[-0.96px] text-[#0c0a09] md:text-[48px]">
|
||||
class="my-5 max-w-[720px] break-words font-serif text-[34px] font-light leading-[1.08] tracking-[-0.96px] text-[#0c0a09] sm:text-[40px] md:text-[48px]">
|
||||
Ranking de jogos
|
||||
</h1>
|
||||
<p class="m-0 max-w-[560px] text-base font-normal leading-6 tracking-[0.16px] text-[#4e4e4e]">
|
||||
@@ -22,9 +23,9 @@
|
||||
</header>
|
||||
|
||||
<section
|
||||
class="grid gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-6 shadow-[0_4px_16px_rgba(0,0,0,0.04)] md:p-8"
|
||||
class="grid min-w-0 gap-6 rounded-2xl border border-[#e7e5e4] bg-white p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)] sm:p-5 md:p-6 xl:p-8"
|
||||
aria-label="Lista de ranking de jogos">
|
||||
<div class="grid gap-5 md:grid-cols-[minmax(0,1fr)_minmax(240px,320px)] md:items-end">
|
||||
<div class="grid min-w-0 gap-5 xl:grid-cols-[minmax(0,1fr)_minmax(240px,320px)] xl:items-end">
|
||||
<div>
|
||||
<span
|
||||
class="inline-flex min-h-6 items-center rounded-full bg-[rgba(167,229,211,0.62)] px-2.5 py-1 text-xs font-semibold uppercase leading-none tracking-[0.96px] text-[#0c0a09]">
|
||||
@@ -56,7 +57,7 @@
|
||||
|
||||
<div v-else class="overflow-hidden rounded-xl border border-[#e7e5e4]">
|
||||
<div
|
||||
class="hidden bg-[#fafafa] px-4 py-3 text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169] md:grid md:grid-cols-[72px_minmax(180px,1.5fr)_minmax(130px,1fr)_repeat(4,minmax(100px,1fr))] md:gap-4">
|
||||
class="hidden bg-[#fafafa] px-4 py-3 text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169] xl:grid xl:grid-cols-[72px_minmax(180px,1.5fr)_minmax(130px,1fr)_repeat(4,minmax(100px,1fr))] xl:gap-4">
|
||||
<span>Posição</span>
|
||||
<span>Jogo</span>
|
||||
<span>Plataforma</span>
|
||||
@@ -68,9 +69,9 @@
|
||||
|
||||
<ol class="grid divide-y divide-[#e7e5e4]">
|
||||
<li v-for="(game, index) in rankings" :key="game.id"
|
||||
class="grid gap-4 bg-white p-4 md:grid-cols-[72px_minmax(180px,1.5fr)_minmax(130px,1fr)_repeat(4,minmax(100px,1fr))] md:items-center md:gap-4">
|
||||
<div class="flex items-center justify-between gap-3 md:block">
|
||||
<span class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169] md:hidden">
|
||||
class="grid min-w-0 gap-4 bg-white p-4 xl:grid-cols-[72px_minmax(180px,1.5fr)_minmax(130px,1fr)_repeat(4,minmax(100px,1fr))] xl:items-center xl:gap-4">
|
||||
<div class="flex items-center justify-between gap-3 xl:block">
|
||||
<span class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169] xl:hidden">
|
||||
Posição
|
||||
</span>
|
||||
<span
|
||||
@@ -80,11 +81,11 @@
|
||||
</div>
|
||||
|
||||
<div class="grid gap-1">
|
||||
<span class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169] md:hidden">
|
||||
<span class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169] xl:hidden">
|
||||
Jogo
|
||||
</span>
|
||||
<div class="flex items-center gap-2">
|
||||
<strong class="text-base font-medium leading-6 tracking-[0.16px] text-[#0c0a09]">
|
||||
<div class="flex min-w-0 items-center gap-2">
|
||||
<strong class="min-w-0 break-words text-base font-medium leading-6 tracking-[0.16px] text-[#0c0a09]">
|
||||
{{ game.name }}
|
||||
</strong>
|
||||
<button type="button" :disabled="togglingId === game.name" :aria-label="favoriteIds.has(game.name)
|
||||
@@ -110,11 +111,12 @@
|
||||
</div>
|
||||
|
||||
<div v-for="stat in getGameStats(game)" :key="stat.label"
|
||||
class="flex items-center justify-between gap-3 md:block">
|
||||
<span class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169] md:hidden">
|
||||
class="flex min-w-0 items-center justify-between gap-3 xl:block">
|
||||
<span class="text-xs font-semibold uppercase leading-[1.4] tracking-[0.96px] text-[#777169] xl:hidden">
|
||||
{{ stat.label }}
|
||||
</span>
|
||||
<span class="text-[15px] leading-[1.47] tracking-[0.15px] text-[#292524]">
|
||||
<span
|
||||
class="min-w-0 break-words text-right text-[15px] leading-[1.47] tracking-[0.15px] text-[#292524] xl:text-left">
|
||||
{{ stat.value }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user