Refactor account settings to use Markdown and Liquid templates
Converted `account.html` to `account.md` with Liquid includes for enhanced modularity and maintainability. This improves content separation from layout and facilitates easier updates and customization.
This commit is contained in:
1 parent
48a52a78d9
commit
1a69f0fb20
3 files changed
+134
-189
No files matched your search
@@ -0,0 +1,114 @@
|
|||||||
|
<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" cellpadding="5">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="bg-rules-bg p-4 rounded mb-4 text-primary text-sm">
|
||||||
|
<p>
|
||||||
|
Please provide a valid email address. This ensures we can assist you with password recovery if needed. Rest assured, your email address remains confidential between you and us, invisible to web crawlers and other users.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table class="w-full min-w-[300px] table-auto" border="0">
|
||||||
|
<tbody>
|
||||||
|
<tr class="athing">
|
||||||
|
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">user:</td>
|
||||||
|
<td timestamp="1745816813"><a href="user?id={{ page.username }}" class="hnuser">
|
||||||
|
<font class="text-primary text-sm">{{ page.username }}</font>
|
||||||
|
</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">created:</td>
|
||||||
|
<td><a href="#" class="text-primary text-sm">{{ page.created }}</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">merit:</td>
|
||||||
|
<td class="text-primary text-sm">{{ page.merit }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">about:</td>
|
||||||
|
<td style="overflow:hidden">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<textarea name="about" 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">{{ page.about }}</textarea>
|
||||||
|
<a href="formatdoc" tabindex="-1">
|
||||||
|
<font size="-2" class="ml-2 text-xs text-primary hover:underline">help</font>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-2"></td>
|
||||||
|
<td>
|
||||||
|
<font size="2" class="text-primary text-sm">Only admins see your email below. To share publicly, add to the 'about' box.</font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">email:</td>
|
||||||
|
<td><input type="text" name="email" value="{{ page.email }}" 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">showdead:</td>
|
||||||
|
<td><select name="showd" class="text-primary text-sm px-3 py-1 border border-gray-300 rounded">
|
||||||
|
<option {% if page.showdead == "yes" %}selected="t"{% endif %}>yes</option>
|
||||||
|
<option {% if page.showdead == "no" %}selected="t"{% endif %}>no</option>
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">noprocrast:</td>
|
||||||
|
<td><select name="nopro" class="text-primary text-sm px-3 py-1 border border-gray-300 rounded">
|
||||||
|
<option {% if page.noprocrast == "yes" %}selected="t"{% endif %}>yes</option>
|
||||||
|
<option {% if page.noprocrast == "no" %}selected="t"{% endif %}>no</option>
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">maxvisit:</td>
|
||||||
|
<td><input type="number" name="maxv" value="{{ page.maxvisit }}" class="w-20 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">minaway:</td>
|
||||||
|
<td><input type="number" name="mina" value="{{ page.minaway }}" class="w-20 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">delay:</td>
|
||||||
|
<td><input type="number" name="delay" value="{{ page.delay }}" class="w-20 text-primary text-sm px-3 py-1 border border-gray-300 rounded"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-2 w-24 sm:w-32"></td>
|
||||||
|
<td><a href="{{ page.change_password_uri }}" class="text-primary text-sm hover:underline">change password</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-2 w-24 sm:w-32"></td>
|
||||||
|
<td><a href="{{ page.submissions_uri }}" class="text-primary text-sm hover:underline">submissions</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-2 w-24 sm:w-32"></td>
|
||||||
|
<td><a href="{{ page.comments_uri }}" class="text-primary text-sm hover:underline">comments</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="py-2 w-24 sm:w-32"></td>
|
||||||
|
<td class="text-sm">
|
||||||
|
<a href="{{ page.favorites_uri }}" class="text-primary hover:underline">favorite submissions</a> /
|
||||||
|
<a href="{{ page.favorites_uri }}&comments=t" class="text-primary hover:underline">comments</a>
|
||||||
|
<i class="text-sm"> (publicly visible)</i>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="mt-4">
|
||||||
|
<button type="submit" class="px-2 py-1 bg-primary text-white rounded hover:bg-primary-dark">update</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
-189
@@ -1,189 +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>Account Settings - 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="/">
|
|
||||||
Behind the Desk
|
|
||||||
</a>
|
|
||||||
<div class="hidden md:flex">
|
|
||||||
<a class="py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary font-semibold" href="#">top 🔥</a>
|
|
||||||
<a class="py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">new</a>
|
|
||||||
<a class="py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">nearby</a>
|
|
||||||
<a class="py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">past</a>
|
|
||||||
<a class="py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">ask</a>
|
|
||||||
<a class="py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">show</a>
|
|
||||||
<a class="py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary" href="#">submit</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-center">
|
|
||||||
<div class="py-2 px-3">
|
|
||||||
<a href="/login.html" class="text-primary hover:bg-opacity-5 hover:bg-primary">login</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Mobile menu button -->
|
|
||||||
<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>
|
|
||||||
<!-- Mobile Menu -->
|
|
||||||
<div id="mobileMenu" class="hidden md:hidden">
|
|
||||||
<a class="block py-2 px-3 text-primary hover:bg-opacity-5 hover:bg-primary font-semibold" 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>
|
|
||||||
</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" cellpadding="5">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div class="bg-rules-bg p-4 rounded mb-4 text-primary text-sm">
|
|
||||||
<p>
|
|
||||||
Please provide a valid email address. This ensures we can assist you with password recovery if needed. Rest assured, your email address remains confidential between you and us, invisible to web crawlers and other users.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<table class="w-full min-w-[300px] table-auto" border="0">
|
|
||||||
<tbody>
|
|
||||||
<tr class="athing">
|
|
||||||
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">user:</td>
|
|
||||||
<td timestamp="1745816813"><a href="user?id=kerbymart" class="hnuser">
|
|
||||||
<font class="text-primary text-sm">kerbymart</font>
|
|
||||||
</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">created:</td>
|
|
||||||
<td><a href="#" class="text-primary text-sm">59 minutes ago</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">merit:</td>
|
|
||||||
<td class="text-primary text-sm">1</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">about:</td>
|
|
||||||
<td style="overflow:hidden">
|
|
||||||
<div class="flex items-center">
|
|
||||||
<textarea name="about" 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>
|
|
||||||
<a href="formatdoc" tabindex="-1">
|
|
||||||
<font size="-2" class="ml-2 text-xs text-primary hover:underline">help</font>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-2"></td>
|
|
||||||
<td>
|
|
||||||
<font size="2" class="text-primary text-sm">Only admins see your email below. To share publicly, add to the 'about' box.</font>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">email:</td>
|
|
||||||
<td><input type="text" name="email" 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">showdead:</td>
|
|
||||||
<td><select name="showd" class="text-primary text-sm px-3 py-1 border border-gray-300 rounded">
|
|
||||||
<option>yes</option>
|
|
||||||
<option selected="t">no</option>
|
|
||||||
</select></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">noprocrast:</td>
|
|
||||||
<td><select name="nopro" class="text-primary text-sm px-3 py-1 border border-gray-300 rounded">
|
|
||||||
<option>yes</option>
|
|
||||||
<option selected="t">no</option>
|
|
||||||
</select></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 align-top w-24 sm:w-32 text-primary text-sm font-medium">maxvisit:</td>
|
|
||||||
<td><input type="number" name="maxv" value="20" class="w-20 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">minaway:</td>
|
|
||||||
<td><input type="number" name="mina" value="180" class="w-20 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">delay:</td>
|
|
||||||
<td><input type="number" name="delay" value="0" class="w-20 text-primary text-sm px-3 py-1 border border-gray-300 rounded"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 w-24 sm:w-32"></td>
|
|
||||||
<td><a href="changepw" class="text-primary text-sm hover:underline">change password</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 w-24 sm:w-32"></td>
|
|
||||||
<td><a href="submitted?id=kerbymart" class="text-primary text-sm hover:underline">submissions</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 w-24 sm:w-32"></td>
|
|
||||||
<td><a href="threads?id=kerbymart" class="text-primary text-sm hover:underline">comments</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="py-2 w-24 sm:w-32"></td>
|
|
||||||
<td class="text-sm">
|
|
||||||
<a href="favorites?id=kerbymart" class="text-primary hover:underline">favorite submissions</a> /
|
|
||||||
<a href="favorites?id=kerbymart&comments=t" class="text-primary hover:underline">comments</a>
|
|
||||||
<i class="text-sm"> (publicly visible)</i>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div class="mt-4">
|
|
||||||
<button type="submit" class="px-2 py-1 bg-primary text-white rounded hover:bg-primary-dark">update</button>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<!-- 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);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
layout: simple
|
||||||
|
title: Account Settings
|
||||||
|
permalink: /account/
|
||||||
|
username: kerbymart
|
||||||
|
created: 59 minutes ago
|
||||||
|
merit: 1
|
||||||
|
about:
|
||||||
|
email:
|
||||||
|
showdead: no
|
||||||
|
noprocrast: no
|
||||||
|
maxvisit: 20
|
||||||
|
minaway: 180
|
||||||
|
delay: 0
|
||||||
|
change_password_uri: /changepw
|
||||||
|
submissions_uri: /submitted?id=kerbymart
|
||||||
|
comments_uri: /threads?id=kerbymart
|
||||||
|
favorites_uri: /favorites?id=kerbymart
|
||||||
|
---
|
||||||
|
{% include account_settings.liquid %}
|
||||||
Reference in new issue
Block a user