|
19 | 19 | :style="{ lineClamp: description ? 2 : 3 }" |
20 | 20 | style="display: block; text-overflow: ellipsis" |
21 | 21 | > |
22 | | - {{ title }} |
| 22 | + {{ title || 'BibleTime' }} |
23 | 23 | </h1> |
24 | 24 | <p |
25 | 25 | v-if="description" |
|
30 | 30 | {{ description }} |
31 | 31 | </p> |
32 | 32 | </div> |
33 | | - <div v-if="Boolean(icon)" style="width: 30%" class="flex justify-end"> |
34 | | - <IconComponent :name="icon" size="250px" style="margin: 0 auto; opacity: 0.7" /> |
35 | | - </div> |
36 | 33 | </div> |
37 | 34 | <div class="flex flex-row justify-center items-center text-left w-full"> |
38 | | - <AppLogo v-if="siteLogo" /> |
39 | | - <template v-else> |
40 | | - <svg |
41 | | - width="50" |
42 | | - height="50" |
43 | | - class="mr-3" |
44 | | - viewBox="0 0 200 200" |
45 | | - xmlns="http://www.w3.org/2000/svg" |
46 | | - > |
47 | | - <path |
48 | | - transform="translate(100 100)" |
49 | | - :fill="theme.includes('#') ? theme : `#${theme}`" |
50 | | - d="M62.3,-53.9C74.4,-34.5,73.5,-9,67.1,13.8C60.6,36.5,48.7,56.5,30.7,66.1C12.7,75.7,-11.4,74.8,-31.6,65.2C-51.8,55.7,-67.9,37.4,-73.8,15.7C-79.6,-6,-75.1,-31.2,-61.1,-51C-47.1,-70.9,-23.6,-85.4,0.8,-86C25.1,-86.7,50.2,-73.4,62.3,-53.9Z" |
51 | | - /> |
52 | | - </svg> |
53 | | - <p v-if="siteName" class="font-bold" style="font-size: 25px"> |
54 | | - {{ siteName }} |
55 | | - </p> |
56 | | - </template> |
| 35 | + <AppLogo style="height: 120px; width: 484px" /> |
57 | 36 | </div> |
58 | 37 | </div> |
59 | 38 | </div> |
|
64 | 43 | */ |
65 | 44 |
|
66 | 45 | import { useOgImageRuntimeConfig } from '#og-image/app/utils' |
67 | | -import { useSiteConfig } from '#site-config/app/composables' |
68 | | -import { computed, defineComponent, h, resolveComponent } from 'vue' |
| 46 | +import { computed } from 'vue' |
69 | 47 |
|
70 | 48 | // convert to typescript props |
71 | 49 | const props = withDefaults( |
72 | 50 | defineProps<{ |
| 51 | + avatar?: string |
73 | 52 | colorMode?: 'dark' | 'light' |
74 | 53 | description?: string |
75 | | - icon?: boolean | string |
76 | | - siteLogo?: string |
77 | | - siteName?: string |
78 | 54 | theme?: string |
79 | 55 | title?: string |
80 | 56 | }>(), |
81 | 57 | { |
| 58 | + avatar: 'https://wol.jw.org/en/wol/mp/r1/lp-e/w13/2013/1210', |
82 | 59 | colorMode: undefined, |
83 | 60 | description: undefined, |
84 | | - icon: undefined, |
85 | | - siteLogo: undefined, |
86 | | - siteName: undefined, |
87 | 61 | theme: '#0f356e', |
88 | 62 | title: 'title' |
89 | 63 | } |
@@ -131,26 +105,4 @@ const themeRgb = computed(() => { |
131 | 105 | ?.map((v) => Number.parseInt(v, 16)) |
132 | 106 | .join(', ') |
133 | 107 | }) |
134 | | -
|
135 | | -const siteConfig = useSiteConfig() |
136 | | -const siteName = computed(() => { |
137 | | - return props.siteName || siteConfig.name |
138 | | -}) |
139 | | -const siteLogo = computed(() => { |
140 | | - return props.siteLogo || siteConfig.logo |
141 | | -}) |
142 | | -
|
143 | | -const IconComponent = runtimeConfig.hasNuxtIcon |
144 | | - ? resolveComponent('Icon') |
145 | | - : defineComponent({ |
146 | | - render() { |
147 | | - return h('div', 'missing @nuxt/icon') |
148 | | - } |
149 | | - }) |
150 | | -if (typeof props.icon === 'string' && !runtimeConfig.hasNuxtIcon && import.meta.dev) { |
151 | | - console.warn('Please install `@nuxt/icon` to use icons with the fallback OG Image component.') |
152 | | -
|
153 | | - console.log('\nnpx nuxi module add icon\n') |
154 | | - // create simple div renderer component |
155 | | -} |
156 | 108 | </script> |
0 commit comments