Spaces:
Sleeping
Sleeping
Commit
·
a2bc252
1
Parent(s):
0a899b3
fix ui
Browse files- templates/dashboard.html +64 -60
- templates/index.html +23 -28
templates/dashboard.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>Dashboard
|
| 7 |
<style>
|
| 8 |
* {
|
| 9 |
margin: 0;
|
|
@@ -12,20 +12,21 @@
|
|
| 12 |
}
|
| 13 |
body {
|
| 14 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
| 15 |
-
background: #
|
|
|
|
| 16 |
min-height: 100vh;
|
| 17 |
}
|
| 18 |
.navbar {
|
| 19 |
-
|
| 20 |
padding: 1rem 2rem;
|
| 21 |
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
| 22 |
display: flex;
|
| 23 |
justify-content: space-between;
|
| 24 |
align-items: center;
|
| 25 |
}
|
| 26 |
.navbar h1 {
|
| 27 |
-
font-size:
|
| 28 |
-
|
|
|
|
| 29 |
}
|
| 30 |
.user-info {
|
| 31 |
display: flex;
|
|
@@ -33,67 +34,70 @@
|
|
| 33 |
gap: 1rem;
|
| 34 |
}
|
| 35 |
.avatar {
|
| 36 |
-
width:
|
| 37 |
-
height:
|
| 38 |
border-radius: 50%;
|
| 39 |
object-fit: cover;
|
| 40 |
}
|
| 41 |
.username {
|
| 42 |
-
font-
|
| 43 |
-
color: #
|
| 44 |
}
|
| 45 |
.logout-btn {
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
padding: 8px 16px;
|
| 49 |
-
border-radius: 6px;
|
| 50 |
text-decoration: none;
|
| 51 |
-
|
| 52 |
-
transition: background 0.2s;
|
| 53 |
}
|
| 54 |
.logout-btn:hover {
|
| 55 |
-
|
| 56 |
}
|
| 57 |
.main {
|
| 58 |
-
max-width:
|
| 59 |
-
margin:
|
| 60 |
-
padding:
|
| 61 |
}
|
| 62 |
.welcome {
|
| 63 |
-
|
| 64 |
-
padding: 2rem;
|
| 65 |
-
border-radius: 12px;
|
| 66 |
-
margin-bottom: 2rem;
|
| 67 |
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 68 |
}
|
| 69 |
.welcome h2 {
|
| 70 |
-
|
|
|
|
|
|
|
| 71 |
margin-bottom: 0.5rem;
|
| 72 |
}
|
| 73 |
.welcome p {
|
| 74 |
color: #666;
|
|
|
|
| 75 |
}
|
| 76 |
-
.info-
|
| 77 |
-
display:
|
| 78 |
-
|
| 79 |
-
gap:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
}
|
| 81 |
-
.info-
|
| 82 |
-
|
| 83 |
-
padding: 1.5rem;
|
| 84 |
-
border-radius: 12px;
|
| 85 |
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 86 |
}
|
| 87 |
-
.info-
|
| 88 |
-
|
| 89 |
-
margin-bottom: 0.5rem;
|
| 90 |
-
font-size: 0.9rem;
|
| 91 |
-
text-transform: uppercase;
|
| 92 |
-
letter-spacing: 0.5px;
|
| 93 |
}
|
| 94 |
-
.info-
|
| 95 |
color: #666;
|
| 96 |
-
font-size:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
}
|
| 98 |
</style>
|
| 99 |
</head>
|
|
@@ -102,39 +106,39 @@
|
|
| 102 |
<h1>Spaces Dashboard</h1>
|
| 103 |
<div class="user-info">
|
| 104 |
{% if user.avatar_url %}
|
| 105 |
-
<img src="{{ user.avatar_url }}" alt="
|
| 106 |
{% endif %}
|
| 107 |
<span class="username">{{ user.username }}</span>
|
| 108 |
-
<a href="/logout" class="logout-btn">
|
| 109 |
</div>
|
| 110 |
</nav>
|
| 111 |
|
| 112 |
<main class="main">
|
| 113 |
<div class="welcome">
|
| 114 |
-
<h2>
|
| 115 |
-
<p>
|
| 116 |
</div>
|
| 117 |
|
| 118 |
-
<div class="info-
|
| 119 |
-
<div class="info-
|
| 120 |
-
<
|
| 121 |
-
<
|
| 122 |
</div>
|
| 123 |
{% if user.name %}
|
| 124 |
-
<div class="info-
|
| 125 |
-
<
|
| 126 |
-
<
|
| 127 |
</div>
|
| 128 |
{% endif %}
|
| 129 |
{% if user.email %}
|
| 130 |
-
<div class="info-
|
| 131 |
-
<
|
| 132 |
-
<
|
| 133 |
</div>
|
| 134 |
{% endif %}
|
| 135 |
-
<div class="info-
|
| 136 |
-
<
|
| 137 |
-
<
|
| 138 |
</div>
|
| 139 |
</div>
|
| 140 |
</main>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Dashboard</title>
|
| 7 |
<style>
|
| 8 |
* {
|
| 9 |
margin: 0;
|
|
|
|
| 12 |
}
|
| 13 |
body {
|
| 14 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
| 15 |
+
background: #0a0a0a;
|
| 16 |
+
color: #e5e5e5;
|
| 17 |
min-height: 100vh;
|
| 18 |
}
|
| 19 |
.navbar {
|
| 20 |
+
border-bottom: 1px solid #1a1a1a;
|
| 21 |
padding: 1rem 2rem;
|
|
|
|
| 22 |
display: flex;
|
| 23 |
justify-content: space-between;
|
| 24 |
align-items: center;
|
| 25 |
}
|
| 26 |
.navbar h1 {
|
| 27 |
+
font-size: 0.875rem;
|
| 28 |
+
font-weight: 500;
|
| 29 |
+
color: #888;
|
| 30 |
}
|
| 31 |
.user-info {
|
| 32 |
display: flex;
|
|
|
|
| 34 |
gap: 1rem;
|
| 35 |
}
|
| 36 |
.avatar {
|
| 37 |
+
width: 28px;
|
| 38 |
+
height: 28px;
|
| 39 |
border-radius: 50%;
|
| 40 |
object-fit: cover;
|
| 41 |
}
|
| 42 |
.username {
|
| 43 |
+
font-size: 0.875rem;
|
| 44 |
+
color: #e5e5e5;
|
| 45 |
}
|
| 46 |
.logout-btn {
|
| 47 |
+
color: #666;
|
| 48 |
+
font-size: 0.75rem;
|
|
|
|
|
|
|
| 49 |
text-decoration: none;
|
| 50 |
+
transition: color 0.2s;
|
|
|
|
| 51 |
}
|
| 52 |
.logout-btn:hover {
|
| 53 |
+
color: #e5e5e5;
|
| 54 |
}
|
| 55 |
.main {
|
| 56 |
+
max-width: 600px;
|
| 57 |
+
margin: 0 auto;
|
| 58 |
+
padding: 4rem 2rem;
|
| 59 |
}
|
| 60 |
.welcome {
|
| 61 |
+
margin-bottom: 3rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
}
|
| 63 |
.welcome h2 {
|
| 64 |
+
font-size: 1.25rem;
|
| 65 |
+
font-weight: 500;
|
| 66 |
+
letter-spacing: -0.02em;
|
| 67 |
margin-bottom: 0.5rem;
|
| 68 |
}
|
| 69 |
.welcome p {
|
| 70 |
color: #666;
|
| 71 |
+
font-size: 0.875rem;
|
| 72 |
}
|
| 73 |
+
.info-list {
|
| 74 |
+
display: flex;
|
| 75 |
+
flex-direction: column;
|
| 76 |
+
gap: 1px;
|
| 77 |
+
background: #1a1a1a;
|
| 78 |
+
border-radius: 8px;
|
| 79 |
+
overflow: hidden;
|
| 80 |
+
}
|
| 81 |
+
.info-item {
|
| 82 |
+
background: #0a0a0a;
|
| 83 |
+
padding: 1rem 1.25rem;
|
| 84 |
+
display: flex;
|
| 85 |
+
justify-content: space-between;
|
| 86 |
+
align-items: center;
|
| 87 |
}
|
| 88 |
+
.info-item:first-child {
|
| 89 |
+
padding-top: 1.25rem;
|
|
|
|
|
|
|
|
|
|
| 90 |
}
|
| 91 |
+
.info-item:last-child {
|
| 92 |
+
padding-bottom: 1.25rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
}
|
| 94 |
+
.info-label {
|
| 95 |
color: #666;
|
| 96 |
+
font-size: 0.8125rem;
|
| 97 |
+
}
|
| 98 |
+
.info-value {
|
| 99 |
+
font-size: 0.875rem;
|
| 100 |
+
color: #e5e5e5;
|
| 101 |
}
|
| 102 |
</style>
|
| 103 |
</head>
|
|
|
|
| 106 |
<h1>Spaces Dashboard</h1>
|
| 107 |
<div class="user-info">
|
| 108 |
{% if user.avatar_url %}
|
| 109 |
+
<img src="{{ user.avatar_url }}" alt="" class="avatar">
|
| 110 |
{% endif %}
|
| 111 |
<span class="username">{{ user.username }}</span>
|
| 112 |
+
<a href="/logout" class="logout-btn">Sign out</a>
|
| 113 |
</div>
|
| 114 |
</nav>
|
| 115 |
|
| 116 |
<main class="main">
|
| 117 |
<div class="welcome">
|
| 118 |
+
<h2>{{ user.name or user.username }}</h2>
|
| 119 |
+
<p>Signed in with Hugging Face</p>
|
| 120 |
</div>
|
| 121 |
|
| 122 |
+
<div class="info-list">
|
| 123 |
+
<div class="info-item">
|
| 124 |
+
<span class="info-label">Username</span>
|
| 125 |
+
<span class="info-value">{{ user.username }}</span>
|
| 126 |
</div>
|
| 127 |
{% if user.name %}
|
| 128 |
+
<div class="info-item">
|
| 129 |
+
<span class="info-label">Name</span>
|
| 130 |
+
<span class="info-value">{{ user.name }}</span>
|
| 131 |
</div>
|
| 132 |
{% endif %}
|
| 133 |
{% if user.email %}
|
| 134 |
+
<div class="info-item">
|
| 135 |
+
<span class="info-label">Email</span>
|
| 136 |
+
<span class="info-value">{{ user.email }}</span>
|
| 137 |
</div>
|
| 138 |
{% endif %}
|
| 139 |
+
<div class="info-item">
|
| 140 |
+
<span class="info-label">ID</span>
|
| 141 |
+
<span class="info-value">{{ user.sub }}</span>
|
| 142 |
</div>
|
| 143 |
</div>
|
| 144 |
</main>
|
templates/index.html
CHANGED
|
@@ -12,53 +12,48 @@
|
|
| 12 |
}
|
| 13 |
body {
|
| 14 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
| 15 |
-
background:
|
|
|
|
| 16 |
min-height: 100vh;
|
| 17 |
display: flex;
|
| 18 |
align-items: center;
|
| 19 |
justify-content: center;
|
| 20 |
}
|
| 21 |
.container {
|
| 22 |
-
background: white;
|
| 23 |
-
padding: 3rem;
|
| 24 |
-
border-radius: 16px;
|
| 25 |
-
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
| 26 |
text-align: center;
|
| 27 |
-
|
| 28 |
-
width: 90%;
|
| 29 |
}
|
| 30 |
h1 {
|
| 31 |
-
|
|
|
|
|
|
|
| 32 |
margin-bottom: 0.5rem;
|
| 33 |
-
font-size: 1.8rem;
|
| 34 |
}
|
| 35 |
.subtitle {
|
| 36 |
color: #666;
|
| 37 |
-
|
|
|
|
| 38 |
}
|
| 39 |
.login-btn {
|
| 40 |
display: inline-flex;
|
| 41 |
align-items: center;
|
| 42 |
-
gap:
|
| 43 |
-
background:
|
| 44 |
-
color: #
|
| 45 |
-
padding:
|
| 46 |
-
border
|
|
|
|
| 47 |
text-decoration: none;
|
| 48 |
-
font-
|
| 49 |
-
|
| 50 |
-
transition: all 0.2s ease;
|
| 51 |
-
border: none;
|
| 52 |
-
cursor: pointer;
|
| 53 |
}
|
| 54 |
.login-btn:hover {
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
box-shadow: 0 4px 12px rgba(255, 204, 0, 0.4);
|
| 58 |
}
|
| 59 |
.login-btn svg {
|
| 60 |
-
width:
|
| 61 |
-
height:
|
| 62 |
}
|
| 63 |
</style>
|
| 64 |
</head>
|
|
@@ -66,10 +61,10 @@
|
|
| 66 |
<div class="container">
|
| 67 |
<h1>Spaces Dashboard</h1>
|
| 68 |
<p class="subtitle">Manage your Hugging Face Spaces</p>
|
| 69 |
-
<a href="/login" class="login-btn">
|
| 70 |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
| 71 |
-
<path fill="#
|
| 72 |
-
<path fill="#
|
| 73 |
</svg>
|
| 74 |
Sign in with Hugging Face
|
| 75 |
</a>
|
|
|
|
| 12 |
}
|
| 13 |
body {
|
| 14 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
| 15 |
+
background: #0a0a0a;
|
| 16 |
+
color: #e5e5e5;
|
| 17 |
min-height: 100vh;
|
| 18 |
display: flex;
|
| 19 |
align-items: center;
|
| 20 |
justify-content: center;
|
| 21 |
}
|
| 22 |
.container {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
text-align: center;
|
| 24 |
+
padding: 2rem;
|
|
|
|
| 25 |
}
|
| 26 |
h1 {
|
| 27 |
+
font-size: 1.5rem;
|
| 28 |
+
font-weight: 500;
|
| 29 |
+
letter-spacing: -0.02em;
|
| 30 |
margin-bottom: 0.5rem;
|
|
|
|
| 31 |
}
|
| 32 |
.subtitle {
|
| 33 |
color: #666;
|
| 34 |
+
font-size: 0.875rem;
|
| 35 |
+
margin-bottom: 3rem;
|
| 36 |
}
|
| 37 |
.login-btn {
|
| 38 |
display: inline-flex;
|
| 39 |
align-items: center;
|
| 40 |
+
gap: 8px;
|
| 41 |
+
background: transparent;
|
| 42 |
+
color: #e5e5e5;
|
| 43 |
+
padding: 10px 20px;
|
| 44 |
+
border: 1px solid #333;
|
| 45 |
+
border-radius: 6px;
|
| 46 |
text-decoration: none;
|
| 47 |
+
font-size: 0.875rem;
|
| 48 |
+
transition: border-color 0.2s, background 0.2s;
|
|
|
|
|
|
|
|
|
|
| 49 |
}
|
| 50 |
.login-btn:hover {
|
| 51 |
+
border-color: #555;
|
| 52 |
+
background: #111;
|
|
|
|
| 53 |
}
|
| 54 |
.login-btn svg {
|
| 55 |
+
width: 18px;
|
| 56 |
+
height: 18px;
|
| 57 |
}
|
| 58 |
</style>
|
| 59 |
</head>
|
|
|
|
| 61 |
<div class="container">
|
| 62 |
<h1>Spaces Dashboard</h1>
|
| 63 |
<p class="subtitle">Manage your Hugging Face Spaces</p>
|
| 64 |
+
<a href="/login" target="_blank" class="login-btn">
|
| 65 |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
| 66 |
+
<path fill="#fff" d="M50 5C25.1 5 5 25.1 5 50s20.1 45 45 45 45-20.1 45-45S74.9 5 50 5z"/>
|
| 67 |
+
<path fill="#0a0a0a" d="M35 40c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm30 0c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8z"/>
|
| 68 |
</svg>
|
| 69 |
Sign in with Hugging Face
|
| 70 |
</a>
|