Skip to content

Commit 84e9c01

Browse files
chore: fix demo
1 parent eb0e8fa commit 84e9c01

12 files changed

+343
-39
lines changed

demo/nuxt3/app.vue

+19-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11
<template>
2-
<header>
3-
<div class="wrapper">
4-
<Logo class="logo" />
5-
<HelloWorld msg="Chatwoot + Vue.js" />
6-
</div>
7-
</header>
2+
<div class="center">
3+
<header>
4+
<div class="wrapper">
5+
<Logo class="logo" />
6+
<HelloWorld msg="Chatwoot + Vue.js" />
7+
</div>
8+
</header>
89

9-
<main>
10-
<TheWelcome />
11-
</main>
10+
<main>
11+
<TheWelcome />
12+
</main>
13+
</div>
1214
</template>
1315

1416
<style scoped>
1517
header {
1618
line-height: 1.5;
1719
}
1820
21+
.center {
22+
display: flex;
23+
justify-content: center;
24+
align-items: center;
25+
height: 100vh;
26+
width: 100vw;
27+
}
28+
1929
.logo {
2030
display: block;
2131
margin: 2rem auto;

demo/nuxt3/assets/base.css

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/* color palette from <https://github.com/vuejs/theme> */
2+
:root {
3+
--vt-c-white: #ffffff;
4+
--vt-c-white-soft: #f8f8f8;
5+
--vt-c-white-mute: #f2f2f2;
6+
7+
--vt-c-black: #181818;
8+
--vt-c-black-soft: #222222;
9+
--vt-c-black-mute: #282828;
10+
11+
--vt-c-indigo: #2c3e50;
12+
13+
--vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
14+
--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
15+
--vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
16+
--vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
17+
18+
--vt-c-text-light-1: var(--vt-c-indigo);
19+
--vt-c-text-light-2: rgba(60, 60, 60, 0.66);
20+
--vt-c-text-dark-1: var(--vt-c-white);
21+
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
22+
}
23+
24+
/* semantic color variables for this project */
25+
:root {
26+
--color-background: var(--vt-c-white);
27+
--color-background-soft: var(--vt-c-white-soft);
28+
--color-background-mute: var(--vt-c-white-mute);
29+
30+
--color-border: var(--vt-c-divider-light-2);
31+
--color-border-hover: var(--vt-c-divider-light-1);
32+
33+
--color-heading: var(--vt-c-text-light-1);
34+
--color-text: var(--vt-c-text-light-1);
35+
36+
--section-gap: 160px;
37+
}
38+
39+
@media (prefers-color-scheme: dark) {
40+
:root {
41+
--color-background: var(--vt-c-black);
42+
--color-background-soft: var(--vt-c-black-soft);
43+
--color-background-mute: var(--vt-c-black-mute);
44+
45+
--color-border: var(--vt-c-divider-dark-2);
46+
--color-border-hover: var(--vt-c-divider-dark-1);
47+
48+
--color-heading: var(--vt-c-text-dark-1);
49+
--color-text: var(--vt-c-text-dark-2);
50+
}
51+
}
52+
53+
*,
54+
*::before,
55+
*::after {
56+
box-sizing: border-box;
57+
margin: 0;
58+
position: relative;
59+
font-weight: normal;
60+
}
61+
62+
body {
63+
min-height: 100vh;
64+
color: var(--color-text);
65+
background: var(--color-background);
66+
transition: color 0.5s, background-color 0.5s;
67+
line-height: 1.6;
68+
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
69+
Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
70+
font-size: 15px;
71+
text-rendering: optimizeLegibility;
72+
-webkit-font-smoothing: antialiased;
73+
-moz-osx-font-smoothing: grayscale;
74+
}

demo/nuxt3/assets/logo.svg

+6
Loading

demo/nuxt3/assets/main.css

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@import './base.css';
2+
3+
#app {
4+
max-width: 1280px;
5+
margin: 0 auto;
6+
padding: 2rem;
7+
8+
font-weight: normal;
9+
}
10+
11+
a,
12+
.green {
13+
text-decoration: none;
14+
color: hsla(160, 100%, 37%, 1);
15+
transition: 0.4s;
16+
}
17+
18+
@media (hover: hover) {
19+
a:hover {
20+
background-color: hsla(160, 100%, 37%, 0.2);
21+
}
22+
}
23+
24+
@media (min-width: 1024px) {
25+
body {
26+
display: flex;
27+
place-items: center;
28+
}
29+
30+
#app {
31+
display: grid;
32+
grid-template-columns: 1fr 1fr;
33+
padding: 0 2rem;
34+
}
35+
}

demo/nuxt3/assets/style.css

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
:root {
2+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
3+
line-height: 1.5;
4+
font-weight: 400;
5+
6+
color-scheme: light dark;
7+
color: rgba(255, 255, 255, 0.87);
8+
background-color: #242424;
9+
10+
font-synthesis: none;
11+
text-rendering: optimizeLegibility;
12+
-webkit-font-smoothing: antialiased;
13+
-moz-osx-font-smoothing: grayscale;
14+
-webkit-text-size-adjust: 100%;
15+
}
16+
17+
a {
18+
font-weight: 500;
19+
color: #646cff;
20+
text-decoration: inherit;
21+
}
22+
a:hover {
23+
color: #535bf2;
24+
}
25+
26+
body {
27+
margin: 0;
28+
display: flex;
29+
place-items: center;
30+
min-width: 320px;
31+
min-height: 100vh;
32+
}
33+
34+
h1 {
35+
font-size: 3.2em;
36+
line-height: 1.1;
37+
}
38+
39+
button {
40+
border-radius: 8px;
41+
border: 1px solid transparent;
42+
padding: 0.6em 1.2em;
43+
font-size: 1em;
44+
font-weight: 500;
45+
font-family: inherit;
46+
background-color: #1a1a1a;
47+
cursor: pointer;
48+
transition: border-color 0.25s;
49+
}
50+
button:hover {
51+
border-color: #646cff;
52+
}
53+
button:focus,
54+
button:focus-visible {
55+
outline: 4px auto -webkit-focus-ring-color;
56+
}
57+
58+
.card {
59+
padding: 2em;
60+
}
61+
62+
#app {
63+
max-width: 1280px;
64+
margin: 0 auto;
65+
padding: 2rem;
66+
text-align: center;
67+
}
68+
69+
@media (prefers-color-scheme: light) {
70+
:root {
71+
color: #213547;
72+
background-color: #ffffff;
73+
}
74+
a:hover {
75+
color: #747bff;
76+
}
77+
button {
78+
background-color: #f9f9f9;
79+
}
80+
}

demo/nuxt3/nuxt.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export default defineNuxtConfig({
2+
css: ['~/assets/main.css', '~/assets/style.css'],
23
modules: [
34
'@productdevbook/chatwoot',
45
],

demo/nuxt3/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"nuxt": "^3.3.2"
1212
},
1313
"dependencies": {
14-
"@productdevbook/chatwoot": "^0.2.0"
14+
"@productdevbook/chatwoot": "^0.2.1"
1515
},
1616
"resolutions": {
1717
"vite": "^4.2.1",

0 commit comments

Comments
 (0)