login-v6.vue 3.28 KB

<script setup lang="ts">


import { VForm } from 'vuetify/components/VForm'

import authV2MaskDark from '@images/pages/mask-v2-dark.png'
import authV2MaskLight from '@images/pages/mask-v2-light.png'

import { useKeycloakStore } from "@/@core/stores/keycloakStore"

import AuthProvider from '@/views/pages/authentication/AuthProvider.vue'
import authLoginLogo from "/assets/images/naput/illust-login.png"
import authLoginBg from "/assets/images/naput/rektorat-bg.png"


const authThemeImg = authLoginLogo;

const authThemeBg = authLoginBg;

const keycloakStore = useKeycloakStore(); 
const data = ref<Record<string, any> | null>(null);
const error = ref<Record<string, any> | null>(null);

const { signIn, data: sessionData } = useAuth()

const authThemeMask = useGenerateImageVariant(authV2MaskLight, authV2MaskDark)

definePageMeta({
  layout: 'blank',
  unauthenticatedOnly: true,

})

const isPasswordVisible = ref(false)

const route = useRoute()

const ability = useAbility()

const errors = ref<Record<string, string | undefined>>({
  email: undefined,
  password: undefined,
})

const refVForm = ref<VForm>()

const credentials = ref({
  email: 'admin@demo.com',
  password: 'admin',
})

const rememberMe = ref(false)

</script>



<template>
  <div class="container">
    <div class="left"></div>
    <div class="right">
      <img src="/assets/images/naput/logo-ui-hitam.png" alt="Logo UI" class="logo" />
      <VCol
                  cols="5"
                  class="text-center"
                >
      <AuthProvider/>
      </VCol>
    </div>
  </div>
</template>


<style scoped>
.login-button {
  margin-top: 20px;
  background-color: #FFD700;
  padding: 12px 24px;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
  color: white;
}

.container {
  display: flex;
  height: 100vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}


/* Left Side */
.left {
  flex: 1;
  background: url(/assets/images/naput/rbg.png) no-repeat center center;
  background-size: cover;
}


/* Right Side */
.right {
  flex: 1;
  background-color: #FDF8E7;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 240px;
  gap: 20px; /* Menambah jarak antar elemen */
}


/* Logo */
.logo {
  width: 120px;
  margin-bottom: 20px;
}


/* Title */
h1 {
  font-size: 24px;
  color: #000;
  text-align: center;
}



.login-button:hover {
  background-color: #E6C200;
}

@media (max-width: 768px) {
  .container {
    justify-content: center;
    align-items: center;
    background: url(/assets/images/naput/rektorat-ipad-bg.png) no-repeat center center;
    background-size: cover;
  }

  .left {
    display: none;
  }

  .right {
    background-color: rgba(253, 248, 231, 0.9);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 350px;
    width: 90%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .container {
    background: url(/assets/images/naput/rektorat-iphone-bg.png) no-repeat center center;
    background-size: cover;
  }

  .right {
    padding: 30px;
    max-width: 320px;
    width: 90%;
  }

  .logo {
    width: 90px;
  }
}
</style>