Repository navigation
Expand file tree
/
Copy pathpreview.html
More file actions
41 lines (41 loc) · 9.48 KB
/
Copy pathpreview.html
File metadata and controls
41 lines (41 loc) · 9.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!doctype html>
<html lang="vi">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="theme-color" content="#05070f">
<title>OCode.js Profile — UI Preview</title>
<style>
:root{color-scheme:dark;--bg:#05070f;--panel:#0a0d16;--line:#20283a;--fg:#f3f5fb;--muted:#8994a8;--blue:#2f6bff;--purple:#8b5cf6;--green:#56d49a}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg);font:14px Inter,system-ui,sans-serif}a{color:inherit;text-decoration:none}button,input,textarea{font:inherit}.wrap{max-width:1180px;margin:auto;padding:22px}.top{height:58px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(22px,calc((100vw - 1180px)/2));background:#070a12}.brand{font-weight:800;letter-spacing:-.06em}.brand span{color:#8caeff}.preview{font-size:10px;color:#e9c47b;border:1px solid #57472a;padding:6px 9px;border-radius:20px}.tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);overflow:auto;margin:24px 0}.tab{padding:12px 2px;color:var(--muted);white-space:nowrap;border-bottom:2px solid transparent;background:none;border-top:0;border-left:0;border-right:0;cursor:pointer}.tab.active{color:var(--fg);border-color:var(--blue)}.layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:28px}.avatar{width:100%;aspect-ratio:1;border-radius:18px;background:linear-gradient(140deg,#17233f,#25153c);display:grid;place-items:center;font-size:54px;font-weight:800;color:#b9ccff;border:1px solid #344568}.name{font-size:24px;margin:16px 0 2px}.handle{color:var(--muted)}.bio{line-height:1.65;color:#c4ccda;margin:18px 0}.btn{background:#14213b;border:1px solid #304b7d;color:#e5edff;border-radius:7px;padding:9px 12px;cursor:pointer}.btn.secondary{background:transparent;border-color:var(--line);color:#c2cada}.actions{display:flex;gap:8px;margin:16px 0}.meta{display:grid;gap:10px;color:var(--muted);font-size:12px;margin:18px 0}.counts{color:#c8d2e3;font-size:12px}.counts b{color:var(--fg)}.section{border:1px solid var(--line);background:var(--panel);border-radius:10px;padding:18px;margin-bottom:16px}.section h2{font-size:14px;margin:0 0 15px}.readme{line-height:1.8;color:#c8d1df}.readme h3{font-size:19px;color:white}.chips{display:flex;flex-wrap:wrap;gap:7px}.chip{border:1px solid #303b51;border-radius:20px;padding:5px 9px;color:#b9c7df;font-size:11px}.repos{display:grid;grid-template-columns:1fr 1fr;gap:10px}.repo{border:1px solid var(--line);border-radius:8px;padding:14px}.repo strong{color:#a9c1ff}.repo p{font-size:12px;color:var(--muted);line-height:1.5;min-height:36px}.repo small{color:#8d9ab0}.heat{display:grid;grid-template-columns:repeat(26,1fr);gap:4px}.cell{aspect-ratio:1;border-radius:3px;background:#161e2d}.cell[data-v="1"]{background:#25417b}.cell[data-v="2"]{background:#2f6bff}.cell[data-v="3"]{background:#8b5cf6}.timeline{display:grid;gap:13px}.event{border-left:1px solid #35415a;padding:0 0 5px 14px;color:#c5cede;font-size:12px}.event small{display:block;color:var(--muted);margin-top:5px}.muted{color:var(--muted)}.notice{font-size:11px;color:#e7c47f;line-height:1.6;border:1px solid #59482d;background:#17140e;padding:11px 13px;border-radius:8px;margin:18px 0}.modal{display:none;position:fixed;inset:0;background:#000b;align-items:center;justify-content:center;padding:20px}.modal.open{display:flex}.dialog{width:min(480px,100%);background:#0c111c;border:1px solid #35415a;border-radius:12px;padding:20px}.dialog h2{margin:0 0 15px}.field{display:grid;gap:6px;margin:12px 0}.field label{font-size:11px;color:var(--muted)}.field input,.field textarea{background:#070b13;color:white;border:1px solid var(--line);border-radius:6px;padding:10px}.field textarea{min-height:80px}.end{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}@media(max-width:720px){.wrap{padding:15px}.layout{grid-template-columns:1fr}.side{display:grid;grid-template-columns:86px 1fr;gap:14px;align-items:start}.avatar{border-radius:12px;font-size:28px}.name{font-size:20px;margin:3px 0}.bio{margin:9px 0}.meta{grid-column:1/-1;grid-template-columns:1fr 1fr}.repos{grid-template-columns:1fr}.heat{gap:2px}.top{padding:0 15px}}
</style>
<script>
window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
</script>
<script defer src="/_vercel/insights/script.js"></script>
<!-- Vercel Web Analytics -->
<script defer src="https://cdn.vercel-insights.com/v1/script.js"></script>
</head>
<body>
<header class="top"><div class="brand">OCode<span>.js</span> / Profile</div><span class="preview">UI PREVIEW · SAMPLE DATA</span></header>
<main class="wrap">
<div class="notice">Đây là bản xem trước giao diện với dữ liệu mẫu. Chỉnh sửa trong trang chỉ thay đổi trạng thái tạm thời trên trình duyệt; chưa kết nối tài khoản, API hoặc cơ sở dữ liệu.</div>
<nav class="tabs" aria-label="Profile sections"><button class="tab active" data-tab="overview">Overview</button><button class="tab" data-tab="repositories">Repositories</button><button class="tab" data-tab="projects">Projects</button><button class="tab" data-tab="packages">Packages</button><button class="tab" data-tab="stars">Stars</button></nav>
<div class="layout"><aside class="side"><div class="avatar" id="avatar">OC</div><div><h1 class="name" id="displayName">OCode Developer</h1><div class="handle" id="username">@sample-user</div><div class="bio" id="bio">Building useful things with OCode.js. Open-source enthusiast and full-stack developer.</div><div class="actions"><button class="btn" id="edit">Edit profile</button><button class="btn secondary">Share</button></div></div><div class="counts"><b>128</b> followers · <b>42</b> following</div><div class="meta"><span>⌖ Vietnam</span><span>◷ Asia/Ho_Chi_Minh</span><span>↗ ocodejs.dev</span><span>⌘ github.com/sample-user</span></div></aside>
<section id="overview">
<div class="section readme"><h3>👋 Hello, I'm <span id="readmeName">OCode Developer</span></h3><p>I'm building tools and products with <b>OCode.js</b>. I enjoy open source, automation, developer experience and thoughtful interface design.</p><h3>Tech stack</h3><div class="chips"><span class="chip">TypeScript</span><span class="chip">JavaScript</span><span class="chip">React</span><span class="chip">Node.js</span><span class="chip">Cloudflare</span><span class="chip">PostgreSQL</span></div></div>
<div class="section"><h2>📌 Pinned repositories</h2><div class="repos"><article class="repo"><strong>◈ ocodejs-cli</strong><p>Command-line toolkit for the OCode.js ecosystem.</p><small>TypeScript ☆ 248 ⑂ 36</small></article><article class="repo"><strong>◈ woww</strong><p>High-performance full-stack framework and static site toolkit.</p><small>TypeScript ☆ 91 ⑂ 12</small></article><article class="repo"><strong>◈ docs-ocodejs</strong><p>Documentation and guides for OCode.js.</p><small>MDX ☆ 64 ⑂ 9</small></article><article class="repo"><strong>◈ agent-tools</strong><p>Automation helpers and reusable agent workflows.</p><small>JavaScript ☆ 38 ⑂ 5</small></article></div></div>
<div class="section"><h2>Contribution activity <span class="muted">· Sample year 2026</span></h2><div class="heat" id="heat"></div><p class="muted" style="font-size:11px;margin-bottom:0">Contribution cells are illustrative only; real counts require verified event sources.</p></div>
<div class="section"><h2>Recent activity</h2><div class="timeline"><div class="event">Created a new repository <b>woww</b><small>2 days ago · Repository</small></div><div class="event">Opened a pull request in <b>ocodejs-cli</b><small>5 days ago · Pull request</small></div><div class="event">Pushed commits to <b>docs-ocodejs</b><small>1 week ago · Commits</small></div></div></div>
</section>
<section id="other" hidden><div class="section"><h2 id="otherTitle">Repositories</h2><p class="muted">Danh sách nội dung sẽ được tải từ OCode.js API sau khi backend được triển khai.</p></div></section>
</div></main>
<div class="modal" id="modal"><div class="dialog"><h2>Edit profile</h2><div class="field"><label for="nameInput">Display name</label><input id="nameInput" value="OCode Developer"></div><div class="field"><label for="bioInput">Bio</label><textarea id="bioInput">Building useful things with OCode.js. Open-source enthusiast and full-stack developer.</textarea></div><div class="end"><button class="btn secondary" id="cancel">Cancel</button><button class="btn" id="save">Save preview</button></div></div></div>
<script>
const $=id=>document.getElementById(id);const tabs=[...document.querySelectorAll('[data-tab]')];
tabs.forEach(t=>t.addEventListener('click',()=>{tabs.forEach(x=>x.classList.toggle('active',x===t));const overview=t.dataset.tab==='overview';$('overview').hidden=!overview;$('other').hidden=overview;$('otherTitle').textContent=t.textContent; }));
for(let i=0;i<182;i++){const c=document.createElement('span');c.className='cell';c.dataset.v=String((i*7+Math.floor(i/9))%13===0?3:(i*5)%7===0?2:(i*3)%5===0?1:0);$('heat').append(c);}
$('edit').onclick=()=>{$('modal').classList.add('open');$('nameInput').value=$('displayName').textContent;$('bioInput').value=$('bio').textContent;};
$('cancel').onclick=()=>$('modal').classList.remove('open');
$('save').onclick=()=>{$('displayName').textContent=$('nameInput').value.trim()||'OCode Developer';$('readmeName').textContent=$('displayName').textContent;$('bio').textContent=$('bioInput').value;$('modal').classList.remove('open');};
$('modal').addEventListener('click',e=>{if(e.target===$('modal'))$('modal').classList.remove('open')});
</script></body></html>