From 42813ce936d9fb141241969651cb0e3a02345442 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 17 Jun 2022 15:15:41 +0800 Subject: [PATCH] feat(theme): support themeable images for logo and hero (#745) Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> --- .../theme-default/components/VPHero.vue | 17 ++++----- .../theme-default/components/VPImage.vue | 38 +++++++++++++++++++ .../components/VPNavBarTitle.vue | 5 ++- src/client/tsconfig.json | 3 +- types/default-theme.d.ts | 7 +++- 5 files changed, 57 insertions(+), 13 deletions(-) create mode 100644 src/client/theme-default/components/VPImage.vue diff --git a/src/client/theme-default/components/VPHero.vue b/src/client/theme-default/components/VPHero.vue index e485714c7d40..81770bb268e4 100644 --- a/src/client/theme-default/components/VPHero.vue +++ b/src/client/theme-default/components/VPHero.vue @@ -1,5 +1,7 @@ @@ -25,7 +22,9 @@ defineProps<{
-

{{ name }}

+

+ {{ name }} +

{{ text }}

{{ tagline }}

@@ -45,7 +44,7 @@ defineProps<{
- +
@@ -293,7 +292,7 @@ defineProps<{ } } -.image-src { +:deep(.image-src) { position: absolute; top: 50%; left: 50%; diff --git a/src/client/theme-default/components/VPImage.vue b/src/client/theme-default/components/VPImage.vue new file mode 100644 index 000000000000..90f5b8be1bbb --- /dev/null +++ b/src/client/theme-default/components/VPImage.vue @@ -0,0 +1,38 @@ + + + + + + + diff --git a/src/client/theme-default/components/VPNavBarTitle.vue b/src/client/theme-default/components/VPNavBarTitle.vue index 6f2e0cb66f86..5b037cff50e9 100644 --- a/src/client/theme-default/components/VPNavBarTitle.vue +++ b/src/client/theme-default/components/VPNavBarTitle.vue @@ -1,6 +1,7 @@