|
1 | 1 | <template>
|
2 | 2 | <div
|
3 |
| - class="app flex flex-col bg-lila text-lavender relative overflow-y-auto" |
| 3 | + class="app" |
4 | 4 | >
|
5 |
| - <header class="flex items-center px-8 py-4 sticky top-0 w-full bg-black z-50"> |
6 |
| - <span class="font-bold"> |
7 |
| - Hello World |
| 5 | + <header> |
| 6 | + <span> |
| 7 | + @nuxtjs/design-tokens |
8 | 8 | </span>
|
9 | 9 | </header>
|
10 | 10 |
|
11 |
| - <div |
12 |
| - class="flex-1 rounded-lg relative z-0 p-8 overflow-y-auto" |
13 |
| - > |
14 |
| - <p class="flex items-center justify-center w-64 h-64 bg-gradient-to-r from-primary-50 to-primary-900 rounded-xl rounded-lg ring-4 ring-black"> |
15 |
| - Primary |
16 |
| - </p> |
17 |
| - <p class="flex items-center justify-center w-64 h-64 bg-black rounded-xl mt-8 rounded-lg ring-4 ring-black"> |
18 |
| - Black |
19 |
| - </p> |
20 |
| - <p class="flex items-center justify-center w-64 h-64 bg-grape rounded-xl mt-8 rounded-lg ring-4 ring-black"> |
21 |
| - Grape |
22 |
| - </p> |
23 |
| - <p class="text-black flex items-center justify-center w-64 h-64 bg-lavender rounded-xl mt-8 rounded-lg ring-4 ring-black"> |
24 |
| - Lavender |
25 |
| - </p> |
26 |
| - <p class="flex items-center justify-center w-64 h-64 bg-velvet-500 rounded-xl mt-8 rounded-lg ring-4 ring-black"> |
27 |
| - Velvet |
28 |
| - </p> |
29 |
| - </div> |
30 |
| - |
31 |
| - <footer class="flex justify-between items-center px-8 py-4 sticky top-0 w-full bg-black z-50"> |
32 |
| - <span class="font-bold"> |
| 11 | + <section> |
| 12 | + <Block :variants="['primary']" /> |
| 13 | + <Block :variants="['black']" /> |
| 14 | + <Block :variants="['grape']" /> |
| 15 | + <Block :variants="['lila']" /> |
| 16 | + <Block :variants="['velvet']" /> |
| 17 | + </section> |
| 18 | + |
| 19 | + <footer> |
| 20 | + <span> |
33 | 21 | {{ 'Footer' }}
|
34 | 22 | </span>
|
35 | 23 |
|
36 |
| - <span class="font-semibold">Built with @nuxtjs/design-tokens</span> |
| 24 | + <span>Built with @nuxtjs/design-tokens</span> |
37 | 25 | </footer>
|
38 | 26 | </div>
|
39 | 27 | </template>
|
40 | 28 |
|
41 | 29 | <script setup lang="ts">
|
42 | 30 | // const { fetch: fetchTokens } = useTokens()
|
| 31 | +
|
43 | 32 | // const { data } = await useAsyncData(fetchTokens)
|
44 | 33 | </script>
|
45 | 34 |
|
| 35 | +<style> |
| 36 | +html { |
| 37 | + font-family: Inter, sans-serif; |
| 38 | +} |
| 39 | +</style> |
| 40 | + |
46 | 41 | <style scoped lang="postcss">
|
47 | 42 | .app {
|
48 | 43 | height: 100vh;
|
49 | 44 | width: 100vw;
|
| 45 | + display: flex; |
| 46 | + align-items: center; |
| 47 | + flex-direction: column; |
| 48 | + overflow-y: auto; |
50 | 49 | background-color: $dt('colors.primary.100');
|
| 50 | + color: white; |
| 51 | +
|
| 52 | + @dark { |
| 53 | + background-color: $dt('colors.primary.200'); |
| 54 | + } |
| 55 | +
|
| 56 | + @screen lg { |
| 57 | + background-color: $dt('colors.primary.900'); |
| 58 | + } |
| 59 | +
|
| 60 | + header { |
| 61 | + display: flex; |
| 62 | + align-items: center; |
| 63 | + padding: 1rem 2rem; |
| 64 | + position: sticky; |
| 65 | + top: 0; |
| 66 | + width: 100%; |
| 67 | + background-color: $dt('colors.black'); |
| 68 | + z-index: 50; |
| 69 | +
|
| 70 | + span { |
| 71 | + font-weight: bold; |
| 72 | + } |
| 73 | + } |
| 74 | +
|
| 75 | + section { |
| 76 | + flex: 1; |
| 77 | + width: 100%; |
| 78 | + overflow-y: auto; |
| 79 | + padding: 1rem 2rem; |
| 80 | + z-index: 50; |
| 81 | +
|
| 82 | + & > * + * { |
| 83 | + margin-top: 1rem; |
| 84 | + } |
| 85 | + } |
| 86 | +
|
| 87 | + footer { |
| 88 | + background-color: $dt('colors.black'); |
| 89 | + display: flex; |
| 90 | + align-items: center; |
| 91 | + justify-content: space-between; |
| 92 | + padding: 1rem 2rem; |
| 93 | + position: sticky; |
| 94 | + top: 0; |
| 95 | + width: 100%; |
| 96 | + background-color: $dt('colors.black'); |
| 97 | + z-index: 50; |
| 98 | +
|
| 99 | + span { |
| 100 | + font-weight: bold; |
| 101 | + } |
| 102 | + } |
51 | 103 | }
|
52 | 104 | </style>
|
0 commit comments