feat: add submit page with navbar, form, and category dropdown
This commit is contained in:
1 parent
08ed93753b
commit
103a0ce3b2
1 file changed
+157
+157
@@ -0,0 +1,157 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link rel="stylesheet" href="node_modules/bulma/css/bulma.min.css">
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
<title>Submit - Behind the Desk</title>
|
||||||
|
<style>
|
||||||
|
/* Add specific styles for submit page if needed */
|
||||||
|
.submit-container {
|
||||||
|
max-width: 450px; /* Increased width for longer fields */
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
.submit-container h2 {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
color: #38315f; /* Updated text color */
|
||||||
|
}
|
||||||
|
.submit-container .field {
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
}
|
||||||
|
.submit-container .label {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
font-weight: normal;
|
||||||
|
color: #38315f; /* Updated text color */
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
|
display: inline-block; /* HN style labels */
|
||||||
|
width: 100px; /* Align inputs */
|
||||||
|
}
|
||||||
|
.submit-container .input {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
max-width: 250px; /* Increased max-width for longer fields */
|
||||||
|
display: inline-block; /* Align with label */
|
||||||
|
width: calc(100% - 110px); /* Adjust width */
|
||||||
|
background-color: #ffffff; /* Ensure white background */
|
||||||
|
color: #363636; /* Default input text color */
|
||||||
|
border: 1px solid #dbdbdb; /* Standard Bulma border */
|
||||||
|
}
|
||||||
|
.submit-container .input:focus {
|
||||||
|
border-color: #38315f; /* Highlight focus */
|
||||||
|
box-shadow: 0 0 0 0.125em rgba(56, 49, 95, 0.25);
|
||||||
|
}
|
||||||
|
.submit-container .button.is-primary { /* Target the specific button */
|
||||||
|
font-size: 0.9rem;
|
||||||
|
margin-left: 100px; /* Align button with inputs */
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
background-color: #38315f; /* Updated button color */
|
||||||
|
color: #ffffff; /* White text for contrast */
|
||||||
|
border-color: transparent; /* Remove default border */
|
||||||
|
}
|
||||||
|
.submit-container .button.is-primary:hover {
|
||||||
|
background-color: #2d274a; /* Slightly darker on hover */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="navbar is-fixed-top" role="navigation" aria-label="main navigation">
|
||||||
|
<div class="container">
|
||||||
|
<div class="navbar-brand">
|
||||||
|
<a class="navbar-item has-text-weight-bold" href="/">
|
||||||
|
Behind the Desk
|
||||||
|
</a>
|
||||||
|
<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 class="navbar-item" href="#">
|
||||||
|
new
|
||||||
|
</a>
|
||||||
|
<a class="navbar-item" href="#">
|
||||||
|
nearby
|
||||||
|
</a>
|
||||||
|
<a class="navbar-item" href="#">
|
||||||
|
past
|
||||||
|
</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>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main class="section main-content">
|
||||||
|
<div class="container submit-container">
|
||||||
|
<h2>Submit a Post</h2>
|
||||||
|
<form>
|
||||||
|
<div class="field">
|
||||||
|
<label class="label" for="submit-title">Title:</label>
|
||||||
|
<div class="control">
|
||||||
|
<input class="input" type="text" id="submit-title" name="title" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label class="label" for="submit-body">Body:</label>
|
||||||
|
<div class="control">
|
||||||
|
<textarea class="textarea" id="submit-body" name="body" required></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label class="label" for="submit-category">Category:</label>
|
||||||
|
<div class="control">
|
||||||
|
<div class="select">
|
||||||
|
<select id="submit-category" name="category" required>
|
||||||
|
<option value="ask">Ask</option>
|
||||||
|
<option value="show">Show</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="control">
|
||||||
|
<button class="button is-primary" type="submit">Submit</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- Simple script to toggle mobile menu -->
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
|
||||||
|
if ($navbarBurgers.length > 0) {
|
||||||
|
$navbarBurgers.forEach( el => {
|
||||||
|
el.addEventListener('click', () => {
|
||||||
|
const target = el.dataset.target;
|
||||||
|
const $target = document.getElementById(target);
|
||||||
|
el.classList.toggle('is-active');
|
||||||
|
$target.classList.toggle('is-active');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in new issue
Block a user