From 3d21c9636db3f5bbc9173ba3b1625ef2b158fb00 Mon Sep 17 00:00:00 2001 From: davay Date: Mon, 23 Jan 2023 16:24:20 +0700 Subject: [PATCH] Playground started --- .../components/avatar-playground.vue | 27 +++++++++++++++++++ docs/.vitepress/composables/state.js | 6 +++++ docs/.vitepress/theme/Layout.vue | 5 +++- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 docs/.vitepress/components/avatar-playground.vue diff --git a/docs/.vitepress/components/avatar-playground.vue b/docs/.vitepress/components/avatar-playground.vue new file mode 100644 index 0000000..97606a2 --- /dev/null +++ b/docs/.vitepress/components/avatar-playground.vue @@ -0,0 +1,27 @@ + + + \ No newline at end of file diff --git a/docs/.vitepress/composables/state.js b/docs/.vitepress/composables/state.js index 895519f..c1ac928 100644 --- a/docs/.vitepress/composables/state.js +++ b/docs/.vitepress/composables/state.js @@ -11,6 +11,12 @@ export const state = reactive({ epriv: "Tr9_a9sWJbo7EI0ARB5VeptIBALFuVNkSkrRAuP8vQc", }, pub: computed(() => state.pair.pub), + options: { + size: 200, + reflect: true, + dark: false, + draw: 'circles' + }, }) state.history = useRefHistory(toRef(state, 'pair')) diff --git a/docs/.vitepress/theme/Layout.vue b/docs/.vitepress/theme/Layout.vue index 3982437..f3460bf 100644 --- a/docs/.vitepress/theme/Layout.vue +++ b/docs/.vitepress/theme/Layout.vue @@ -3,6 +3,7 @@ import DefaultTheme from 'vitepress/theme' import { computed, onMounted } from 'vue'; import GunVueAvatar from '../components/gun-vue-avatar.vue'; import HeaderLinks from '../components/header-links.vue' +import AvatarPlayground from '../components/avatar-playground.vue' import { useState } from '../composables/state' const { Layout } = DefaultTheme @@ -45,11 +46,13 @@ Layout .flex( v-for="rec in list" :key="rec" - ) + ) gun-vue-avatar.rounded-full( :pub="rec.snapshot.pub" :size="50" ) {{ rec.snapshot.pub }} + template(#home-features-after) + AvatarPlayground