update layout

This commit is contained in:
2024-11-21 16:38:40 +01:00
parent 818ed15ca0
commit 435cc3a11f
3 changed files with 116 additions and 32 deletions

View File

@@ -1,6 +1,6 @@
html {
height: 100%;
font-size: 15px;
font-size: 14px;
}
body {
@@ -21,3 +21,14 @@ a {
.layout-wrapper {
min-height: 100vh;
}
h1 {
font-size: 1.5em !important;
font-weight: bold !important;
}
h2 {
font-size: 1em !important;
font-weight: bold !important;
}

View File

@@ -11,6 +11,8 @@ import { definePreset } from '@primevue/themes';
import '@/assets/styles.scss';
import '@/assets/tailwind.css';
import Aura from '@primevue/themes/aura';
import Lara from '@primevue/themes/lara';
import Nora from '@primevue/themes/nora';
import axios from 'axios';
axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL; //'http://localhost:8082'
@@ -48,15 +50,74 @@ const app = createApp(App);
app.use(router);
app.use(auth);
const MyPreset = definePreset(Aura, {
const preset = definePreset(Nora, {
semantic: {
primary: {50: '#ecfeff', 100: '#cffafe', 200: '#a5f3fc', 300: '#67e8f9', 400: '#22d3ee', 500: '#06b6d4', 600: '#0891b2', 700: '#0e7490', 800: '#155e75', 900: '#164e63', 950: '#083344' }
primary: {
50: '{violet.50}',
100: '{violet.100}',
200: '{violet.200}',
300: '{violet.300}',
400: '{violet.400}',
500: '{violet.500}',
600: '{violet.600}',
700: '{violet.700}',
800: '{violet.800}',
900: '{violet.900}',
950: '{violet.950}'
},
colorScheme: {
light: {
surface: {
0: '#f3f3f3',
50: '{viva.50}',
100: '{viva.100}',
200: '{viva.200}',
300: '{viva.300}',
400: '{viva.400}',
500: '{viva.500}',
600: '{viva.600}',
700: '{viva.700}',
800: '{viva.800}',
900: '{viva.900}',
950: '{viva.950}'
},
formField: {
hoverBorderColor: '{primary.color}',
borderColor: '{primary.color}'
}
},
dark: {
surface: {
0: '#ffffff',
50: '{slate.50}',
100: '{slate.100}',
200: '{slate.200}',
300: '{slate.300}',
400: '{slate.400}',
500: '{slate.500}',
600: '{slate.600}',
700: '{slate.700}',
800: '{slate.800}',
900: '{slate.900}',
950: '{slate.950}'
},
formField: {
hoverBorderColor: '{primary.color}',
borderColor: '{primary.color}'
}
}
},
focusRing: {
width: '2px',
color: '{primary.color}',
offset: '1px'
}
}
});
app.use(PrimeVue, {
theme: {
preset: MyPreset,
preset: preset,
options: {
prefix: 'p',
darkModeSelector: '.app-dark'

View File

@@ -39,37 +39,33 @@ const login = () => {
<div
style="border-radius: 56px; padding: 0.3rem; background: linear-gradient(180deg, var(--primary-color) 10%, rgba(33, 150, 243, 0) 30%)">
<div class="w-full bg-surface-0 dark:bg-surface-900 py-20 px-8 sm:px-20" style="border-radius: 53px">
<div class="text-center mb-8">
<div class="logo-container">
<img :src="logoSrc" alt="Logo" class="logo-image mx-auto" />
<!--span style="font-size: 24px;" class="text-surface-600 dark:text-surface-200 font-medium">Welcome to Apollo- The Knowledge Source</span-->
<div style="text-align: center; padding: 20px;">
<span style="font-size: 36px; font-weight: bold; color: #3b7a57;">Welcome to Apollo</span><br>
<span style="font-size: 24px; color: #555;">The Knowledge Source</span>
</div>
</div>
<!--span style="font-size: 24px;" class="text-surface-600 dark:text-surface-200 font-medium">Welcome to Apollo- The Knowledge Source</span-->
<div class="text-center mb-8">
<span style="font-size: 24px; font-weight: bold; color: #a100ff;">Welcome to Apollo</span><br>
<span style="font-size: 16px; color: #555;">The Knowledge Source</span>
</div>
<div>
<label for="email1"
class="block text-surface-900 dark:text-surface-0 text-xl font-medium mb-2">Username</label>
<InputText id="email1" type="text" placeholder="Username" class="w-full md:w-[30rem] mb-8"
style="padding: 1rem; width: 100%;" v-model="username" />
<label for="email1" class="block text-surface-900 dark:text-surface-0 text-xl font-medium mb-2">Username</label>
<InputText id="email1" type="text" placeholder="Username" class="w-full md:w-[30rem] mb-8" style="padding: 1rem" v-model="username" />
<label for="password1"
class="block text-surface-900 dark:text-surface-0 font-medium text-xl mb-2">Password</label>
<Password id="password1" v-model="password" placeholder="Password" :toggleMask="true" class="w-full mb-4"
inputClass="w-full" :inputStyle="{ padding: '1rem', width: '100%' }"></Password>
<!--div class="flex items-center justify-between mb-8 gap-8">
<label for="password1" class="block text-surface-900 dark:text-surface-0 font-medium text-xl mb-2">Password</label>
<Password id="password1" v-model="password" placeholder="Password" :toggleMask="true" class="w-full mb-4" inputClass="w-full" :inputStyle="{ padding: '1rem' }"></Password>
<!--
<div class="flex items-center justify-between mb-8 gap-8">
<div class="flex items-center">
<Checkbox v-model="checked" id="rememberme1" binary class="mr-2"></Checkbox>
<label for="rememberme1">Remember me</label>
</div>
<a class="font-medium no-underline ml-2 text-right cursor-pointer"
style="color: var(--primary-color)">Forgot password?</a>
</div> -->
<Button label="Sign In" @click="login" class="w-full p-4 text-xl"></Button>
<a class="font-medium no-underline ml-2 text-right cursor-pointer" style="color: var(--primary-color)">Forgot password?</a>
</div>
-->
<Button @click="login" label="Sign In" class="w-full p-4 text-xl"></Button>
<Message v-if="visible" severity="error" :life="3000" class="mt-2 error-message">{{ error }}</Message>
</div>
</div>
</div>
@@ -79,20 +75,36 @@ const login = () => {
<style scoped>
.pi-eye {
transform: scale(1.6);
margin-right: 1rem;
transform: scale(1.6);
margin-right: 1rem;
}
.pi-eye-slash {
transform: scale(1.6);
margin-right: 1rem;
transform: scale(1.6);
margin-right: 1rem;
}
.logo-container {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
margin-top: -40px
}
.error-message {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
width: 100%; /* Ensure the message takes the full width of its container */
}
.logo-image {
border-radius: 50%;
width: 220px;
width: 100px;
/* Adjust the size as needed */
height: 220px;
height: 100px;
/* Adjust the size as needed */
object-fit: cover;
/* Ensures the logo scales nicely within the circle */