Skip to content

Commit 23f5959

Browse files
committed
feat: vueform astro material, bootstrap
1 parent 1903929 commit 23f5959

File tree

26 files changed

+330
-1
lines changed

26 files changed

+330
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from 'astro/config'
2+
import vue from '@astrojs/vue'
3+
4+
// https://astro.build/config
5+
export default defineConfig({
6+
integrations: [vue({ appEntrypoint: '/src/pages/_app' })],
7+
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<Vueform>
3+
<TextElement name="hello_world" label="Hello" placeholder="World" />
4+
</Vueform>
5+
</template>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { App } from 'vue';
2+
import Vueform from '@vueform/vueform'
3+
4+
export default async (app: App) => {
5+
const vueformConfig = (await import('../../vueform.config')).default
6+
app.use(Vueform, vueformConfig)
7+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
import Layout from '../layouts/Layout.astro';
3+
import TestForm from './../components/TestForm.vue';
4+
---
5+
<style is:global lang="scss">
6+
@import './../styles/style.scss';
7+
</style>
8+
9+
<Layout title="Welcome to Astro.">
10+
<TestForm client:only="vue" />
11+
</Layout>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
@import 'bootstrap/scss/bootstrap';
2+
@import '@vueform/vueform/themes/bootstrap/scss/index.scss';
3+
4+
@media (prefers-color-scheme: dark) {
5+
:root, :before, :after, * {
6+
@include vf-dark-vars;
7+
}
8+
}
9+
10+
:root {
11+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
12+
font-synthesis: none;
13+
text-rendering: optimizeLegibility;
14+
-webkit-font-smoothing: antialiased;
15+
-moz-osx-font-smoothing: grayscale;
16+
}
17+
18+
body {
19+
margin: 0;
20+
display: flex;
21+
place-items: center;
22+
min-width: 320px;
23+
min-height: 100vh;
24+
background-color: var(--bs-dark);
25+
color: white;
26+
}
27+
28+
form {
29+
max-width: 1280px;
30+
margin: 0 auto;
31+
padding: 2rem;
32+
text-align: center;
33+
}
34+
35+
@media (prefers-color-scheme: light) {
36+
:root {
37+
color: black;
38+
}
39+
40+
body {
41+
background: var(--bs-light);
42+
color: black;
43+
}
44+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import en from '@vueform/vueform/locales/en'
2+
import theme from '@vueform/vueform/dist/bootstrap'
3+
import { defineConfig } from '@vueform/vueform'
4+
5+
export default defineConfig({
6+
theme,
7+
locales: { en },
8+
locale: 'en',
9+
})
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from 'astro/config'
2+
import vue from '@astrojs/vue'
3+
4+
// https://astro.build/config
5+
export default defineConfig({
6+
integrations: [vue({ appEntrypoint: '/src/pages/_app' })],
7+
})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<Vueform>
3+
<TextElement name="hello_world" label="Hello" placeholder="World" />
4+
</Vueform>
5+
</template>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { App } from 'vue';
2+
import Vueform from '@vueform/vueform'
3+
4+
export default async (app: App) => {
5+
const vueformConfig = (await import('../../vueform.config')).default
6+
app.use(Vueform, vueformConfig)
7+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
import Layout from '../layouts/Layout.astro';
3+
import TestForm from './../components/TestForm.vue';
4+
---
5+
<style is:global lang="scss">
6+
@import './../styles/style.scss';
7+
</style>
8+
9+
<Layout title="Welcome to Astro.">
10+
<TestForm client:only="vue" />
11+
</Layout>

0 commit comments

Comments
 (0)