@4verburga/alpine-spanishplus 1.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 NuxtLabs SAS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ [![Alpine](./.starters/default/public/social-card-preview.png)](https://alpine.nuxt.space)
2
+
3
+ # Alpine
4
+
5
+ [![npm version][npm-version-src]][npm-version-href]
6
+ [![License][license-src]][license-href]
7
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
8
+ [![Nuxt][nuxt-src]][nuxt-href]
9
+ [![Nuxt Studio][nuxt-studio-src]][nuxt-studio-href]
10
+ [![Volta][volta-src]][volta-href]
11
+
12
+ The minimalist blog theme, powered by [Nuxt](https://nuxt.com).
13
+
14
+
15
+ - [📸 Online demo](https://alpine.nuxt.space)
16
+ - [⚡️ Play on StackBlitz](https://stackblitz.com/github/nuxt-themes/alpine-starter)
17
+
18
+ ## Features
19
+
20
+ - Start from a **profile page**, scale to a **complete blog**!
21
+ - An [open source blog theme](https://github.com/nuxt-themes/alpine) powered by [Nuxt Content](https://content.nuxtjs.org), editable from [Nuxt Studio](https://nuxt.studio).
22
+ - Write pages in Markdown and Vue components with the [MDC syntax](https://content.nuxtjs.org/guide/writing/mdc).
23
+ - Use [**30+ built-in**](https://elements.nuxt.space) components in your Markdown pages.
24
+
25
+ ## Quick Start
26
+
27
+ ```bash
28
+ npx nuxi@latest init -t themes/alpine
29
+ ```
30
+
31
+ ## Contributing 🙏
32
+
33
+ 1. Clone this repository
34
+ 2. Install dependencies using `pnpm install`
35
+ 3. Run `pnpm prepare` to generate type stubs.
36
+ 4. Use `pnpm dev` to start [playground](./playground) in development mode.
37
+
38
+ ## License
39
+
40
+ [MIT](./LICENSE)
41
+
42
+ <!-- Badges -->
43
+ [npm-version-src]: https://img.shields.io/npm/v/@nuxt-themes/alpine/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
44
+ [npm-version-href]: https://npmjs.com/package/@nuxt-themes/alpine
45
+
46
+ [npm-downloads-src]: https://img.shields.io/npm/dt/@nuxt-themes/alpine.svg?style=flat&colorA=18181B&colorB=28CF8D
47
+ [npm-downloads-href]: https://npmjs.com/package/@nuxt-themes/alpine
48
+
49
+ [license-src]: https://img.shields.io/github/license/nuxt-themes/alpine.svg?style=flat&colorA=18181B&colorB=28CF8D
50
+ [license-href]: https://github.com/nuxt-themes/alpine/blob/main/LICENSE
51
+
52
+
53
+ [nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?&logo=nuxt.js
54
+ [nuxt-href]: https://nuxt.com
55
+
56
+ [nuxt-studio-src]: https://img.shields.io/badge/Open%20in%20Nuxt%20Studio-18181B?&logo=nuxt.js&logoColor=3BB5EC
57
+ [nuxt-studio-href]: https://nuxt.studio/themes/alpine
58
+
59
+ [volta-src]: https://user-images.githubusercontent.com/904724/209143798-32345f6c-3cf8-4e06-9659-f4ace4a6acde.svg
60
+ [volta-href]: https://volta.net/nuxt-themes/alpine?utm_source=readme_alpine
package/app.config.ts ADDED
@@ -0,0 +1,45 @@
1
+ export default defineAppConfig({
2
+ alpine: {
3
+ title: 'Alpine',
4
+ description: 'The minimalist blog theme',
5
+ image: {
6
+ src: '/social-card-preview.png',
7
+ alt: 'An image showcasing my project.',
8
+ width: 400,
9
+ height: 300
10
+ },
11
+ header: {
12
+ position: 'right',
13
+ logo: {
14
+ path: '/logo.svg',
15
+ pathDark: '/logo-dark.svg',
16
+ alt: 'alpine'
17
+ }
18
+ },
19
+ footer: {
20
+ credits: {
21
+ enabled: true,
22
+ text: 'Alpine',
23
+ repository: 'https://www.github.com/nuxt-themes/alpine'
24
+ },
25
+ navigation: true,
26
+ alignment: 'center',
27
+ message: 'Follow me on'
28
+ },
29
+ socials: {
30
+ twitter: '',
31
+ instagram: '',
32
+ github: '',
33
+ facebook: '',
34
+ medium: '',
35
+ youtube: ''
36
+ },
37
+ form: {
38
+ successMessage: 'Message sent. Thank you!'
39
+ },
40
+ backToTop: {
41
+ text: 'Back to top',
42
+ icon: 'material-symbols:arrow-upward'
43
+ }
44
+ }
45
+ })
package/app.vue ADDED
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <AppLayout>
3
+ <NuxtPage />
4
+ </AppLayout>
5
+ </template>
6
+
7
+ <style>
8
+ html {
9
+ font-family: $dt('font.sans');
10
+ }
11
+ </style>
@@ -0,0 +1,20 @@
1
+ body {
2
+ background-color: $dt('alpine.body.backgroundColor');
3
+ color: $dt('alpine.body.color');
4
+ }
5
+
6
+ /* Color scheme images helper classes */
7
+ .light-img {
8
+ display: block;
9
+ }
10
+ .dark-img {
11
+ display: none;
12
+ }
13
+ @dark {
14
+ .dark-img {
15
+ display: block;
16
+ }
17
+ .light-img {
18
+ display: none;
19
+ }
20
+ }
@@ -0,0 +1,110 @@
1
+ <script lang="ts" setup>
2
+ const alpine = useAppConfig().alpine
3
+ </script>
4
+
5
+ <template>
6
+ <footer
7
+ :class="[
8
+ alpine.footer.alignment
9
+ ]"
10
+ >
11
+ <NuxtLink v-if="alpine.footer?.credits?.enabled" class="credits" :to="alpine.footer.credits.repository">
12
+ {{ alpine.footer?.credits?.text }}
13
+ </NuxtLink>
14
+
15
+ <div v-if="alpine.footer.navigation" class="navigation">
16
+ <MainNav />
17
+ </div>
18
+
19
+ <p v-if="alpine.footer?.message" class="message">
20
+ {{ alpine.footer.message }}
21
+ </p>
22
+
23
+ <div class="icons">
24
+ <div v-if="alpine.socials && Object.entries(alpine.socials)" class="social">
25
+ <SocialIcons :socials="alpine.socials" />
26
+ </div>
27
+ <div class="color-mode-switch">
28
+ <ColorModeSwitch />
29
+ </div>
30
+ </div>
31
+ </footer>
32
+ </template>
33
+
34
+ <style scoped lang="ts">
35
+ css({
36
+ footer: {
37
+ display: 'flex',
38
+ flexDirection: 'column',
39
+ alignItems: 'center',
40
+ marginTop: '{space.24}',
41
+ py: '{space.8}',
42
+ '&.left': {
43
+ alignItems: 'flex-start'
44
+ },
45
+ '&.right': {
46
+ alignItems: 'flex-end'
47
+ },
48
+ '@md': {
49
+ minHeight: '{space.36}',
50
+ },
51
+ '.credits': {
52
+ fontSize: '{text.3xl.fontSize}',
53
+ lineHeight: '{text.3xl.lineHeight}',
54
+ fontWeight: '{fontWeight.bold}',
55
+ marginBottom: '{space.4}',
56
+ },
57
+ '.navigation': {
58
+ display: 'none',
59
+ '@sm': {
60
+ display: 'flex',
61
+ marginBottom: '{space.8}',
62
+ fontSize: '{text.base.fontSize}',
63
+ lineHeight: '{text.base.lineHeight}',
64
+ fontWeight: '{fontWeight.medium}',
65
+ }
66
+ },
67
+ '.message': {
68
+ textAlign: 'center',
69
+ marginBottom: '{space.4}',
70
+ },
71
+ '.icons': {
72
+ display: 'grid',
73
+ width: '100%',
74
+ gridTemplateColumns: 'repeat(12, minmax(0, 1fr))',
75
+ gap: '{space.4}',
76
+ '.left &&': {
77
+ display: 'flex',
78
+ alignItems: 'center',
79
+ justifyContent: 'space-between'
80
+ },
81
+ '.right &&': {
82
+ display: 'flex',
83
+ alignItems: 'center',
84
+ justifyContent: 'space-between',
85
+ flexDirection: 'row-reverse'
86
+ },
87
+ '.social': {
88
+ gridColumn: 'span 12 / span 12',
89
+ display: 'flex',
90
+ justifyContent: 'center',
91
+ gap: '{space.4}',
92
+ '@xs': {
93
+ gridColumn: 'span 4 / span 4',
94
+ gridColumnStart: 5,
95
+ }
96
+ },
97
+ '.color-mode-switch': {
98
+ gridColumn: 'span 12 / span 12',
99
+ display: 'flex',
100
+ justifyContent: 'center',
101
+ '@xs': {
102
+ gridColumn: 'span 2 / span 2',
103
+ gridColumnStart: 11,
104
+ justifyContent: 'flex-end',
105
+ }
106
+ }
107
+ },
108
+ }
109
+ })
110
+ </style>
@@ -0,0 +1,151 @@
1
+ <script lang="ts" setup>
2
+ const alpine = useAppConfig().alpine
3
+
4
+ const show = ref(false)
5
+ </script>
6
+
7
+ <template>
8
+ <header :class="alpine.header.position || 'left'">
9
+ <div class="menu">
10
+ <button @click="(show = !show)" aria-label="Navigation Menu">
11
+ <svg width="24" height="24" viewBox="0 0 68 68" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
12
+ <path d="M8 34C8 32.1362 8 31.2044 8.30448 30.4693C8.71046 29.4892 9.48915 28.7105 10.4693 28.3045C11.2044 28 12.1362 28 14 28C15.8638 28 16.7956 28 17.5307 28.3045C18.5108 28.7105 19.2895 29.4892 19.6955 30.4693C20 31.2044 20 32.1362 20 34C20 35.8638 20 36.7956 19.6955 37.5307C19.2895 38.5108 18.5108 39.2895 17.5307 39.6955C16.7956 40 15.8638 40 14 40C12.1362 40 11.2044 40 10.4693 39.6955C9.48915 39.2895 8.71046 38.5108 8.30448 37.5307C8 36.7956 8 35.8638 8 34Z" />
13
+ <path d="M28 34C28 32.1362 28 31.2044 28.3045 30.4693C28.7105 29.4892 29.4892 28.7105 30.4693 28.3045C31.2044 28 32.1362 28 34 28C35.8638 28 36.7956 28 37.5307 28.3045C38.5108 28.7105 39.2895 29.4892 39.6955 30.4693C40 31.2044 40 32.1362 40 34C40 35.8638 40 36.7956 39.6955 37.5307C39.2895 38.5108 38.5108 39.2895 37.5307 39.6955C36.7956 40 35.8638 40 34 40C32.1362 40 31.2044 40 30.4693 39.6955C29.4892 39.2895 28.7105 38.5108 28.3045 37.5307C28 36.7956 28 35.8638 28 34Z" />
14
+ <path d="M48 34C48 32.1362 48 31.2044 48.3045 30.4693C48.7105 29.4892 49.4892 28.7105 50.4693 28.3045C51.2044 28 52.1362 28 54 28C55.8638 28 56.7956 28 57.5307 28.3045C58.5108 28.7105 59.2895 29.4892 59.6955 30.4693C60 31.2044 60 32.1362 60 34C60 35.8638 60 36.7956 59.6955 37.5307C59.2895 38.5108 58.5108 39.2895 57.5307 39.6955C56.7956 40 55.8638 40 54 40C52.1362 40 51.2044 40 50.4693 39.6955C49.4892 39.2895 48.7105 38.5108 48.3045 37.5307C48 36.7956 48 35.8638 48 34Z" />
15
+ </svg>
16
+ </button>
17
+ </div>
18
+
19
+ <div class="overlay" :class="[show && 'show']">
20
+ <MainNav @link-click="show = !show" />
21
+ </div>
22
+
23
+ <div class="logo">
24
+ <NuxtLink v-if="alpine.header.logo" to="/">
25
+ <!-- TODO: width/height doesn't make much sense here, but Lighthouse requires it.
26
+ Used current Alpine logo ratio, will break on enduser logo -->
27
+ <NuxtImg class="dark-img" :src="alpine.header.logo.pathDark" :alt="alpine.header.logo.alt" width="89" height="31" />
28
+ <NuxtImg class="light-img" :src="alpine.header.logo.path" :alt="alpine.header.logo.alt" width="89" height="31" />
29
+ </NuxtLink>
30
+ <NuxtLink v-else to="/" class="fallback">
31
+ {{ alpine.title }}
32
+ </NuxtLink>
33
+ </div>
34
+
35
+ <div class="main-nav">
36
+ <MainNav />
37
+ </div>
38
+ </header>
39
+ </template>
40
+
41
+ <style scoped lang="ts">
42
+ css({
43
+ header: {
44
+ '--header-padding': '{space.16}',
45
+ '--logo-height': '{space.8}',
46
+ position: 'relative',
47
+ display: 'grid',
48
+ gridTemplateColumns: 'repeat(12, minmax(0, 1fr))',
49
+ alignItems: 'center',
50
+ gap: '{space.4}',
51
+ py: 'var(--header-padding)',
52
+ '.menu': {
53
+ position: 'absolute',
54
+ display: 'flex',
55
+ ':hover': {
56
+ color: '{color.primary.500}',
57
+ },
58
+ '.left &&': {
59
+ right: 0
60
+ },
61
+ '@sm': {
62
+ display: 'none'
63
+ }
64
+ },
65
+ '.overlay': {
66
+ position: 'absolute',
67
+ top: 'calc(var(--header-padding) + var(--logo-height) + {space.2})',
68
+ backgroundColor: '{alpine.backdrop.backgroundColor}',
69
+ border: '1px solid {color.gray.200}',
70
+ borderRadius: '{radii.md}',
71
+ padding: '{space.6}',
72
+ paddingRight: '{space.24}',
73
+ fontSize: '{text.lg.fontSize}',
74
+ lineHeight: '{text.lg.lineHeight}',
75
+ fontWeight: '{fontWeight.medium}',
76
+ transition: 'all 250ms',
77
+ perspective: '2000px',
78
+ transformOrigin: 'top',
79
+ backdropFilter: 'blur(20px)',
80
+ willChange: 'opacity, transform',
81
+ '&:not(.show)': {
82
+ opacity: 0,
83
+ transform: 'translateY(-10px) rotateY(-8deg) rotateX(-20deg)',
84
+ '.left &&': {
85
+ transform: 'translateY(-10px) rotateY(8deg) rotateX(-20deg)',
86
+ },
87
+ pointerEvents: 'none'
88
+ },
89
+ '.left &&': {
90
+ right: 0,
91
+ padding: '{space.6}',
92
+ paddingLeft: '{space.16}',
93
+ textAlign: 'right'
94
+ },
95
+ '@sm': {
96
+ display: 'none'
97
+ },
98
+ '@dark': {
99
+ borderColor: '{color.gray.800}',
100
+ }
101
+ },
102
+ '.logo': {
103
+ display: 'flex',
104
+ gridColumn: 'span 12 / span 12',
105
+ height: 'var(--logo-height)',
106
+ a: {
107
+ display: 'flex',
108
+ },
109
+ '.center &&': {
110
+ gridColumn: 'span 12 / span 12',
111
+ justifyContent: 'center',
112
+ },
113
+ '.right &&': {
114
+ justifyContent: 'flex-end',
115
+ },
116
+ '@sm': {
117
+ gridColumn: 'span 4 / span 4',
118
+ gridColumnStart: 'auto',
119
+ '.right &&': {
120
+ order: 2,
121
+ },
122
+ },
123
+ '.fallback': {
124
+ fontSize: '{text.2xl.fontSize}',
125
+ lineHeight: '{text.2xl.lineHeight}',
126
+ fontWeight: '{fontWeight.semibold}'
127
+ }
128
+ },
129
+ '.main-nav': {
130
+ display: 'none',
131
+ '@sm': {
132
+ display: 'flex',
133
+ gridColumn: 'span 8 / span 8',
134
+ fontSize: '{text.xl.fontSize}',
135
+ lineHeight: '{text.xl.lineHeight}',
136
+ fontWeight: '{fontWeight.medium}',
137
+ '.center &&': {
138
+ gridColumn: 'span 12 / span 12',
139
+ justifyContent: 'center',
140
+ },
141
+ '.right &&': {
142
+ justifyContent: 'flex-start',
143
+ },
144
+ '.left &&': {
145
+ justifyContent: 'flex-end',
146
+ },
147
+ }
148
+ },
149
+ }
150
+ })
151
+ </style>
@@ -0,0 +1,35 @@
1
+ <script setup lang="ts">
2
+ const alpine = useAppConfig().alpine
3
+
4
+ defineProps({
5
+ padded: {
6
+ type: Boolean,
7
+ default: true
8
+ }
9
+ })
10
+
11
+ useHead({
12
+ meta: [
13
+ { name: 'twitter:card', content: 'summary_large_image' }
14
+ ]
15
+ })
16
+
17
+ useContentHead(alpine as any)
18
+ </script>
19
+
20
+ <template>
21
+ <Container class="app-layout">
22
+ <AppLoadingBar />
23
+ <AppHeader v-if="alpine.header" />
24
+ <slot />
25
+ <AppFooter v-if="alpine.footer" />
26
+ </Container>
27
+ </template>
28
+
29
+ <style lang="ts" scoped>
30
+ css({
31
+ '.app-layout': {
32
+ minWidth: '{size.xs}'
33
+ }
34
+ })
35
+ </style>
@@ -0,0 +1,110 @@
1
+ <script setup>
2
+ import { useNuxtApp, onBeforeUnmount, reactive } from '#imports'
3
+
4
+ const props = defineProps({
5
+ throttle: {
6
+ type: Number,
7
+ default: 200
8
+ },
9
+ duration: {
10
+ type: Number,
11
+ default: 2000
12
+ },
13
+ height: {
14
+ type: Number,
15
+ default: 3
16
+ }
17
+ })
18
+
19
+ const nuxtApp = useNuxtApp()
20
+
21
+ // Options & Data
22
+ const data = reactive({
23
+ percent: 0,
24
+ show: false,
25
+ canSucceed: true
26
+ })
27
+ // Local variables
28
+ let _timer = null
29
+ let _throttle = null
30
+ let _cut
31
+
32
+ // Functions
33
+ function clear () {
34
+ _timer && clearInterval(_timer)
35
+ _throttle && clearTimeout(_throttle)
36
+ _timer = null
37
+ }
38
+ function start () {
39
+ if (data.show) { return }
40
+ clear()
41
+ data.percent = 0
42
+ data.canSucceed = true
43
+
44
+ if (props.throttle) {
45
+ _throttle = setTimeout(startTimer, props.throttle)
46
+ } else {
47
+ startTimer()
48
+ }
49
+ }
50
+ function increase (num) {
51
+ data.percent = Math.min(100, Math.floor(data.percent + num))
52
+ }
53
+ function finish () {
54
+ data.percent = 100
55
+ hide()
56
+ }
57
+ function hide () {
58
+ clear()
59
+ setTimeout(() => {
60
+ data.show = false
61
+ setTimeout(() => {
62
+ data.percent = 0
63
+ }, 400)
64
+ }, 500)
65
+ }
66
+ function startTimer () {
67
+ data.show = true
68
+ _cut = 10000 / Math.floor(props.duration)
69
+ _timer = setInterval(() => {
70
+ increase(_cut)
71
+ }, 100)
72
+ }
73
+
74
+ // Hooks
75
+ nuxtApp.hook('content:middleware:start', start)
76
+ nuxtApp.hook('page:start', start)
77
+ nuxtApp.hook('page:finish', finish)
78
+
79
+ onBeforeUnmount(() => clear)
80
+ </script>
81
+
82
+ <template>
83
+ <div
84
+ class="nuxt-progress"
85
+ :class="{
86
+ 'nuxt-progress-failed': !data.canSucceed,
87
+ }"
88
+ :style="{
89
+ width: `${data.percent}%`,
90
+ left: data.left,
91
+ height: `${props.height}px`,
92
+ opacity: data.show ? 1 : 0,
93
+ backgroundSize: `${(100 / data.percent) * 100}% auto`,
94
+ }"
95
+ />
96
+ </template>
97
+
98
+ <style>
99
+ .nuxt-progress {
100
+ position: fixed;
101
+ top: 0px;
102
+ left: 0px;
103
+ right: 0px;
104
+ width: 0%;
105
+ opacity: 1;
106
+ transition: width 0.1s, height 0.4s, opacity 0.4s;
107
+ background: repeating-linear-gradient(to right, #00dc82 0%, #34cdfe 50%, #0047e1 100%);
108
+ z-index: 999999;
109
+ }
110
+ </style>
@@ -0,0 +1,46 @@
1
+ <script setup lang="ts">
2
+ defineProps({
3
+ type: {
4
+ type: String,
5
+ default: 'submit'
6
+ },
7
+ disabled: {
8
+ type: Boolean,
9
+ default: false
10
+ }
11
+ })
12
+ </script>
13
+
14
+ <template>
15
+ <button :type="type" :disabled="disabled">
16
+ <slot />
17
+ </button>
18
+ </template>
19
+
20
+ <style scoped lang="ts">
21
+ css({
22
+ button: {
23
+ backgroundColor: '{color.gray.900}',
24
+ color: '{color.gray.100}',
25
+ fontSize: '{text.sm.fontSize}',
26
+ lineHeight: '{text.sm.lineHeight}',
27
+ fontWeight: '{fontWeight.medium}',
28
+ py: '{space.2}',
29
+ px: '{space.4}',
30
+ borderRadius: '{radii.md}',
31
+ '@md': {
32
+ fontSize: '{text.base.fontSize}',
33
+ lineHeight: '{text.base.lineHeight}',
34
+ py: '{space.3}',
35
+ px: '{space.6}',
36
+ },
37
+ '@dark': {
38
+ backgroundColor: '{color.gray.100}',
39
+ color: '{color.gray.900}',
40
+ },
41
+ '&:disabled': {
42
+ cursor: 'not-allowed',
43
+ }
44
+ }
45
+ })
46
+ </style>
@@ -0,0 +1,47 @@
1
+ <script setup lang="ts">
2
+ const colorMode = useColorMode()
3
+ const onClick = () => {
4
+ const values = ['system', 'light', 'dark']
5
+ const index = values.indexOf(colorMode.preference)
6
+ const next = (index + 1) % values.length
7
+
8
+ colorMode.preference = values[next]
9
+ }
10
+ </script>
11
+
12
+ <template>
13
+ <button aria-label="Color Mode" @click="onClick">
14
+ <ColorScheme>
15
+ <template v-if="colorMode.preference === 'dark'">
16
+ <Icon name="uil:moon" />
17
+ <span class="sr-only">Dark mode</span>
18
+ </template>
19
+ <template v-else-if="colorMode.preference === 'light'">
20
+ <Icon name="uil:sun" />
21
+ <span class="sr-only">Light mode</span>
22
+ </template>
23
+ <template v-else>
24
+ <Icon name="uil:desktop" />
25
+ <span class="sr-only">System mode</span>
26
+ </template>
27
+ </ColorScheme>
28
+ </button>
29
+ </template>
30
+
31
+ <style scoped lang="ts">
32
+ css({
33
+ button: {
34
+ display: 'flex',
35
+ '--color-mode-switcher-size': '24px',
36
+ width: 'var(--color-mode-switcher-size)',
37
+ height: 'var(--color-mode-switcher-size)',
38
+ ':hover': {
39
+ color: '{color.primary.500}',
40
+ },
41
+ svg: {
42
+ width: '100%',
43
+ height: '100%',
44
+ }
45
+ }
46
+ })
47
+ </style>