Guest User

HTML

a guest
Dec 8th, 2022
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.62 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.   <head>
  4.     <meta charset="UTF-8" />
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6.     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7.     <title>LogIn</title>
  8.     {% load static %}
  9.     <link rel="stylesheet" href="{% static 'LogIn/login.css' %}" />
  10.     <link
  11.      rel="stylesheet"
  12.      href="{% static 'General/DarkMode/darkmode.css' %}"
  13.    />
  14.     <link
  15.      rel="stylesheet"
  16.      href="{% static 'General/Particles/particles.css' %}"
  17.    />
  18.     <link rel="stylesheet" href="{% static 'General/main.css' %}" />
  19.   </head>
  20.   <body>
  21.     <!--Header Section LogIn-->
  22.     <header>
  23.       <a href="{% url 'start' %}"
  24.        ><img src="{% static 'Assets/Logo.png' %}" class="Logo" alt="Logo"
  25.      /></a>
  26.       <button id="dark_mode_button" onclick="showMessage()">Change</button>
  27.     </header>
  28.  
  29.     <!--LogIn Section (Main Section)-->
  30.     <section class="main-login">
  31.       <div class="login-form">
  32.         <h1>Log In</h1>
  33.         <label for="username">Username</label>
  34.         <input type="text" id="username" />
  35.         <label for="password">Password</label>
  36.         <input type="password" id="password" />
  37.         <button class="login-button" onclick="login()">Log In</button>
  38.         <h4>
  39.           Don't have an account?
  40.           <a href="">Sign up</a>
  41.         </h4>
  42.         <h4><a href="">Forget Password?</a></h4>
  43.       </div>
  44.     </section>
  45.     <script src="{% static 'LogIn/login.js' %}"></script>
  46.     {% csrf_token %}
  47.     <script>
  48.       function login(){
  49.         let formData = new FormData();
  50.         let token = "{{ csrf_token }}";
  51.         var username = document.getElementById("username").value;
  52.         var password = document.getElementById("password").value;
  53.         console.log(username, password)
  54.         formData.append("username", username)
  55.         formData.append("password", password)
  56.         formData.append("csrfmiddlewaretoken", token)
  57.  
  58.         fetch("", {
  59.           method: "POST",
  60.           body: formData,
  61.         });
  62.       }
  63.     </script>
  64.  
  65.     <!--Background Stuff-->
  66.     <div class="wrapper">
  67.       <div class="content">
  68.         <p>Are you sure you want to switch on the lightmode?</p>
  69.         <div class="button">
  70.           <button class="item" onclick="switchMode()">Turn on Anyway</button>
  71.         </div>
  72.       </div>
  73.     </div>
  74.     <div id="particles-js"></div>
  75.     <script src="{% static 'General/Particles/particles.js' %}"></script>
  76.     <script src="{% static 'General/Particles/app.js' %}"></script>
  77.     <script src="{% static 'General/DarkMode/darkmode.js' %}" defer></script>
  78.   </body>
  79. </html>
  80.  
Advertisement
Add Comment
Please, Sign In to add comment