Skip to content

Commit

Permalink
feat: Снежинки!
Browse files Browse the repository at this point in the history
  • Loading branch information
wokalek committed Dec 29, 2023
1 parent 351ddac commit 94871cd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"image-size": "^1.0.2",
"kaokun": "^1.1.10",
"lightningcss": "^1.22.1",
"magic-snowflakes": "^6.3.0",
"nanoid": "^5.0.4",
"normalize.css": "^8.0.1",
"nuxt": "^3.9.0",
Expand Down
13 changes: 13 additions & 0 deletions nuxt/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions nuxt/src/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template>
<div class="snowflakes-container" />
<div class="layout">
<TheHeader />
<main>
Expand All @@ -8,6 +9,20 @@
</div>
</template>

<script setup lang="ts">
import Snowflakes from 'magic-snowflakes'
onMounted(() => {
// eslint-disable-next-line no-new
new Snowflakes({
container: document.querySelector<HTMLDivElement>('.snowflakes-container') as HTMLDivElement,
color: '#808080',
minOpacity: 0.2,
minSize: 1,
})
})
</script>

<style lang="sass" scoped>
:global(html)
display: flex
Expand All @@ -33,4 +48,11 @@ main
align-items: center
flex-grow: 1
padding: var(--f-32-16) var(--f-64-16)
.snowflakes-container
position: fixed
height: 100vh
width: 100vw
pointer-events: none
user-select: none
</style>

0 comments on commit 94871cd

Please sign in to comment.