devaanand commited on
Commit
c53fa39
·
1 Parent(s): 6a6c7cf

style: enhance topbar consistency and responsiveness across guide and product pages

Browse files
Files changed (2) hide show
  1. backend/app/guide.html +33 -15
  2. backend/app/product.html +23 -14
backend/app/guide.html CHANGED
@@ -23,24 +23,33 @@
23
  margin: 0; background: var(--bg); color: var(--fg);
24
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
25
  }
26
- /* Shared top bar: same ink-and-teal brand as the app, links back to it. */
 
 
27
  .topbar {
28
- background: var(--brand); color: #fff;
29
- padding: 12px 1.25rem;
30
- display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
 
 
31
  }
32
- .topbar .brand {
33
- color: #fff; font-weight: 650; font-size: 1.02rem;
34
- text-decoration: none; letter-spacing: .2px; white-space: nowrap;
35
- }
36
- .topbar .brand { display: inline-flex; align-items: center; gap: .6rem; }
37
- .brand-logo { height: 26px; width: auto; display: block; }
38
- .topbar .lab { color: rgba(255,255,255,.6); font-size: .82rem; }
39
  .topbar .brand:hover { opacity: .88; }
40
- .topbar nav { margin-left: auto; display: flex; gap: 1.1rem; flex-wrap: wrap; }
41
- .topbar nav a { color: rgba(255,255,255,.82); text-decoration: none; font-size: .88rem; }
 
 
 
 
42
  .topbar nav a:hover { color: #fff; text-decoration: underline; }
43
  .topbar nav a.current { color: #fff; font-weight: 600; }
 
 
 
 
 
 
44
  main { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
45
  h1 { font-size: 1.7rem; margin: 0 0 .25rem; }
46
  h2 { font-size: 1.25rem; margin: 2.2rem 0 .6rem; padding-top: .6rem; border-top: 1px solid var(--border); }
@@ -113,10 +122,10 @@
113
  </svg></a>
114
  <span class="lab">Psychological Text Analysis with Contextualized Construct Representation</span>
115
  <nav>
116
- <a href="/">Dashboard</a>
117
  <a href="/welcome">About</a>
118
  <a href="/guide" class="current">Guide</a>
119
- <a href="/product">How it works</a>
 
120
  </nav>
121
  </header>
122
  <main>
@@ -433,5 +442,14 @@ and what you saw; screenshots help. DMs to Deva work too, and email as a fallbac
433
  });
434
  })();
435
  </script>
 
 
 
 
 
 
 
 
 
436
  </body>
437
  </html>
 
23
  margin: 0; background: var(--bg); color: var(--fg);
24
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
25
  }
26
+ /* Topbar mirrors the app header EXACTLY (gradient, height, logo size,
27
+ tagline, link styles) so navigating app <-> docs doesn't jump. Update
28
+ styles.css .header alongside any change here. */
29
  .topbar {
30
+ background: linear-gradient(180deg, #1b1b1c, var(--brand)); color: #fff;
31
+ padding: 14px 28px;
32
+ display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
33
+ position: sticky; top: 0; z-index: 30;
34
+ border-bottom: 1px solid rgba(255,255,255,.07);
35
  }
36
+ .topbar .brand { display: inline-flex; align-items: center; text-decoration: none; }
37
+ .brand-logo { height: 28px; width: auto; display: block; }
 
 
 
 
 
38
  .topbar .brand:hover { opacity: .88; }
39
+ .topbar .lab {
40
+ flex: 1 1 280px; min-width: 0; font-size: 12.5px; line-height: 1.5;
41
+ color: #fff; opacity: .85;
42
+ }
43
+ .topbar nav { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
44
+ .topbar nav a { color: rgba(255,255,255,.82); text-decoration: none; font-size: 13px; }
45
  .topbar nav a:hover { color: #fff; text-decoration: underline; }
46
  .topbar nav a.current { color: #fff; font-weight: 600; }
47
+ .topbar .topbar-btn {
48
+ background: rgba(255,255,255,.12); color: #fff;
49
+ border: 1px solid rgba(255,255,255,.45);
50
+ padding: 5px 14px; border-radius: 9px; font-size: 13px; text-decoration: none;
51
+ }
52
+ .topbar .topbar-btn:hover { background: rgba(255,255,255,.22); text-decoration: none; }
53
  main { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
54
  h1 { font-size: 1.7rem; margin: 0 0 .25rem; }
55
  h2 { font-size: 1.25rem; margin: 2.2rem 0 .6rem; padding-top: .6rem; border-top: 1px solid var(--border); }
 
122
  </svg></a>
123
  <span class="lab">Psychological Text Analysis with Contextualized Construct Representation</span>
124
  <nav>
 
125
  <a href="/welcome">About</a>
126
  <a href="/guide" class="current">Guide</a>
127
+ <a href="/product" id="nav-product" hidden>How it works</a>
128
+ <a class="topbar-btn" href="/">Open dashboard</a>
129
  </nav>
130
  </header>
131
  <main>
 
442
  });
443
  })();
444
  </script>
445
+ <script>
446
+ // Mirror the app header: the internal "How it works" link only shows for
447
+ // lab members and above (the server gates /product regardless).
448
+ fetch("/api/auth/me").then((r) => r.json()).then((me) => {
449
+ if (["lab", "maintainer", "pi"].includes(me.role)) {
450
+ document.getElementById("nav-product").hidden = false;
451
+ }
452
+ }).catch(() => {});
453
+ </script>
454
  </body>
455
  </html>
backend/app/product.html CHANGED
@@ -23,24 +23,33 @@
23
  margin: 0; background: var(--bg); color: var(--fg);
24
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
25
  }
