Jelajahi Sumber

admin-2025-02-16 10:00:36

genlitex 3 bulan lalu
induk
melakukan
c4c3a5f375
4 mengubah file dengan 37 tambahan dan 12 penghapusan
  1. 1 0
      components.d.ts
  2. 10 10
      index.html
  3. 16 0
      src/styles.css
  4. 10 2
      src/views/LoginView.vue

+ 1 - 0
components.d.ts

@@ -8,6 +8,7 @@ export {}
 declare module 'vue' {
   export interface GlobalComponents {
     AButton: typeof import('ant-design-vue/es')['Button']
+    ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
     AForm: typeof import('ant-design-vue/es')['Form']
     AFormItem: typeof import('ant-design-vue/es')['FormItem']
     AInput: typeof import('ant-design-vue/es')['Input']

+ 10 - 10
index.html

@@ -1,12 +1,12 @@
-<!doctype html>
+<!DOCTYPE html>
 <html lang="en">
-  <head>
-    <meta charset="UTF-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>Prototype Design</title>
-  </head>
-  <body>
-    <div id="app"></div>
-    <script type="module" src="/src/main.js"></script>
-  </body>
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>Login Page</title>
+  <link rel="stylesheet" href="./styles.css">
+</head>
+<body>
+  <div id="app"></div>
+</body>
 </html>

+ 16 - 0
src/styles.css

@@ -0,0 +1,16 @@
+@keyframes gradientAnimation {
+  0% {
+    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
+  }
+  50% {
+    background: linear-gradient(135deg, #fad0c4 0%, #ff9a9e 100%);
+  }
+  100% {
+    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
+  }
+}
+
+.login {
+  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
+  animation: gradientAnimation 10s ease infinite;
+}

+ 10 - 2
src/views/LoginView.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="login">
+  <div class="login" style="background-color: #DDA0DD;">
     <a-form
       :model="formState"
       :rules="rules"
@@ -11,6 +11,9 @@
       <a-form-item label="Password" prop="password">
         <a-input-password v-model:value="formState.password" placeholder="Enter your password" />
       </a-form-item>
+      <a-form-item>
+        <a-checkbox v-model:checked="formState.rememberMe">Remember me</a-checkbox>
+      </a-form-item>
       <a-button type="primary" html-type="submit">Submit</a-button>
     </a-form>
   </div>
@@ -23,7 +26,8 @@ const router = useRouter();
 
 const formState = reactive({
   username: '',
-  password: ''
+  password: '',
+  rememberMe: false // Add rememberMe field
 });
 
 const rules = {
@@ -38,5 +42,9 @@ const rules = {
 const handleSubmit = () => {
   // Handle form submission logic here
   console.log('Form submitted:', formState);
+  // Add remember me logic here
+  if (formState.rememberMe) {
+    localStorage.setItem('rememberMe', JSON.stringify(formState));
+  }
 };
 </script>