Fixed nested comment layout
This commit is contained in:
1 parent
d6c636e576
commit
906f35100e
1 file changed
+310
-175
+310
-175
@@ -1,199 +1,334 @@
|
||||
<!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>Post - Behind the Desk</title>
|
||||
<style>
|
||||
/* Add specific styles for single-post page if needed */
|
||||
.single-post-container {
|
||||
max-width: 450px; /* Increased width for longer fields */
|
||||
margin-top: 2rem;
|
||||
}
|
||||
.single-post-container h2 {
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 1rem;
|
||||
color: #38315f; /* Updated text color */
|
||||
}
|
||||
.single-post-container .field {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.single-post-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 */
|
||||
}
|
||||
.single-post-container .input,
|
||||
.single-post-container .textarea,
|
||||
.single-post-container .select select {
|
||||
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 */
|
||||
}
|
||||
.single-post-container .input:focus,
|
||||
.single-post-container .textarea:focus,
|
||||
.single-post-container .select select:focus {
|
||||
border-color: #38315f; /* Highlight focus */
|
||||
box-shadow: 0 0 0 0.125em rgba(56, 49, 95, 0.25);
|
||||
}
|
||||
.single-post-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 */
|
||||
}
|
||||
.single-post-container .button.is-primary:hover {
|
||||
background-color: #2d274a; /* Slightly darker on hover */
|
||||
}
|
||||
.single-post-container .select {
|
||||
margin-left: auto; /* Align dropdown to the right */
|
||||
}
|
||||
</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>
|
||||
<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>Post - Behind the Desk</title>
|
||||
<style>
|
||||
.single-post-container {
|
||||
max-width: 600px;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
.comment-section {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
.comment {
|
||||
margin-top: 1.5rem;
|
||||
padding-left: 0;
|
||||
font-size: 0.9rem; /* Smaller text for comments */
|
||||
}
|
||||
.nested-comment {
|
||||
margin-left: 1.5rem;
|
||||
margin-top: 1rem;
|
||||
border-left: 2px solid #ddd;
|
||||
padding-left: 1rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.comment-header small.reply {
|
||||
text-decoration: underline;
|
||||
font-size: 0.75rem;
|
||||
cursor: pointer;
|
||||
margin-left: 0.5rem;
|
||||
display: inline-block;
|
||||
}
|
||||
.comment-header a.nav-link {
|
||||
font-size: 0.75rem;
|
||||
margin-left: 0.5rem;
|
||||
text-decoration: underline;
|
||||
color: #38315f;
|
||||
}
|
||||
.comment-header a.nav-link:hover {
|
||||
color: #2d274a;
|
||||
}
|
||||
.upvote-arrow {
|
||||
font-size: 0.9rem;
|
||||
margin-right: 0.5rem;
|
||||
color: #6c757d;
|
||||
}
|
||||
.upvote-arrow:hover {
|
||||
color: #ff6600;
|
||||
}
|
||||
.reply-box {
|
||||
margin-left: 2rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
.reply-box textarea {
|
||||
margin-bottom: 0.5rem;
|
||||
background-color: #f8f9fa;
|
||||
border: 1px solid #dbdbdb;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.comments-list {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
.comment-header {
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
.comment-body p {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.button.is-primary {
|
||||
background-color: #38315f;
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
.button.is-primary:hover {
|
||||
background-color: #2d274a;
|
||||
}
|
||||
textarea.textarea {
|
||||
background-color: #f8f9fa;
|
||||
border: 1px solid #dbdbdb;
|
||||
color: #363636;
|
||||
}
|
||||
</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>
|
||||
</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>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="section main-content">
|
||||
<div class="container single-post-container">
|
||||
<article class="media">
|
||||
<div class="media-left is-align-self-flex-start pt-1">
|
||||
<a href="#" class="upvote-arrow" title="Upvote">▲</a>
|
||||
<main class="section main-content">
|
||||
<div class="container single-post-container">
|
||||
<article class="media">
|
||||
<div class="media-left">
|
||||
<a href="#" class="upvote-arrow" title="Upvote">▲</a>
|
||||
</div>
|
||||
<div class="media-content">
|
||||
<div class="content">
|
||||
<p>
|
||||
<strong><a href="#" class="post-title">The saga of the disappearing ergonomic chair continues. ✏️</a></strong>
|
||||
</p>
|
||||
<p>
|
||||
<small class="handle">@deskdetective</small> | <small class="time">1h ago</small>
|
||||
<a href="#" class="nav-link">parent</a> <a href="#" class="nav-link">next</a>
|
||||
</p>
|
||||
<p>
|
||||
Every time I leave my desk, it seems to vanish. Suspecting foul play at this point. Anyone else faced something like this?
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<div class="comment-section">
|
||||
<form>
|
||||
<div class="field">
|
||||
<label class="label" for="comment-body">Comment:</label>
|
||||
<div class="control">
|
||||
<textarea class="textarea" id="comment-body" name="body" placeholder="Enter your comment" required></textarea>
|
||||
</div>
|
||||
<div class="media-content">
|
||||
<div class="content">
|
||||
<p>
|
||||
<strong><a href="#" class="post-title">The saga of the disappearing ergonomic chair continues. <span class="update-tick">✏️</span></a></strong>
|
||||
</p>
|
||||
<p>
|
||||
<small class="handle">@deskdetective</small> | <small class="time">1h ago</small> <a href="#" class="next-action">next</a>
|
||||
</p>
|
||||
<p>
|
||||
The saga of the disappearing ergonomic chair continues. Every time I leave my desk, it seems to vanish into thin air. I've started to suspect my colleagues are playing a prank on me. Has anyone else experienced this?
|
||||
</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<button class="button is-primary" type="submit">Add Comment</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h3 class="mt-4">Comments</h3>
|
||||
|
||||
<div class="comments-list">
|
||||
<!-- Main Comment -->
|
||||
<div class="comment">
|
||||
<div class="comment-header">
|
||||
<a href="#" class="upvote-arrow">▲</a>
|
||||
<small class="handle">@commenter1</small> <small class="time">2h ago</small>
|
||||
<a href="#" class="nav-link">parent</a> <a href="#" class="nav-link">next</a>
|
||||
<small class="reply">reply</small>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<p>Haha, this totally happened to me last year. We had a phantom chair thief at work and it became an ongoing office joke for months!</p>
|
||||
</div>
|
||||
|
||||
<!-- Nested Comment -->
|
||||
<div class="nested-comment">
|
||||
<div class="comment-header">
|
||||
<a href="#" class="upvote-arrow">▲</a>
|
||||
<small class="handle">@nestedcommenter1</small> <small class="time">1h ago</small>
|
||||
<a href="#" class="nav-link">parent</a> <a href="#" class="nav-link">next</a>
|
||||
<small class="reply">reply</small>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<p>Did they ever catch who it was? 😂 I'd totally set up a hidden camera if it kept happening that much.</p>
|
||||
</div>
|
||||
|
||||
<!-- Example Reply Box -->
|
||||
<div class="reply-box">
|
||||
<textarea class="textarea" placeholder="Reply to this comment..."></textarea>
|
||||
<button class="button is-small is-primary">Reply</button>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="comment-section">
|
||||
<form>
|
||||
<div class="field">
|
||||
<label class="label" for="comment-body">Comment:</label>
|
||||
<div class="control">
|
||||
<textarea class="textarea" id="comment-body" name="body" placeholder="Enter your comment" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<button class="button is-primary" type="submit">Add Comment</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- Another Comment -->
|
||||
<div class="comment">
|
||||
<div class="comment-header">
|
||||
<a href="#" class="upvote-arrow">▲</a>
|
||||
<small class="handle">@commenter2</small> <small class="time">3h ago</small>
|
||||
<a href="#" class="nav-link">parent</a> <a href="#" class="nav-link">next</a>
|
||||
<small class="reply">reply</small>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<p>At my old job, chairs were so bad people would "borrow" a good one whenever someone went on vacation. A real survival of the fittest situation!</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Comments</h3>
|
||||
<div class="comments-list">
|
||||
<!-- Example Comment 1 -->
|
||||
<div class="comment">
|
||||
<!-- Third Comment -->
|
||||
<div class="comment">
|
||||
<div class="comment-header">
|
||||
<a href="#" class="upvote-arrow">▲</a>
|
||||
<small class="handle">@commenter3</small> <small class="time">5h ago</small>
|
||||
<a href="#" class="nav-link">parent</a> <a href="#" class="nav-link">next</a>
|
||||
<small class="reply">reply</small>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<p>I recommend putting a bright sticker with your name on the chair. Makes it harder for people to pretend they didn't know it wasn't theirs.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Main Comment -->
|
||||
<div class="comment">
|
||||
<div class="comment-header">
|
||||
<a href="#" class="upvote-arrow">▲</a>
|
||||
<small class="handle">@commenter1</small> <small class="time">2h ago</small>
|
||||
<a href="#" class="nav-link">parent</a> <a href="#" class="nav-link">next</a>
|
||||
<small class="reply">reply</small>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<p>Haha, this totally happened to me last year. It was hilarious and annoying at the same time.</p>
|
||||
</div>
|
||||
|
||||
<!-- Level 1 Nested Comment -->
|
||||
<div class="nested-comment">
|
||||
<div class="comment-header">
|
||||
<a href="#" class="upvote-arrow">▲</a>
|
||||
<small class="handle">@nested1</small> <small class="time">1h 50m ago</small>
|
||||
<a href="#" class="nav-link">parent</a> <a href="#" class="nav-link">next</a>
|
||||
<small class="reply">reply</small>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<p>Honestly, office pranks can either build great vibes or cause chaos if not handled well 😂</p>
|
||||
</div>
|
||||
|
||||
<!-- Level 2 Nested Comment -->
|
||||
<div class="nested-comment">
|
||||
<div class="comment-header">
|
||||
<small class="handle">@commenter1</small> <small class="time">2h ago</small> <small class="reply">reply</small>
|
||||
<a href="#" class="upvote-arrow">▲</a>
|
||||
<small class="handle">@nested2</small> <small class="time">1h 40m ago</small>
|
||||
<a href="#" class="nav-link">parent</a> <a href="#" class="nav-link">next</a>
|
||||
<small class="reply">reply</small>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<p>This is a comment on the post.</p>
|
||||
<p>Yeah, in our team it turned into an inside joke that lasted months. No HR complaints thankfully!</p>
|
||||
</div>
|
||||
<!-- Nested Comment 1 -->
|
||||
|
||||
<!-- Level 3 Nested Comment -->
|
||||
<div class="nested-comment">
|
||||
<div class="comment-header">
|
||||
<small class="handle">@nestedcommenter1</small> <small class="time">1h ago</small> <small class="reply">reply</small>
|
||||
<a href="#" class="upvote-arrow">▲</a>
|
||||
<small class="handle">@nested3</small> <small class="time">1h 30m ago</small>
|
||||
<a href="#" class="nav-link">parent</a> <a href="#" class="nav-link">next</a>
|
||||
<small class="reply">reply</small>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<p>This is a nested comment in response to the first comment.</p>
|
||||
<p>Ours got so bad management had to install chair locks (yes, seriously!).</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Example Comment 2 -->
|
||||
<div class="comment">
|
||||
<div class="comment-header">
|
||||
<small class="handle">@commenter2</small> <small class="time">3h ago</small> <small class="reply">reply</small>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<p>Another comment on the post.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Example Reply Box -->
|
||||
<div class="reply-box">
|
||||
<textarea class="textarea" placeholder="Reply to this comment..."></textarea>
|
||||
<button class="button is-small is-primary">Reply</button>
|
||||
</div>
|
||||
|
||||
<!-- Level 4 Nested Comment -->
|
||||
<div class="nested-comment">
|
||||
<div class="comment-header">
|
||||
<a href="#" class="upvote-arrow">▲</a>
|
||||
<small class="handle">@nested4</small> <small class="time">1h 20m ago</small>
|
||||
<a href="#" class="nav-link">parent</a> <a href="#" class="nav-link">next</a>
|
||||
<small class="reply">reply</small>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<p>😂 Chair locks?! That's next level commitment to stopping thefts.</p>
|
||||
</div>
|
||||
|
||||
<!-- Level 5 Nested Comment -->
|
||||
<div class="nested-comment">
|
||||
<div class="comment-header">
|
||||
<a href="#" class="upvote-arrow">▲</a>
|
||||
<small class="handle">@nested5</small> <small class="time">1h 10m ago</small>
|
||||
<a href="#" class="nav-link">parent</a> <a href="#" class="nav-link">next</a>
|
||||
<small class="reply">reply</small>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<p>I would LOVE to see the memo that went out announcing chair locks to employees 😆</p>
|
||||
</div>
|
||||
|
||||
<!-- Level 6 Nested Comment -->
|
||||
<div class="nested-comment">
|
||||
<div class="comment-header">
|
||||
<a href="#" class="upvote-arrow">▲</a>
|
||||
<small class="handle">@nested6</small> <small class="time">1h 5m ago</small>
|
||||
<a href="#" class="nav-link">parent</a> <a href="#" class="nav-link">next</a>
|
||||
<small class="reply">reply</small>
|
||||
</div>
|
||||
<div class="comment-body">
|
||||
<p>Imagine coming into work one day and finding your chair padlocked to the floor 😅</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- Level 5 -->
|
||||
</div> <!-- Level 4 -->
|
||||
</div> <!-- Level 3 -->
|
||||
</div> <!-- Level 2 -->
|
||||
</div> <!-- Level 1 -->
|
||||
|
||||
</div> <!-- Main Comment -->
|
||||
|
||||
</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');
|
||||
});
|
||||
});
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<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>
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user