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>
|
||||
|
||||
Reference in New Issue
Block a user