tfrere HF Staff commited on
Commit
0332cd4
·
1 Parent(s): 7f90538

refactor(login-page): neutral title, outlined CTA, drop wordmark

Browse files

- Title back to default text color (dropping the primary tint)
- Switch the CTA from a filled pill to an outlined pill: 1.5px primary
border, transparent background, color-mix tint on hover/active
- Remove the "Research Article Template Editor" wordmark for a cleaner
silhouette

Made-with: Cursor

Files changed (1) hide show
  1. backend/src/create-app.ts +9 -48
backend/src/create-app.ts CHANGED
@@ -59,37 +59,17 @@ function renderLoginPage({ title, description }: LoginPageOptions): string {
59
  --primary-color: oklch(0.75 0.12 47);
60
  --primary-color-hover: oklch(from var(--primary-color) calc(l - 0.06) c h);
61
  --primary-color-active: oklch(from var(--primary-color) calc(l - 0.10) c h);
62
- --on-primary: #1a0f0a;
63
  --page-bg: #fafaf9;
64
  --text-color: #1a1a1a;
65
  --muted-color: rgba(0, 0, 0, .58);
66
- --shadow-soft:
67
- 0 1px 1px rgba(0, 0, 0, .04),
68
- 0 4px 10px rgba(0, 0, 0, .04),
69
- 0 16px 32px rgba(0, 0, 0, .05);
70
- --shadow-button:
71
- inset 0 1px 0 rgba(255, 255, 255, .25),
72
- inset 0 -1px 0 rgba(0, 0, 0, .12),
73
- 0 1px 2px rgba(0, 0, 0, .12),
74
- 0 6px 16px color-mix(in srgb, var(--primary-color) 30%, transparent);
75
- --shadow-button-hover:
76
- inset 0 1px 0 rgba(255, 255, 255, .3),
77
- inset 0 -1px 0 rgba(0, 0, 0, .12),
78
- 0 2px 4px rgba(0, 0, 0, .14),
79
- 0 10px 26px color-mix(in srgb, var(--primary-color) 38%, transparent);
80
  --font-stack: "Source Sans Pro", -apple-system, BlinkMacSystemFont,
81
  "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
82
  }
83
  @media (prefers-color-scheme: dark) {
84
  :root {
85
- --on-primary: #0f1115;
86
  --page-bg: #0c0d10;
87
  --text-color: rgba(255, 255, 255, .92);
88
  --muted-color: rgba(255, 255, 255, .58);
89
- --shadow-soft:
90
- 0 1px 1px rgba(0, 0, 0, .35),
91
- 0 4px 10px rgba(0, 0, 0, .35),
92
- 0 16px 32px rgba(0, 0, 0, .35);
93
  }
94
  }
95
  * { margin: 0; padding: 0; box-sizing: border-box; }
@@ -125,7 +105,7 @@ function renderLoginPage({ title, description }: LoginPageOptions): string {
125
  width: 100%;
126
  }
127
  .login__title {
128
- color: var(--primary-color);
129
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);
130
  font-weight: 600;
131
  letter-spacing: -0.025em;
@@ -148,34 +128,25 @@ function renderLoginPage({ title, description }: LoginPageOptions): string {
148
  font-size: 1rem;
149
  font-weight: 600;
150
  letter-spacing: -0.005em;
151
- color: var(--on-primary);
152
- background: linear-gradient(
153
- 180deg,
154
- color-mix(in srgb, var(--primary-color) 100%, white 8%),
155
- var(--primary-color)
156
- );
157
- border: 0;
158
  border-radius: 999px;
159
  text-decoration: none;
160
  cursor: pointer;
161
- box-shadow: var(--shadow-button);
162
  transition:
163
  transform 180ms cubic-bezier(.2, .9, .3, 1),
164
- box-shadow 180ms ease,
165
- background 180ms ease;
166
  }
167
  .login__btn:hover {
168
  transform: translateY(-1px);
169
- background: linear-gradient(
170
- 180deg,
171
- color-mix(in srgb, var(--primary-color-hover) 100%, white 6%),
172
- var(--primary-color-hover)
173
- );
174
- box-shadow: var(--shadow-button-hover);
175
  }
176
  .login__btn:active {
177
  transform: translateY(0);
178
- background: var(--primary-color-active);
179
  }
180
  .login__btn:focus-visible {
181
  outline: 2px solid var(--primary-color);
@@ -184,15 +155,6 @@ function renderLoginPage({ title, description }: LoginPageOptions): string {
184
  .login__btn svg {
185
  flex-shrink: 0;
186
  display: block;
187
- filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .15));
188
- }
189
- .login__brand {
190
- margin-top: 56px;
191
- font-size: 0.8125rem;
192
- font-weight: 500;
193
- letter-spacing: 0.02em;
194
- color: var(--muted-color);
195
- opacity: 0.85;
196
  }
197
  </style>
198
  </head>
@@ -204,7 +166,6 @@ function renderLoginPage({ title, description }: LoginPageOptions): string {
204
  ${HF_LOGO_SVG}
205
  <span>Sign in with Hugging Face</span>
206
  </a>
207
- <p class="login__brand">Research Article Template Editor</p>
208
  </main>
209
  </body>
210
  </html>`;
 
59
  --primary-color: oklch(0.75 0.12 47);
60
  --primary-color-hover: oklch(from var(--primary-color) calc(l - 0.06) c h);
61
  --primary-color-active: oklch(from var(--primary-color) calc(l - 0.10) c h);
 
62
  --page-bg: #fafaf9;
63
  --text-color: #1a1a1a;
64
  --muted-color: rgba(0, 0, 0, .58);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  --font-stack: "Source Sans Pro", -apple-system, BlinkMacSystemFont,
66
  "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
67
  }
68
  @media (prefers-color-scheme: dark) {
69
  :root {
 
70
  --page-bg: #0c0d10;
71
  --text-color: rgba(255, 255, 255, .92);
72
  --muted-color: rgba(255, 255, 255, .58);
 
 
 
 
73
  }
74
  }
75
  * { margin: 0; padding: 0; box-sizing: border-box; }
 
105
  width: 100%;
106
  }
107
  .login__title {
108
+ color: var(--text-color);
109
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);
110
  font-weight: 600;
111
  letter-spacing: -0.025em;
 
128
  font-size: 1rem;
129
  font-weight: 600;
130
  letter-spacing: -0.005em;
131
+ color: var(--text-color);
132
+ background: transparent;
133
+ border: 1.5px solid var(--primary-color);
 
 
 
 
134
  border-radius: 999px;
135
  text-decoration: none;
136
  cursor: pointer;
 
137
  transition:
138
  transform 180ms cubic-bezier(.2, .9, .3, 1),
139
+ background-color 180ms ease,
140
+ border-color 180ms ease;
141
  }
142
  .login__btn:hover {
143
  transform: translateY(-1px);
144
+ background: color-mix(in srgb, var(--primary-color) 10%, transparent);
145
+ border-color: var(--primary-color-hover);
 
 
 
 
146
  }
147
  .login__btn:active {
148
  transform: translateY(0);
149
+ background: color-mix(in srgb, var(--primary-color) 16%, transparent);
150
  }
151
  .login__btn:focus-visible {
152
  outline: 2px solid var(--primary-color);
 
155
  .login__btn svg {
156
  flex-shrink: 0;
157
  display: block;
 
 
 
 
 
 
 
 
 
158
  }
159
  </style>
160
  </head>
 
166
  ${HF_LOGO_SVG}
167
  <span>Sign in with Hugging Face</span>
168
  </a>
 
169
  </main>
170
  </body>
171
  </html>`;