Skip to content

Commit

Permalink
[+] BlurBlock
Browse files Browse the repository at this point in the history
data#252
  • Loading branch information
LS-KR committed Aug 20, 2024
1 parent 1904c68 commit b473879
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ declare module 'vue' {
Balloon: typeof import('./components/Balloon.vue')['default']
Banner: typeof import('./components/Banner.vue')['default']
BirthdayButton: typeof import('./components/buttons/BirthdayButton.vue')['default']
BlurBlock: typeof import('./components/BlurBlock.vue')['default']
CapDownQuote: typeof import('./components/CapDownQuote.vue')['default']
ChannelBackupButton: typeof import('./components/buttons/ChannelBackupButton.vue')['default']
Divider: typeof import('./components/divider.vue')['default']
Expand Down
42 changes: 42 additions & 0 deletions src/components/BlurBlock.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<script lang="ts">
import {Vue, Component} from 'vue-facing-decorator';
@Component({})
export default class BlurBlock extends Vue {
blur = ""
isblur = false
mounted() {
this.blur = 'filter: blur(5px);';
this.isblur = true;
}
change() {
if (this.isblur) {
this.blur = 'filter: none;';
}
else {
this.blur = 'filter: blur(5px);';
}
this.isblur = !this.isblur;
}
}
</script>

<template>
<div class="blur" v-bind:style="blur" v-on:click="change()">
<slot />
</div>
</template>

<style lang="scss">
@import '../css/colors.sass';
@import '../css/markdown.sass';
@import '../css/global.sass';
@import '../css/motion.scss';
.blur {
@extend .markdown-content;
transition: all 1s $ease-in-out-cric;
}
</style>
3 changes: 2 additions & 1 deletion src/components/MDX.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import DynamicIcon from "@/components/DynamicIcon.vue";
import * as Vue from 'vue';
import {computed, defineComponent} from 'vue';
import PhotoScroll from './PhotoScroll.vue';
import BlurBlock from "./BlurBlock.vue";
export default defineComponent({
name: "MDX",
Expand Down Expand Up @@ -36,7 +37,7 @@ export default defineComponent({
{
renderFunction.value?.({
components: {
PhotoScroll, ChannelBackupButton, CapDownQuote, BackupButtons, DynamicIcon, Banner
PhotoScroll, ChannelBackupButton, CapDownQuote, BackupButtons, DynamicIcon, Banner, BlurBlock
}
})
}
Expand Down

0 comments on commit b473879

Please sign in to comment.