26
- /* Shared top bar: same ink-and-teal brand as the app, links back to it. */
 
 
27
  .topbar {
28
- background: var(--brand); color: #fff;
29
- padding: 12px 1.25rem;
30
- display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
 
 
31
  }
32
- .topbar .brand {
33
- color: #fff; font-weight: 650; font-size: 1.02rem;
34
- text-decoration: none; letter-spacing: .2px; white-space: nowrap;
35
- }
36
- .topbar .brand { display: inline-flex; align-items: center; gap: .6rem; }
37
- .brand-logo { height: 26px; width: auto; display: block; }
38
- .topbar .lab { color: rgba(255,255,255,.6); font-size: .82rem; }
39
  .topbar .brand:hover { opacity: .88; }
40
- .topbar nav { margin-left: auto; display: flex; gap: 1.1rem; flex-wrap: wrap; }
41
- .topbar nav a { color: rgba(255,255,255,.82); text-decoration: none; font-size: .88rem; }
 
 
 
 
42
  .topbar nav a:hover { color: #fff; text-decoration: underline; }
43
  .topbar nav a.current { color: #fff; font-weight: 600; }
 
 
 
 
 
 
44
  main { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
45
  h1 { font-size: 1.7rem; margin: 0 0 .25rem; }
46
  h2 { font-size: 1.25rem; margin: 2.2rem 0 .6rem; padding-top: .6rem; border-top: 1px solid var(--border); }
@@ -112,10 +121,10 @@
112
  </svg></a>
113
  <span class="lab">Psychological Text Analysis with Contextualized Construct Representation</span>
114
  <nav>
115
- <a href="/">Dashboard</a>
116
  <a href="/welcome">About</a>
117
  <a href="/guide">Guide</a>
118
  <a href="/product" class="current">How it works</a>
 
119
  </nav>
120
  </header>
121
  <main>
 
23
  margin: 0; background: var(--bg); color: var(--fg);
24
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
25
  }
26
+ /* Topbar mirrors the app header EXACTLY (gradient, height, logo size,
27
+ tagline, link styles) so navigating app <-> docs doesn't jump. Update
28
+ styles.css .header alongside any change here. */
29
  .topbar {
30
+ background: linear-gradient(180deg, #1b1b1c, var(--brand)); color: #fff;
31
+ padding: 14px 28px;
32
+ display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
33
+ position: sticky; top: 0; z-index: 30;
34
+ border-bottom: 1px solid rgba(255,255,255,.07);
35
  }
36
+ .topbar .brand { display: inline-flex; align-items: center; text-decoration: none; }
37
+ .brand-logo { height: 28px; width: auto; display: block; }
 
 
 
 
 
38
  .topbar .brand:hover { opacity: .88; }
39
+ .topbar .lab {
40
+ flex: 1 1 280px; min-width: 0; font-size: 12.5px; line-height: 1.5;
41
+ color: #fff; opacity: .85;
42
+ }
43
+ .topbar nav { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
44
+ .topbar nav a { color: rgba(255,255,255,.82); text-decoration: none; font-size: 13px; }
45
  .topbar nav a:hover { color: #fff; text-decoration: underline; }
46
  .topbar nav a.current { color: #fff; font-weight: 600; }
47
+ .topbar .topbar-btn {
48
+ background: rgba(255,255,255,.12); color: #fff;
49
+ border: 1px solid rgba(255,255,255,.45);
50
+ padding: 5px 14px; border-radius: 9px; font-size: 13px; text-decoration: none;
51
+ }
52
+ .topbar .topbar-btn:hover { background: rgba(255,255,255,.22); text-decoration: none; }
53
  main { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
54
  h1 { font-size: 1.7rem; margin: 0 0 .25rem; }
55
  h2 { font-size: 1.25rem; margin: 2.2rem 0 .6rem; padding-top: .6rem; border-top: 1px solid var(--border); }
 
121
  </svg></a>
122
  <span class="lab">Psychological Text Analysis with Contextualized Construct Representation</span>
123
  <nav>
 
124
  <a href="/welcome">About</a>
125
  <a href="/guide">Guide</a>
126
  <a href="/product" class="current">How it works</a>
127
+ <a class="topbar-btn" href="/">Open dashboard</a>
128
  </nav>
129
  </header>
130
  <main>