From 3ea735558f8cd536ae6708b21ad4de4e4669e975 Mon Sep 17 00:00:00 2001 From: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com> Date: Sat, 25 Jun 2022 01:53:08 +0200 Subject: [PATCH] chore(docs): move icons into floating container --- docs/src/.vuepress/theme/layouts/default.vue | 74 +++++++++++--------- 1 file changed, 42 insertions(+), 32 deletions(-) diff --git a/docs/src/.vuepress/theme/layouts/default.vue b/docs/src/.vuepress/theme/layouts/default.vue index 598cd87a..aee4a1a9 100644 --- a/docs/src/.vuepress/theme/layouts/default.vue +++ b/docs/src/.vuepress/theme/layouts/default.vue @@ -10,46 +10,56 @@ import ParentLayout from '@vuepress/theme-default/lib/client/layouts/Layout.vue' import ReactIcon from '~icons/logos/react' import GithubIcon from '~icons/carbon/logo-github' import DiscordIcon from '~icons/logos/discord-icon' + +const el = ref() +const marginLeft = ref() + +onMounted(() => { + const bbox = el.value.getBoundingClientRect() + marginLeft.value = `-${bbox.width / 2}px` +})