feat(global): initialize project and framework structure, dockerize
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
Welcome to The SYSTEM
|
||||
<h1 class="sr-only">The SYSTEM</h1>
|
||||
<NuxtLoadingIndicator />
|
||||
<NuxtPage />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
3
app/assets/css/tailwind.css
Normal file
3
app/assets/css/tailwind.css
Normal file
@@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
11
app/assets/scss/_base.scss
Normal file
11
app/assets/scss/_base.scss
Normal file
@@ -0,0 +1,11 @@
|
||||
/* Base document styles */
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--text-primary);
|
||||
background-color: var(--bg-dark);
|
||||
font-family: "Inter", sans-serif;
|
||||
}
|
||||
8
app/assets/scss/_utilities.scss
Normal file
8
app/assets/scss/_utilities.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
/* Custom small utilities */
|
||||
.no-scrollbar {
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.no-scrollbar::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
4
app/assets/scss/_variables.scss
Normal file
4
app/assets/scss/_variables.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
$color-primary: #3b82f6;
|
||||
$color-muted: #6b7280;
|
||||
$text-primary: #ffffff;
|
||||
$text-secondary: #e2e8f0;
|
||||
3
app/assets/scss/main.scss
Normal file
3
app/assets/scss/main.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
@use 'variables';
|
||||
@use 'base';
|
||||
@use 'utilities';
|
||||
22
app/components/PrimeButtonDemo.spec.ts
Normal file
22
app/components/PrimeButtonDemo.spec.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { mount } from '@vue/test-utils';
|
||||
import { nextTick } from 'vue';
|
||||
import PrimeVue from 'primevue/config';
|
||||
import Button from 'primevue/button';
|
||||
import Dialog from 'primevue/dialog';
|
||||
import PrimeButtonDemo from './PrimeButtonDemo.vue';
|
||||
import { it, expect } from 'vitest';
|
||||
|
||||
it('opens dialog on click', async () => {
|
||||
const wrapper = mount(PrimeButtonDemo, {
|
||||
attachTo: document.body,
|
||||
global: {
|
||||
plugins: [PrimeVue],
|
||||
components: { Button, Dialog },
|
||||
},
|
||||
});
|
||||
|
||||
await wrapper.find('button').trigger('click');
|
||||
await nextTick();
|
||||
|
||||
expect(document.body.innerHTML).toContain('PrimeVue is working');
|
||||
});
|
||||
15
app/components/PrimeButtonDemo.vue
Normal file
15
app/components/PrimeButtonDemo.vue
Normal file
@@ -0,0 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
|
||||
const _open = ref(false);
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<div class="space-y-2">
|
||||
<Button type="button" label="Open Dialog" @click="_open = true" @keyup.enter="_open = true" />
|
||||
<Dialog v-model:visible="_open" modal header="Hello" :draggable="false">
|
||||
<p>PrimeVue is working.</p>
|
||||
</Dialog>
|
||||
</div>
|
||||
</template>
|
||||
13
app/pages/index.vue
Normal file
13
app/pages/index.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import PrimeButtonDemo from '@/components/PrimeButtonDemo.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="p-6 space-y-4">
|
||||
<section>
|
||||
<h2 class="text-xl font-semibold">Welcome</h2>
|
||||
<p class="text-slate-600">This is the foundation of The SYSTEM.</p>
|
||||
</section>
|
||||
<PrimeButtonDemo />
|
||||
</main>
|
||||
</template>
|
||||
Reference in New Issue
Block a user