Compare commits

...
10 Commits
Author SHA1 Message Date
justin abf1b3639c blur inputs and scroll to top after login 2026-02-04 15:12:30 -07:00
justin c696d23db9 prevent iOS auto-zoom on input focus 2026-02-04 15:09:25 -07:00
justin c13d85842b fix mobile spacing with media query updates 2026-02-04 15:06:41 -07:00
justin 6ba19ee3a4 reduce spacing for better mobile fit 2026-02-04 14:58:05 -07:00
justin 39adf7a6b8 fix mobile overflow on stat cards 2026-02-04 14:51:54 -07:00
justin 8f5bdca245 fix viewport scaling for iPhone 2026-02-04 14:43:57 -07:00
justin ed69866b48 Update README.md 2026-01-30 06:54:14 -07:00
justin 0a2d3aabbf Update screenshot.png 2026-01-30 06:53:20 -07:00
justin 0a41799da4 Update color of alpaca.png 2026-01-30 06:17:42 -07:00
justin ac4c91a9e3 Update README.md 2026-01-28 17:00:59 -07:00
4 changed files with 40 additions and 23 deletions

No files matched your search

+3 -1
View File
@@ -1,6 +1,8 @@
# Alpaca Dashboard # Alpaca Dashboard
A clean, mobile-optimized web dashboard for monitoring your Alpaca trading account in real-time. A web dashboard for monitoring your Alpaca trading account in real-time.
![Dashboard Preview](screenshot.png)
## Features ## Features
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 40 KiB

+37 -22
View File
@@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Alpaca Dashboard</title> <title>Alpaca Dashboard</title>
<link rel="icon" type="image/png" href="alpaca.png"> <link rel="icon" type="image/png" href="alpaca.png">
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Outfit:wght@300;400;600;700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Outfit:wght@300;400;600;700&display=swap" rel="stylesheet">
@@ -37,11 +37,11 @@
z-index:1; z-index:1;
max-width:1200px; max-width:1200px;
margin:0 auto; margin:0 auto;
padding:20px; padding:12px 12px;
} }
header{ header{
text-align:center; text-align:center;
padding:40px 0 30px; padding:20px 0 16px;
animation:slideDown .6s ease-out; animation:slideDown .6s ease-out;
} }
@keyframes slideDown{ @keyframes slideDown{
@@ -157,7 +157,7 @@
border-radius:8px; border-radius:8px;
color:var(--text-primary); color:var(--text-primary);
font-family:'JetBrains Mono',monospace; font-family:'JetBrains Mono',monospace;
font-size:14px; font-size:16px;
transition:all .3s ease; transition:all .3s ease;
} }
input[type="password"]:focus,input[type="text"]:focus{ input[type="password"]:focus,input[type="text"]:focus{
@@ -219,7 +219,7 @@
display:flex; display:flex;
justify-content:space-between; justify-content:space-between;
align-items:center; align-items:center;
margin-bottom:24px; margin-bottom:16px;
flex-wrap:wrap; flex-wrap:wrap;
gap:12px; gap:12px;
} }
@@ -227,6 +227,8 @@
display:flex; display:flex;
align-items:center; align-items:center;
gap:12px; gap:12px;
flex-shrink:1;
min-width:0;
} }
.status-badge{ .status-badge{
padding:6px 12px; padding:6px 12px;
@@ -256,6 +258,10 @@
position:relative; position:relative;
padding:4px 8px; padding:4px 8px;
border-radius:4px; border-radius:4px;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
max-width:100%;
} }
.account-number:hover{ .account-number:hover{
color:var(--accent-green); color:var(--accent-green);
@@ -285,15 +291,15 @@
} }
.stats-grid{ .stats-grid{
display:grid; display:grid;
grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));
gap:16px; gap:12px;
margin-bottom:24px; margin-bottom:20px;
} }
.stat-card{ .stat-card{
background:var(--bg-card); background:var(--bg-card);
border:1px solid var(--border); border:1px solid var(--border);
border-radius:12px; border-radius:12px;
padding:20px; padding:16px;
transition:all .3s ease; transition:all .3s ease;
position:relative; position:relative;
overflow:hidden; overflow:hidden;
@@ -429,13 +435,30 @@
} }
@media (max-width:768px){ @media (max-width:768px){
.container{ .container{
padding:12px; padding:8px;
} }
header{ header{
padding:20px 0 20px; padding:12px 0 12px;
}
.logo-image{
width:120px;
}
.logo{
font-size:24px;
}
.tagline{
font-size:12px;
} }
.stats-grid{ .stats-grid{
grid-template-columns:1fr; grid-template-columns:1fr;
gap:8px;
margin-bottom:12px;
}
.stat-card{
padding:12px;
}
.dashboard-header{
margin-bottom:12px;
} }
th,td{ th,td{
padding:12px 8px; padding:12px 8px;
@@ -454,9 +477,6 @@
animation:pulse 1.5s ease-in-out infinite; animation:pulse 1.5s ease-in-out infinite;
} }
/* -----------------------------------------------------------------
Hamburger menu – hidden until login succeeds
----------------------------------------------------------------- */
.hamburger{ .hamburger{
position:fixed; position:fixed;
top:20px; top:20px;
@@ -465,7 +485,7 @@
cursor:pointer; cursor:pointer;
color:var(--text-primary); color:var(--text-primary);
z-index:10; z-index:10;
display:none; /* hidden on the login page */ display:none;
} }
.menu{ .menu{
position:fixed; position:fixed;
@@ -624,10 +644,11 @@
if (response.ok) { if (response.ok) {
updateTradingModeBadge(tradingMode); updateTradingModeBadge(tradingMode);
document.activeElement.blur();
document.getElementById('loginForm').style.display = 'none'; document.getElementById('loginForm').style.display = 'none';
document.getElementById('dashboard').style.display = 'block'; document.getElementById('dashboard').style.display = 'block';
// show hamburger now that the user is logged in
document.getElementById('menuToggle').style.display = 'block'; document.getElementById('menuToggle').style.display = 'block';
window.scrollTo(0, 0);
await loadDashboard(); await loadDashboard();
setInterval(loadDashboard, 30000); setInterval(loadDashboard, 30000);
return; return;
@@ -821,14 +842,10 @@
document.getElementById('loginForm').style.display = 'block'; document.getElementById('loginForm').style.display = 'block';
document.getElementById('dashboard').style.display = 'none'; document.getElementById('dashboard').style.display = 'none';
document.getElementById('loginError').innerHTML = ''; document.getElementById('loginError').innerHTML = '';
// hide hamburger again
document.getElementById('menuToggle').style.display = 'none'; document.getElementById('menuToggle').style.display = 'none';
document.getElementById('menu').classList.remove('show'); document.getElementById('menu').classList.remove('show');
} }
/* -----------------------------------------------------------------
Hamburger menu logic
----------------------------------------------------------------- */
document.getElementById('menuToggle').addEventListener('click', () => { document.getElementById('menuToggle').addEventListener('click', () => {
document.getElementById('menu').classList.toggle('show'); document.getElementById('menu').classList.toggle('show');
}); });
@@ -838,7 +855,6 @@
logout(); logout();
}); });
// Close menu when clicking outside of it
document.addEventListener('click', (e) => { document.addEventListener('click', (e) => {
const menu = document.getElementById('menu'); const menu = document.getElementById('menu');
const toggle = document.getElementById('menuToggle'); const toggle = document.getElementById('menuToggle');
@@ -849,4 +865,3 @@
</script> </script>
</body> </body>
</html> </html>
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 59 KiB