google sign in page done

This commit is contained in:
2026-02-19 11:15:25 +05:30
parent ad6ae63d33
commit 555c03a91c
16 changed files with 1745 additions and 104 deletions

View File

@@ -1,42 +1,277 @@
/* Grateful Journal green palette. Responsive layout. */
#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
min-height: 100vh;
min-height: 100dvh;
margin: 0;
padding: 0;
overflow-x: hidden;
}
/* ----- Protected route loading ----- */
.protected-route__loading {
min-height: 100vh;
min-height: 100dvh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1rem;
background: var(--color-bg-soft);
color: var(--color-text-muted);
}
.protected-route__spinner {
width: 32px;
height: 32px;
border: 3px solid var(--color-border);
border-top-color: var(--color-primary);
border-radius: 50%;
animation: login-spin 0.7s linear infinite;
}
@keyframes login-spin {
to { transform: rotate(360deg); }
}
/* ----- Login page green accent aesthetic ----- */
.login-page {
min-height: 100vh;
min-height: 100dvh;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(160deg, var(--color-bg-soft) 0%, var(--color-accent-light) 100%);
padding: clamp(0.75rem, 3vw, 1.5rem);
padding-left: max(clamp(0.75rem, 3vw, 1.5rem), env(safe-area-inset-left));
padding-right: max(clamp(0.75rem, 3vw, 1.5rem), env(safe-area-inset-right));
}
.login-page__loading {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
color: var(--color-text-muted);
}
.login-page__spinner {
width: 32px;
height: 32px;
border: 3px solid var(--color-border);
border-top-color: var(--color-primary);
border-radius: 50%;
animation: login-spin 0.7s linear infinite;
}
/* Login card green accent */
.login-card {
background: var(--color-surface);
padding: clamp(1.5rem, 6vw, 2.75rem);
border-radius: 16px;
border-top: 4px solid var(--color-primary);
box-shadow: 0 8px 32px rgba(27, 230, 44, 0.08), 0 2px 12px rgba(0, 0, 0, 0.04);
max-width: 400px;
width: 100%;
min-width: 0;
text-align: center;
}
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
filter: drop-shadow(0 0 2em #61dafbaa);
.login-card__brand {
margin-bottom: 1.75rem;
}
@keyframes logo-spin {
from {
transform: rotate(0deg);
.login-card__title {
margin: 0 0 0.5rem;
font-size: clamp(1.5rem, 4.5vw, 1.875rem);
font-weight: 600;
color: var(--color-primary);
letter-spacing: -0.02em;
}
.login-card__tagline {
margin: 0;
color: var(--color-text-muted);
font-size: clamp(0.875rem, 2vw, 0.9375rem);
line-height: 1.5;
}
.login-card__actions {
display: flex;
flex-direction: column;
align-items: stretch;
gap: 1rem;
}
.login-card__error {
margin: 0;
padding: 0.65rem 0.75rem;
color: #b91c1c;
font-size: 0.875rem;
background: #fef2f2;
border-radius: 8px;
word-break: break-word;
text-align: left;
}
/* Sign in with Google button standard Google-style UI */
.google-sign-in-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
width: 100%;
min-height: 52px;
padding: 0.75rem 1.25rem;
font-size: 1rem;
font-weight: 500;
color: #3c4043;
background: #fff;
border: 1px solid #dadce0;
border-radius: 8px;
cursor: pointer;
transition: background 0.2s, box-shadow 0.2s;
-webkit-tap-highlight-color: transparent;
}
.google-sign-in-btn:hover:not(:disabled) {
background: #f8f9fa;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.google-sign-in-btn:active:not(:disabled) {
background: #f1f3f4;
}
.google-sign-in-btn:disabled {
opacity: 0.7;
cursor: not-allowed;
}
.google-sign-in-btn__logo {
flex-shrink: 0;
}
.google-sign-in-btn__label {
color: inherit;
}
/* ----- Home page ----- */
.home-page {
min-height: 100vh;
min-height: 100dvh;
background: var(--color-bg-soft, #f1eee1);
padding: clamp(0.75rem, 3vw, 1.5rem);
padding-left: max(clamp(0.75rem, 3vw, 1.5rem), env(safe-area-inset-left));
padding-right: max(clamp(0.75rem, 3vw, 1.5rem), env(safe-area-inset-right));
}
.home-header {
max-width: 720px;
margin: 0 auto 1.5rem;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 0.75rem;
}
.home-header h1 {
margin: 0;
font-size: clamp(1.2rem, 3.5vw, 1.5rem);
color: var(--color-text, #1a1a1a);
word-break: break-word;
}
.home-user {
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
min-width: 0;
}
.home-username {
font-weight: 500;
color: var(--color-text, #1a1a1a);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: min(50vw, 180px);
}
.home-sign-out {
min-height: 44px;
padding: 0.5rem 0.75rem;
font-size: 0.875rem;
color: var(--color-text-muted, #555);
background: transparent;
border: 1px solid var(--color-border, #cff2dc);
border-radius: 6px;
cursor: pointer;
transition: background 0.2s, color 0.2s;
-webkit-tap-highlight-color: transparent;
}
.home-sign-out:hover {
background: var(--color-surface, #ffffff);
color: var(--color-text, #1a1a1a);
}
.home-main {
max-width: 720px;
margin: 0 auto;
background: var(--color-surface, #ffffff);
padding: clamp(1rem, 4vw, 2rem);
border-radius: 12px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
min-width: 0;
}
.home-welcome {
margin: 0 0 0.5rem;
font-size: clamp(1.15rem, 3vw, 1.35rem);
color: var(--color-text, #1a1a1a);
word-break: break-word;
}
.home-sub {
margin: 0;
color: var(--color-text-muted, #555);
font-size: clamp(0.875rem, 2vw, 0.95rem);
}
.home-login-link {
display: inline-block;
margin-top: 1rem;
min-height: 48px;
padding: 0.75rem 1.25rem;
line-height: 1.25;
color: #fff;
background: var(--color-primary, #1be62c);
border-radius: 8px;
text-decoration: none;
font-weight: 500;
transition: background 0.2s;
-webkit-tap-highlight-color: transparent;
}
.home-login-link:hover {
background: var(--color-primary-hover, #18c925);
}
/* Small screens: stack header and tighten spacing */
@media (max-width: 480px) {
.home-header {
flex-direction: column;
align-items: flex-start;
}
to {
transform: rotate(360deg);
.home-user {
width: 100%;
}
.home-username {
max-width: none;
}
}
@media (prefers-reduced-motion: no-preference) {
a:nth-of-type(2) .logo {
animation: logo-spin infinite 20s linear;
}
}
.card {
padding: 2em;
}
.read-the-docs {
color: #888;
}