-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: images now on cdn, logo reworked
- Loading branch information
1 parent
46212fe
commit 2ef781e
Showing
117 changed files
with
87 additions
and
1,553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,71 @@ | ||
<template> | ||
<ClientOnly> | ||
<div v-if="$route.path === localePath('/')" class="logo" :style="{ backgroundImage: randomCharUrl }" /> | ||
<NuxtLink v-else :to="localePath('/')"> | ||
<div class="logo shake" :style="{ backgroundImage: randomCharUrl }" /> | ||
<div v-if="$route.path === localePath('/')" class="logo"> | ||
<img :src="randomCharImage" alt="" class="static-index"> | ||
</div> | ||
<NuxtLink v-else :to="localePath('/')" class="logo"> | ||
<img :src="randomCharImage" alt="" class="static"> | ||
<img :src="randomCharAnimatedImage" alt="" class="animated"> | ||
</NuxtLink> | ||
</ClientOnly> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const { public: publicEnv } = useRuntimeConfig() | ||
const localePath = useLocalePath() | ||
const characters = [ | ||
'shape', | ||
'gentleman', | ||
'banana', | ||
'burger', | ||
'catchy', | ||
'claw', | ||
'marshmallow', | ||
'sharky', | ||
'twitchy', | ||
'wooly', | ||
'woody', | ||
'pup', | ||
] | ||
const randomChar = characters[Math.floor(Math.random() * characters.length)] | ||
const randomCharUrl = `url(/units/${randomChar}/128.png)` | ||
const randomCharImage = `${publicEnv.cdnUrl}/units/${randomChar}/128.png` | ||
const randomCharAnimatedImage = `${publicEnv.cdnUrl}/units/${randomChar}/idle.gif` | ||
</script> | ||
|
||
<style scoped> | ||
header { | ||
padding: 0.5em 1em; | ||
display: flex; | ||
justify-content: space-between; | ||
justify-items: center; | ||
align-items: center; | ||
.logo { | ||
width: 64px; | ||
height: 64px; | ||
margin-top: -22px; | ||
transition: all 0.2s; | ||
scale: 1.2; | ||
@media (max-width: 768px) { | ||
& { | ||
padding: 0.5em 0.5em; | ||
} | ||
.static-index { | ||
display: block; | ||
width: 64px; | ||
height: 64px; | ||
} | ||
} | ||
.left { | ||
flex-grow: 1; | ||
flex-basis: 0; | ||
display: flex; | ||
align-items: center; | ||
a { | ||
font-size: 0; | ||
.static { | ||
display: block; | ||
width: 64px; | ||
height: 64px; | ||
} | ||
} | ||
@keyframes skewRandom { | ||
0% { | ||
transform: skewX(0); | ||
} | ||
50% { | ||
transform: skewX(-3deg); | ||
} | ||
75% { | ||
transform: skewX(3deg); | ||
.animated { | ||
display: none; | ||
width: 64px; | ||
height: 64px; | ||
} | ||
100% { | ||
transform: skewX(0); | ||
} | ||
} | ||
.logo { | ||
width: 64px; | ||
height: 64px; | ||
margin-top: -14px; | ||
transition: all 0.2s; | ||
background-size: contain; | ||
scale: 1.2; | ||
&:hover { | ||
scale: 1.3; | ||
&:hover.shake { | ||
animation-name: skewRandom; | ||
animation-duration: 0.5s; | ||
animation-iteration-count: infinite; | ||
animation-timing-function: ease-in-out; | ||
animation-direction: alternate-reverse; | ||
transform-origin: 50% 50%; | ||
scale: 1.1; | ||
.static { | ||
display: none; | ||
} | ||
.animated { | ||
display: block; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.