Malina Claude Opus 4.8 commited on
Commit
10140a8
·
1 Parent(s): 5e83c93

aria: profile popup (tap header avatar → swing-in modal, animated close); peek panel routing fix note. css/js v19

Browse files
cloudflare/pages-integration/aria.html CHANGED
@@ -6,7 +6,7 @@
6
  <title>ARIA · NNL</title>
7
  <link rel="icon" href="favicon.png" />
8
  <link rel="stylesheet" href="css/styles.css" />
9
- <link rel="stylesheet" href="css/aria.css?v=18" />
10
  </head>
11
  <body class="app-body aria-page" data-theme="default">
12
 
@@ -125,8 +125,18 @@
125
  </div>
126
  </div>
127
 
 
 
 
 
 
 
 
 
 
 
128
  <div class="aria-toast" id="ariaToast" hidden></div>
129
 
130
- <script type="module" src="js/aria-chat.js?v=18"></script>
131
  </body>
132
  </html>
 
6
  <title>ARIA · NNL</title>
7
  <link rel="icon" href="favicon.png" />
8
  <link rel="stylesheet" href="css/styles.css" />
9
+ <link rel="stylesheet" href="css/aria.css?v=19" />
10
  </head>
11
  <body class="app-body aria-page" data-theme="default">
12
 
 
125
  </div>
126
  </div>
127
 
128
+ <!-- profile popup: tap ARIA's header avatar/name -->
129
+ <div class="aria-profile" id="ariaProfile" hidden>
130
+ <div class="aria-profile-card">
131
+ <button class="aria-profile-x" id="ariaProfileClose" type="button" aria-label="Zamknij">✕</button>
132
+ <span class="aria-profile-pic" aria-hidden="true"></span>
133
+ <div class="aria-profile-name">ARIA</div>
134
+ <div class="aria-profile-sub">Adaptive Response &amp; Intelligence Agent</div>
135
+ </div>
136
+ </div>
137
+
138
  <div class="aria-toast" id="ariaToast" hidden></div>
139
 
140
+ <script type="module" src="js/aria-chat.js?v=19"></script>
141
  </body>
142
  </html>
cloudflare/pages-integration/css/aria.css CHANGED
@@ -252,3 +252,35 @@ body.aria-page { position: fixed; inset: 0; width: 100%; height: 100%; display:
252
 
253
  /* ---- toast ---- */
254
  .aria-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--bg-2, #0a0a0f); border: 1px solid var(--line-strong, #ffffff29); padding: 11px 16px; border-radius: 12px; z-index: 60; max-width: 90vw; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
 
253
  /* ---- toast ---- */
254
  .aria-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--bg-2, #0a0a0f); border: 1px solid var(--line-strong, #ffffff29); padding: 11px 16px; border-radius: 12px; z-index: 60; max-width: 90vw; }
255
+
256
+ /* ---- profile popup (tap the header avatar/name) ---- */
257
+ .aria-bar .aria-id { cursor: pointer; }
258
+ .aria-profile { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px;
259
+ background: rgba(0,0,0,0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: aria-fade .2s ease; }
260
+ .aria-profile.closing { animation: aria-fade-out .25s ease forwards; }
261
+ .aria-profile-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
262
+ padding: 30px 36px 26px; border-radius: 24px; background: var(--bg-2, #0a0a0f); border: 1px solid var(--line-strong, #ffffff29);
263
+ box-shadow: 0 24px 70px rgba(0,0,0,0.6); transform-origin: top center; animation: aria-swing-in .55s cubic-bezier(.2,.75,.3,1.25); }
264
+ .aria-profile.closing .aria-profile-card { animation: aria-swing-out .25s ease forwards; }
265
+ .aria-profile-pic { width: min(62vw, 220px); height: min(62vw, 220px); border-radius: 50%;
266
+ background: url("/profile-picture-aria.png") center / cover no-repeat, var(--grad, linear-gradient(110deg,#5e9bff,#a78bfa,#22d3ee));
267
+ box-shadow: 0 10px 34px rgba(0,0,0,0.5); }
268
+ .aria-profile-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; }
269
+ .aria-profile-sub { font-size: 12px; color: var(--text-soft, #b9bcc6); text-align: center; }
270
+ .aria-profile-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0;
271
+ background: var(--surface-2, #ffffff0d); color: var(--text, #fff); font-size: 15px; cursor: pointer;
272
+ display: inline-flex; align-items: center; justify-content: center; transition: transform .15s var(--ease, ease), background .15s; }
273
+ .aria-profile-x:hover { background: var(--surface, #ffffff14); transform: rotate(90deg); }
274
+
275
+ @keyframes aria-fade { from { opacity: 0; } to { opacity: 1; } }
276
+ @keyframes aria-fade-out { from { opacity: 1; } to { opacity: 0; } }
277
+ @keyframes aria-swing-in {
278
+ 0% { opacity: 0; transform: scale(.7) rotate(-11deg); }
279
+ 55% { opacity: 1; transform: scale(1.04) rotate(7deg); }
280
+ 75% { transform: scale(.99) rotate(-3deg); }
281
+ 100% { transform: scale(1) rotate(0); }
282
+ }
283
+ @keyframes aria-swing-out {
284
+ 0% { opacity: 1; transform: scale(1) rotate(0); }
285
+ 100% { opacity: 0; transform: scale(.7) rotate(10deg); }
286
+ }
cloudflare/pages-integration/js/aria-chat.js CHANGED
@@ -90,6 +90,10 @@ function wireUi() {
90
  // tapping Send must NOT move focus off the textarea (that closes the mobile keyboard).
91
  // preventDefault on the (simulated) mousedown keeps focus; the click still submits.
92
  $("ariaSend").addEventListener("mousedown", (e) => e.preventDefault());
 
 
 
 
93
  wireHold();
94
  }
95
 
@@ -586,6 +590,14 @@ function flyEmoji(em, fromBtn, done) {
586
  setTimeout(() => { fly.remove(); if (done) done(); }, 360);
587
  }
588
 
 
 
 
 
 
 
 
 
589
  /* ---------------- misc ---------------- */
590
  function toast(msg) {
591
  const t = $("ariaToast"); t.textContent = msg; t.hidden = false;
 
90
  // tapping Send must NOT move focus off the textarea (that closes the mobile keyboard).
91
  // preventDefault on the (simulated) mousedown keeps focus; the click still submits.
92
  $("ariaSend").addEventListener("mousedown", (e) => e.preventDefault());
93
+ // tap ARIA's header avatar/name → profile popup (swing in, animated close)
94
+ document.querySelector(".aria-bar .aria-id")?.addEventListener("click", openProfile);
95
+ $("ariaProfileClose")?.addEventListener("click", closeProfile);
96
+ $("ariaProfile")?.addEventListener("click", (e) => { if (e.target.id === "ariaProfile") closeProfile(); });
97
  wireHold();
98
  }
99
 
 
590
  setTimeout(() => { fly.remove(); if (done) done(); }, 360);
591
  }
592
 
593
+ /* ---------------- profile popup ---------------- */
594
+ function openProfile() { const m = $("ariaProfile"); if (m) { m.classList.remove("closing"); m.hidden = false; } }
595
+ function closeProfile() {
596
+ const m = $("ariaProfile"); if (!m || m.hidden) return;
597
+ m.classList.add("closing");
598
+ setTimeout(() => { m.hidden = true; m.classList.remove("closing"); }, 260); // let the swing-out finish
599
+ }
600
+
601
  /* ---------------- misc ---------------- */
602
  function toast(msg) {
603
  const t = $("ariaToast"); t.textContent = msg; t.hidden = false;