style: replace Bulma with Tailwind CSS in login.html
This commit is contained in:
1 parent
35e847301d
commit
050b92896c
1 file changed
+101
-94
+101
-94
@@ -3,113 +3,123 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<link rel="stylesheet" href="node_modules/bulma/css/bulma.min.css">
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
<link rel="stylesheet" href="style.css">
|
<script>
|
||||||
|
tailwind.config = {
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
colors: {
|
||||||
|
'primary': '#38315f',
|
||||||
|
'primary-dark': '#2c264a',
|
||||||
|
'bg-light': '#f8f9fa',
|
||||||
|
'text-default': '#343a40',
|
||||||
|
'text-title': '#212529',
|
||||||
|
'text-muted': '#6c757d',
|
||||||
|
'border-light': '#dee2e6',
|
||||||
|
'link-hover': '#ff6600',
|
||||||
|
'rules-bg': '#eef6f6',
|
||||||
|
'navbar-bg': '#e5fa70',
|
||||||
|
'navbar-border': '#cddb60'
|
||||||
|
},
|
||||||
|
spacing: {
|
||||||
|
'navbar-height': '3.25rem'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fontFamily: {
|
||||||
|
'sans': ['-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', 'Helvetica', 'Arial', 'sans-serif', '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<title>Login / Signup - Behind the Desk</title>
|
<title>Login / Signup - Behind the Desk</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="font-sans text-text-default pt-navbar-height">
|
||||||
<nav class="navbar is-fixed-top" role="navigation" aria-label="main navigation">
|
<nav class="fixed top-0 left-0 right-0 bg-navbar-bg border-b border-navbar-border z-10" role="navigation" aria-label="main navigation">
|
||||||
<div class="container">
|
<div class="container mx-auto px-4">
|
||||||
<div class="navbar-brand">
|
<div class="flex justify-between items-center">
|
||||||
<a class="navbar-item has-text-weight-bold" href="/">
|
<div class="flex items-center">
|
||||||
Behind the Desk
|
<a class="py-4 px-3 font-bold text-primary" href="/">
|
||||||
</a>
|
Behind the Desk
|
||||||
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
|
|
||||||
<span aria-hidden="true"></span>
|
|
||||||
<span aria-hidden="true"></span>
|
|
||||||
<span aria-hidden="true"></span>
|
|
||||||
<span aria-hidden="true"></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div id="navbarBasicExample" class="navbar-menu">
|
|
||||||
<div class="navbar-start">
|
|
||||||
<a class="navbar-item" href="/">
|
|
||||||
top 🔥
|
|
||||||
</a>
|
</a>
|
||||||
<a class="navbar-item" href="#">
|
<div class="hidden md:flex">
|
||||||
new
|
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/">top 🔥</a>
|
||||||
</a>
|
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
|
||||||
<a class="navbar-item" href="#">
|
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
|
||||||
nearby
|
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
|
||||||
</a>
|
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
|
||||||
<a class="navbar-item" href="#">
|
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
|
||||||
past
|
<a class="py-4 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
|
||||||
</a>
|
|
||||||
<a class="navbar-item" href="#">
|
|
||||||
ask
|
|
||||||
</a>
|
|
||||||
<a class="navbar-item" href="#">
|
|
||||||
show
|
|
||||||
</a>
|
|
||||||
<a class="navbar-item" href="#">
|
|
||||||
submit
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="navbar-end">
|
|
||||||
<div class="navbar-item">
|
|
||||||
<a href="/login.html">login</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="py-4 px-3">
|
||||||
|
<a href="/login.html" class="text-primary hover:bg-opacity-5 hover:bg-primary">login</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="md:hidden flex items-center">
|
||||||
|
<button id="menuButton" class="text-primary p-3" aria-label="menu" aria-expanded="false">
|
||||||
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="mobileMenu" class="hidden md:hidden">
|
||||||
|
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="/">top 🔥</a>
|
||||||
|
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
|
||||||
|
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
|
||||||
|
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
|
||||||
|
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
|
||||||
|
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
|
||||||
|
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<main class="section main-content">
|
<main class="py-4 pb-16">
|
||||||
<div class="container login-container">
|
<div class="max-w-md mx-auto px-4 mt-8">
|
||||||
|
|
||||||
<!-- Login Form -->
|
<!-- Login Form -->
|
||||||
<div class="form-section">
|
<div class="mb-8">
|
||||||
<h2>Login</h2>
|
<h2 class="text-lg mb-4 text-primary">Login</h2>
|
||||||
<form action="/login" method="post">
|
<form action="/login" method="post">
|
||||||
<div class="field">
|
<div class="mb-4">
|
||||||
<label class="label" for="login-username">username:</label>
|
<label class="block text-sm font-medium mb-1" for="login-username">username:</label>
|
||||||
<div class="control" style="display: inline-block;">
|
<input class="w-full px-3 py-2 border border-gray-300 rounded" type="text" id="login-username" name="username" required>
|
||||||
<input class="input" type="text" id="login-username" name="username" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="mb-4">
|
||||||
<label class="label" for="login-password">password:</label>
|
<label class="block text-sm font-medium mb-1" for="login-password">password:</label>
|
||||||
<div class="control" style="display: inline-block;">
|
<input class="w-full px-3 py-2 border border-gray-300 rounded" type="password" id="login-password" name="password" required>
|
||||||
<input class="input" type="password" id="login-password" name="password" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="mb-4">
|
||||||
<div class="recaptcha-placeholder">[reCAPTCHA placeholder]</div>
|
<div class="recaptcha-placeholder">[reCAPTCHA placeholder]</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="mb-4">
|
||||||
<div class="control">
|
<button class="px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark" type="submit">Login</button>
|
||||||
<button class="button is-link is-small">Login</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<p style="margin-left: 100px; margin-top: 0.5rem; font-size: 0.8rem;"><a href="#">Forgot your password?</a></p>
|
<p class="text-sm text-text-muted mt-2"><a href="#" class="text-primary hover:underline">Forgot your password?</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr class="my-8">
|
||||||
|
|
||||||
<!-- Signup Form -->
|
<!-- Signup Form -->
|
||||||
<div class="form-section">
|
<div class="mb-8">
|
||||||
<h2>Create Account</h2>
|
<h2 class="text-lg mb-4 text-primary">Create Account</h2>
|
||||||
<form action="/signup" method="post">
|
<form action="/signup" method="post">
|
||||||
<div class="field">
|
<div class="mb-4">
|
||||||
<label class="label" for="signup-username">username:</label>
|
<label class="block text-sm font-medium mb-1" for="signup-username">username:</label>
|
||||||
<div class="control" style="display: inline-block;">
|
<input class="w-full px-3 py-2 border border-gray-300 rounded" type="text" id="signup-username" name="username" required>
|
||||||
<input class="input" type="text" id="signup-username" name="username" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="mb-4">
|
||||||
<label class="label" for="signup-password">password:</label>
|
<label class="block text-sm font-medium mb-1" for="signup-password">password:</label>
|
||||||
<div class="control" style="display: inline-block;">
|
<input class="w-full px-3 py-2 border border-gray-300 rounded" type="password" id="signup-password" name="password" required>
|
||||||
<input class="input" type="password" id="signup-password" name="password" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="mb-4">
|
||||||
<div class="recaptcha-placeholder">[reCAPTCHA placeholder]</div>
|
<div class="recaptcha-placeholder">[reCAPTCHA placeholder]</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="mb-4">
|
||||||
<div class="control">
|
<button class="px-4 py-2 bg-primary text-white rounded hover:bg-primary-dark" type="submit">Create Account</button>
|
||||||
<button class="button is-link is-small">Create Account</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -122,17 +132,14 @@
|
|||||||
<!-- Simple script to toggle mobile menu -->
|
<!-- Simple script to toggle mobile menu -->
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
|
const menuButton = document.getElementById('menuButton');
|
||||||
if ($navbarBurgers.length > 0) {
|
const mobileMenu = document.getElementById('mobileMenu');
|
||||||
$navbarBurgers.forEach( el => {
|
|
||||||
el.addEventListener('click', () => {
|
menuButton.addEventListener('click', () => {
|
||||||
const target = el.dataset.target;
|
mobileMenu.classList.toggle('hidden');
|
||||||
const $target = document.getElementById(target);
|
const expanded = menuButton.getAttribute('aria-expanded') === 'true';
|
||||||
el.classList.toggle('is-active');
|
menuButton.setAttribute('aria-expanded', !expanded);
|
||||||
$target.classList.toggle('is-active');
|
});
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in new issue
Block a user