Added submit page layout and front matter

This commit is contained in:
Your Name committed 2025-04-28 16:48:54 +00:00
1 parent b7f94ed0f0
commit 7cd127a8a3
8 files changed
+186 -192

No files matched your search

+57
View File
@@ -0,0 +1,57 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ page.title }}</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
// Main brand colors from the CSS
primary: '#38315f', // Purple color used for text and accents
'primary-dark': '#2d274a', // Darker version for hover states
'navbar-bg': '#e5fa70', // Navbar background
'navbar-border': '#cddb60', // Navbar border
'bg-light': '#f8f9fa', // Light background
'bg-footer': '#f5f5f5', // Footer background
'text-default': '#343a40', // Default text color
'text-muted': '#6c757d', // Muted/secondary text
'text-title': '#212529', // Post title color
'link-hover': '#ff6600', // Orange hover color for upvote arrows
'rules-bg': '#eef6f6', // Rules box background
'border-light': '#dee2e6', // Light borders
},
fontFamily: {
sans: [
'-apple-system',
'BlinkMacSystemFont',
'"Segoe UI"',
'Roboto',
'Helvetica',
'Arial',
'sans-serif',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"'
],
},
fontSize: {
'xs': '0.75rem', // Very small text (like "reply")
'sm': '0.875rem', // Small text (like meta info)
'base': '1rem', // Base text size (like post titles)
'lg': '1.125rem', // Section headers
},
spacing: {
'navbar-height': '2.5rem', // Height of the navbar
},
boxShadow: {
'card': '0 15px 30px rgba(0, 0, 0, 0.08)',
}
},
},
plugins: [],
}
</script>
<link rel="stylesheet" href="/assets/css/tailwind.min.css">
</head>
+58
View File
@@ -45,3 +45,61 @@
</div> </div>
</div> </div>
</nav> </nav>
<!-- Script to toggle mobile menu -->
<script>
document.addEventListener('DOMContentLoaded', () => {
const menuButton = document.getElementById('menuButton');
const mobileMenu = document.getElementById('mobileMenu');
if (menuButton && mobileMenu) {
menuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
const expanded = menuButton.getAttribute('aria-expanded') === 'true';
menuButton.setAttribute('aria-expanded', !expanded);
});
}
const nearbyLink = document.getElementById('nearby-link');
const pastLink = document.getElementById('past-link');
const mobileNearbyLink = document.getElementById('mobile-nearby-link');
const mobilePastLink = document.getElementById('mobile-past-link');
const filterContainer = document.getElementById('filter-container');
const dateDisplay = document.getElementById('date-display');
const filterSection = document.getElementById('filter-section');
const filterText = document.getElementById('filter-text');
const showFilter = (type) => {
filterContainer.classList.remove('hidden');
if (type === 'nearby') {
dateDisplay.classList.add('hidden');
filterSection.classList.remove('hidden');
filterText.innerHTML = 'Filter by distance: <a href="#" class="text-primary hover:underline">1 mile</a>, <a href="#" class="text-primary hover:underline">3 miles</a>, <a href="#" class="text-primary hover:underline">10 miles</a>. Go forward a <a href="#" class="text-primary hover:underline">20 miles</a>.';
} else if (type === 'past') {
dateDisplay.classList.remove('hidden');
filterSection.classList.remove('hidden');
filterText.innerHTML = 'Go back a <a href="#" class="text-primary hover:underline">day</a>, <a href="#" class="text-primary hover:underline">month</a>, or <a href="#" class="text-primary hover:underline">year</a>. Go forward a <a href="#" class="text-primary hover:underline">day</a>.';
}
};
nearbyLink.addEventListener('click', (e) => {
e.preventDefault();
showFilter('nearby');
});
pastLink.addEventListener('click', (e) => {
e.preventDefault();
showFilter('past');
});
mobileNearbyLink.addEventListener('click', (e) => {
e.preventDefault();
showFilter('nearby');
});
mobilePastLink.addEventListener('click', (e) => {
e.preventDefault();
showFilter('past');
});
});
</script>
+11
View File
@@ -0,0 +1,11 @@
<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="max-w-screen-lg mx-auto px-4">
<div class="flex justify-between">
<div class="flex">
<a class="py-2 px-3 font-bold text-primary" href="/">
{{ page.title }}
</a>
</div>
</div>
</div>
</nav>
+37
View File
@@ -0,0 +1,37 @@
<form class="space-y-4">
<div class="w-full overflow-x-auto">
<table class="w-full" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<table class="w-full min-w-[300px] table-auto" border="0">
<tbody>
<tr>
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Title:</td>
<td><input type="text" name="title" class="w-full max-w-full sm:w-[350px] md:w-[450px] text-primary text-sm px-3 py-1 border border-gray-300 rounded"></td>
</tr>
<tr>
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Body:</td>
<td><textarea name="body" rows="5" class="w-full max-w-full sm:w-[350px] md:w-[450px] text-primary text-sm px-3 py-1 border border-gray-300 rounded"></textarea></td>
</tr>
<tr>
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Category:</td>
<td>
<select name="category" class="w-full max-w-full sm:w-[350px] md:w-[450px] text-primary text-sm px-3 py-1 border border-gray-300 rounded">
<option value="ask">Ask</option>
<option value="show">Show</option>
</select>
</td>
</tr>
<tr>
<td class="py-2 w-24 sm:w-32"></td>
<td><button type="submit" class="px-2 py-1 bg-primary text-white rounded hover:bg-primary-dark">Submit</button></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</form>
+2 -113
View File
@@ -1,61 +1,7 @@
<!doctype html> <!doctype html>
<html lang="en" class="bg-bg-light"> <html lang="en" class="bg-bg-light">
<head> {% include head.html %}
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ page.title }}</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
// Main brand colors from the CSS
primary: '#38315f', // Purple color used for text and accents
'primary-dark': '#2d274a', // Darker version for hover states
'navbar-bg': '#e5fa70', // Navbar background
'navbar-border': '#cddb60', // Navbar border
'bg-light': '#f8f9fa', // Light background
'bg-footer': '#f5f5f5', // Footer background
'text-default': '#343a40', // Default text color
'text-muted': '#6c757d', // Muted/secondary text
'text-title': '#212529', // Post title color
'link-hover': '#ff6600', // Orange hover color for upvote arrows
'rules-bg': '#eef6f6', // Rules box background
'border-light': '#dee2e6', // Light borders
},
fontFamily: {
sans: [
'-apple-system',
'BlinkMacSystemFont',
'"Segoe UI"',
'Roboto',
'Helvetica',
'Arial',
'sans-serif',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"'
],
},
fontSize: {
'xs': '0.75rem', // Very small text (like "reply")
'sm': '0.875rem', // Small text (like meta info)
'base': '1rem', // Base text size (like post titles)
'lg': '1.125rem', // Section headers
},
spacing: {
'navbar-height': '2.5rem', // Height of the navbar
},
boxShadow: {
'card': '0 15px 30px rgba(0, 0, 0, 0.08)',
}
},
},
plugins: [],
}
</script>
<link rel="stylesheet" href="/assets/css/tailwind.min.css"> </head>
<body class="font-sans text-text-default pt-navbar-height"> <body class="font-sans text-text-default pt-navbar-height">
{% include navbar.html %} {% include navbar.html %}
@@ -67,62 +13,5 @@
{% include footer.html %} {% include footer.html %}
<!-- Script to toggle mobile menu -->
<script>
document.addEventListener('DOMContentLoaded', () => {
const menuButton = document.getElementById('menuButton');
const mobileMenu = document.getElementById('mobileMenu');
if (menuButton && mobileMenu) {
menuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
const expanded = menuButton.getAttribute('aria-expanded') === 'true';
menuButton.setAttribute('aria-expanded', !expanded);
});
}
const nearbyLink = document.getElementById('nearby-link');
const pastLink = document.getElementById('past-link');
const mobileNearbyLink = document.getElementById('mobile-nearby-link');
const mobilePastLink = document.getElementById('mobile-past-link');
const filterContainer = document.getElementById('filter-container');
const dateDisplay = document.getElementById('date-display');
const filterSection = document.getElementById('filter-section');
const filterText = document.getElementById('filter-text');
const showFilter = (type) => {
filterContainer.classList.remove('hidden');
if (type === 'nearby') {
dateDisplay.classList.add('hidden');
filterSection.classList.remove('hidden');
filterText.innerHTML = 'Filter by distance: <a href="#" class="text-primary hover:underline">1 mile</a>, <a href="#" class="text-primary hover:underline">3 miles</a>, <a href="#" class="text-primary hover:underline">10 miles</a>. Go forward a <a href="#" class="text-primary hover:underline">20 miles</a>.';
} else if (type === 'past') {
dateDisplay.classList.remove('hidden');
filterSection.classList.remove('hidden');
filterText.innerHTML = 'Go back a <a href="#" class="text-primary hover:underline">day</a>, <a href="#" class="text-primary hover:underline">month</a>, or <a href="#" class="text-primary hover:underline">year</a>. Go forward a <a href="#" class="text-primary hover:underline">day</a>.';
}
};
nearbyLink.addEventListener('click', (e) => {
e.preventDefault();
showFilter('nearby');
});
pastLink.addEventListener('click', (e) => {
e.preventDefault();
showFilter('past');
});
mobileNearbyLink.addEventListener('click', (e) => {
e.preventDefault();
showFilter('nearby');
});
mobilePastLink.addEventListener('click', (e) => {
e.preventDefault();
showFilter('past');
});
});
</script>
</body> </body>
</html> </html>
+15
View File
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en" class="bg-bg-light">
{% include head.html %}
<body class="font-sans text-text-default pt-navbar-height">
{% include simple-navbar.html %}
<main class="max-w-screen-lg mx-auto py-4 pb-16 bg-bg-footer">
<div class="px-4 mt-4">
{{ content }}
</div>
</main>
</body>
</html>
+6
View File
@@ -0,0 +1,6 @@
---
layout: simple
title: Submit
permalink: /submit/
---
{% include submit.html %}
-79
View File
@@ -1,79 +0,0 @@
<!doctype html>
<html lang="en" class="bg-bg-light">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Submit - Behind the Desk</title>
<link href="/assets/css/styles.css" rel="stylesheet">
</head>
<body class="font-sans text-text-default pt-navbar-height">
<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="max-w-screen-lg mx-auto px-4">
<div class="flex justify-between">
<div class="flex">
<a class="py-2 px-3 font-bold text-primary" href="/">
Submit
</a>
</div>
</div>
</div>
</nav>
<main class="max-w-screen-lg mx-auto py-4 pb-16 bg-bg-footer">
<div class="px-4 mt-4">
<form class="space-y-4">
<div class="w-full overflow-x-auto">
<table class="w-full" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<table class="w-full min-w-[300px] table-auto" border="0">
<tbody>
<tr>
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Title:</td>
<td><input type="text" name="title" class="w-full max-w-full sm:w-[350px] md:w-[450px] text-primary text-sm px-3 py-1 border border-gray-300 rounded"></td>
</tr>
<tr>
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Body:</td>
<td><textarea name="body" rows="5" class="w-full max-w-full sm:w-[350px] md:w-[450px] text-primary text-sm px-3 py-1 border border-gray-300 rounded"></textarea></td>
</tr>
<tr>
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">Category:</td>
<td>
<select name="category" class="w-full max-w-full sm:w-[350px] md:w-[450px] text-primary text-sm px-3 py-1 border border-gray-300 rounded">
<option value="ask">Ask</option>
<option value="show">Show</option>
</select>
</td>
</tr>
<tr>
<td class="py-2 w-24 sm:w-32"></td>
<td><button type="submit" class="px-2 py-1 bg-primary text-white rounded hover:bg-primary-dark">Submit</button></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</form>
</div>
</main>
<script>
document.addEventListener('DOMContentLoaded', () => {
const menuButton = document.getElementById('menuButton');
const mobileMenu = document.getElementById('mobileMenu');
if (menuButton && mobileMenu) {
menuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
const expanded = menuButton.getAttribute('aria-expanded') === 'true';
menuButton.setAttribute('aria-expanded', !expanded);
});
}
});
</script>
</body>
</html>