Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
flex-direction: column;
align-items: center;
gap: 18px;
padding: 0 16px 40px; /* removed the 28px top padding */
padding: 0 16px 40px;
}

/* --- Top Bar pinned to very top --- */
.topbar {
position: fixed; /* keeps it pinned even when scrolling */
position: fixed;
top: 0;
left: 0;
width: 100%;
Expand All @@ -33,7 +33,7 @@
justify-content: space-between;
padding: 10px 22px;
box-sizing: border-box;
z-index: 1000; /* ensures it stays above everything else */
z-index: 1000;
}

.logo {
Expand Down Expand Up @@ -171,7 +171,7 @@
<header class="topbar">
<div class="logo">SkillSwap</div>
<div class="actions">
<button class="link-btn">Create Post</button>
<button class="link-btn" onclick="window.location.href='manage/index.html'">Manage Posts</button>
<button class="solid-btn">Account</button>
</div>
</header>
Expand Down
94 changes: 47 additions & 47 deletions src/manage/index.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Skill Swap – Manage Posts</title>
<link href="https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="topbar">
<div class="logo" onclick="window.location.href='../index.html'">SkillSwap</div>
<button class="link-btn" onclick="window.location.href='../index.html'">Back</button>
</header>
<div class="login-overlay" id="loginOverlay">
<div class="login-box">
<h2 style="margin:0;">Login required</h2>
<div id="loginError" class="error-msg"></div>
<input id="loginUser" placeholder="Username">
<input id="loginPass" type="password" placeholder="Password">
<button id="loginBtn">Login</button>
<p class="signup-note">Don’t have an account? <a href="#" id="signupLink">Sign up</a></p>
</div>
</div>
<main>
<section class="panel">
<h3>Create Post</h3>
<input id="postTitle" placeholder="Title">
<input id="postAuthor" placeholder="Your Name">
<input id="postDesired" placeholder="Desired Skill">
<input id="postOffered" placeholder="Your Offered Skill">
<textarea id="postContact" placeholder="Contact Info (Discord, Email, Phone…)"></textarea>
<button class="btn-primary" id="createPostBtn">Create Post</button>
<p id="createStatus"></p>
</section>
<section class="panel" style="margin-top:20px;">
<h3>Your Posts</h3>
<div id="managePostsList"></div>
</section>
</main>
<script type="module" src="./handler.js"></script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Skill Swap – Manage Posts</title>
<link href="https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="topbar">
<div class="logo" onclick="window.location.href='../index.html'">SkillSwap</div>
<button class="link-btn" onclick="window.location.href='../index.html'">Back</button>
</header>

<div class="login-overlay" id="loginOverlay">
<div class="login-box">
<h2 style="margin:0;">Login required</h2>
<div id="loginError" class="error-msg"></div>
<input id="loginUser" placeholder="Username">
<input id="loginPass" type="password" placeholder="Password">
<button id="loginBtn">Login</button>
<p class="signup-note">Don’t have an account? <a href="#" id="signupLink">Sign up</a></p>
</div>
</div>

<main>
<section class="panel">
<h3>Create Post</h3>
<input id="postTitle" placeholder="Title">
<input id="postAuthor" placeholder="Your Name">
<input id="postDesired" placeholder="Desired Skill">
<input id="postOffered" placeholder="Your Offered Skill">
<textarea id="postContact" placeholder="Contact Info (Discord, Email, Phone…)"></textarea>
<button class="btn-primary" id="createPostBtn">Create Post</button>
<p id="createStatus"></p>
</section>

<section class="panel" style="margin-top:20px;">
<h3>Your Posts</h3>
<div id="managePostsList"></div>
</section>
</main>

<script type="module" src="./handler.js"></script>
</body>
</html>
52 changes: 26 additions & 26 deletions src/manage/style.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
:root{--radius:16px;--border:2px solid #222;--fg:#111;--bg:#fafafa;}
*{box-sizing:border-box;font-family:'Patrick Hand',system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;}
body{margin:0;background:var(--bg);color:var(--fg);}
.topbar{position:fixed;top:0;left:0;width:100%;border-bottom:var(--border);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:10px 22px;z-index:1000;}
.logo{font-size:1.8rem;font-weight:800;letter-spacing:.5px;cursor:pointer;}
.link-btn{background:transparent;border:none;font-weight:600;cursor:pointer;font-size:1rem;padding:4px 8px;}
main{width:min(1100px,96vw);margin:0 auto;padding:80px 0 40px;display:flex;flex-direction:column;gap:20px;}
.panel{background:#fff;border:var(--border);border-radius:var(--radius);padding:14px;}
.panel h3{margin:0 0 10px;}
.panel input,.panel textarea{width:100%;margin-bottom:8px;border:var(--border);border-radius:14px;padding:4px 8px;background:#fff;font:inherit;line-height:1.2;}
.panel textarea{resize:vertical;min-height:60px;}
::placeholder{color:#444;opacity:.85;}
.btn-primary{width:100%;background:#000;color:#fff;border:none;border-radius:14px;padding:6px 0;font-weight:700;cursor:pointer;}
.login-overlay{position:fixed;inset:0;background:rgba(250,250,250,.92);display:flex;align-items:center;justify-content:center;backdrop-filter:blur(2px);z-index:2000;}
.login-box{background:#fff;border:var(--border);border-radius:16px;width:min(340px,94vw);padding:16px;display:flex;flex-direction:column;gap:10px;}
.login-box input{border:var(--border);border-radius:10px;padding:6px 8px;}
.login-box button{background:#000;color:#fff;border:none;border-radius:10px;padding:6px 10px;font-weight:700;cursor:pointer;}
.error-msg{color:#c21;}
.signup-note{margin:2px 0 0;text-align:center;font-size:.95rem;}
.signup-note a{color:#000;text-decoration:underline;font-weight:700;cursor:pointer;}
#managePostsList{display:flex;flex-direction:column;gap:10px;margin-top:10px;}
.post-row{background:#fff;border:1px dashed #aaa;border-radius:14px;padding:8px 10px;display:flex;justify-content:space-between;align-items:center;gap:14px;}
.post-row strong{font-size:1.1rem;}
.post-row small{opacity:.75;}
.danger-btn{background:#fff;border:2px solid #b11;border-radius:10px;padding:3px 10px;cursor:pointer;font-weight:600;}
.danger-btn:hover{background:#b11;color:#fff;}
:root{--radius:16px;--border:2px solid #222;--fg:#111;--bg:#fafafa;}
*{box-sizing:border-box;font-family:'Patrick Hand',system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;}
body{margin:0;background:var(--bg);color:var(--fg);}
.topbar{position:fixed;top:0;left:0;width:100%;border-bottom:var(--border);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:10px 22px;z-index:1000;}
.logo{font-size:1.8rem;font-weight:800;letter-spacing:.5px;cursor:pointer;}
.link-btn{background:transparent;border:none;font-weight:600;cursor:pointer;font-size:1rem;padding:4px 8px;}
main{width:min(1100px,96vw);margin:0 auto;padding:80px 0 40px;display:flex;flex-direction:column;gap:20px;}
.panel{background:#fff;border:var(--border);border-radius:var(--radius);padding:14px;}
.panel h3{margin:0 0 10px;}
.panel input,.panel textarea{width:100%;margin-bottom:8px;border:var(--border);border-radius:14px;padding:4px 8px;background:#fff;font:inherit;line-height:1.2;}
.panel textarea{resize:vertical;min-height:60px;}
::placeholder{color:#444;opacity:.85;}
.btn-primary{width:100%;background:#000;color:#fff;border:none;border-radius:14px;padding:6px 0;font-weight:700;cursor:pointer;}
.login-overlay{position:fixed;inset:0;background:rgba(250,250,250,.92);display:flex;align-items:center;justify-content:center;backdrop-filter:blur(2px);z-index:2000;}
.login-box{background:#fff;border:var(--border);border-radius:16px;width:min(340px,94vw);padding:16px;display:flex;flex-direction:column;gap:10px;}
.login-box input{border:var(--border);border-radius:10px;padding:6px 8px;}
.login-box button{background:#000;color:#fff;border:none;border-radius:10px;padding:6px 10px;font-weight:700;cursor:pointer;}
.error-msg{color:#c21;}
.signup-note{margin:2px 0 0;text-align:center;font-size:.95rem;}
.signup-note a{color:#000;text-decoration:underline;font-weight:700;cursor:pointer;}
#managePostsList{display:flex;flex-direction:column;gap:10px;margin-top:10px;}
.post-row{background:#fff;border:1px dashed #aaa;border-radius:14px;padding:8px 10px;display:flex;justify-content:space-between;align-items:center;gap:14px;}
.post-row strong{font-size:1.1rem;}
.post-row small{opacity:.75;}
.danger-btn{background:#fff;border:2px solid #b11;border-radius:10px;padding:3px 10px;cursor:pointer;font-weight:600;}
.danger-btn:hover{background:#b11;color:#fff;}