mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-03-21 17:54:13 -05:00
Add screenshot layout
This commit is contained in:
parent
4df0d4c5d1
commit
eea6984e64
65
src/layouts/ScreenshotLayout.vue
Normal file
65
src/layouts/ScreenshotLayout.vue
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<template>
|
||||
<main class="min-h-screen flex flex-col overflow-hidden">
|
||||
<slot />
|
||||
|
||||
<div class="h-12 m-4 bg-black bg-opacity-50 rounded-full">
|
||||
<div class="flex justify-between h-full font-splatoon2 text-sm text-gray-300">
|
||||
<div class="flex justify-start items-center space-x-6 ml-4">
|
||||
<div>
|
||||
<img src="@/assets/img/favicon.svg" class="h-16 -my-8" />
|
||||
</div>
|
||||
<div class="flex items-center space-x-8">
|
||||
<div class="text-3xl text-gray-50">
|
||||
{{ header }}
|
||||
</div>
|
||||
<div>
|
||||
<img src="@/assets/img/twitter-white.png" width="20" height="20" class="inline" />
|
||||
@splatoon3ink
|
||||
</div>
|
||||
<div>
|
||||
splatoon3.ink
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end items-center mr-6">
|
||||
{{ formatDateTime(time.now) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, onUnmounted } from 'vue';
|
||||
import { useTimeStore } from '../stores/time';
|
||||
|
||||
const props = defineProps({
|
||||
header: {
|
||||
type: String,
|
||||
},
|
||||
})
|
||||
|
||||
const time = useTimeStore();
|
||||
|
||||
onMounted(() => time.startUpdatingNow());
|
||||
onUnmounted(() => time.stopUpdatingNow());
|
||||
|
||||
function formatDateTime(date) {
|
||||
date = new Date(date);
|
||||
|
||||
return date.toLocaleString(undefined, {
|
||||
dateStyle: 'long',
|
||||
timeStyle: 'short',
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.footer-links a span {
|
||||
@apply text-gray-300;
|
||||
}
|
||||
|
||||
.footer-links a:hover span {
|
||||
@apply text-white underline;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="min-h-screen grow flex items-center justify-center overflow-hidden">
|
||||
<ScreenshotLayout header="Countdown">
|
||||
<div class="grow flex items-center justify-center">
|
||||
<div class="relative w-full max-w-2xl m-4 scale-[1.55]">
|
||||
<Splat3 class="absolute w-48 -bottom-16 left-28" fill="fill-splatoon-red" />
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ScreenshotLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
|
@ -23,4 +23,5 @@ import Splat2 from '@/components/splats/Splat2.vue';
|
|||
import Splat3 from '@/components/splats/Splat3.vue';
|
||||
import Splat4 from '@/components/splats/Splat4.vue';
|
||||
import Splat1 from '@/components/splats/Splat1.vue';
|
||||
import ScreenshotLayout from '../../layouts/ScreenshotLayout.vue';
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user