Phase 7: Frontend auth — React Router, AuthContext, Login/Register, API client

This commit is contained in:
Suslov-MD
2026-08-16 08:54:31 +00:00
parent 281daa4717
commit ac85d71c65
16 changed files with 578 additions and 3 deletions
+100
View File
@@ -0,0 +1,100 @@
// Глобальные стили News Editor
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
line-height: 1.6;
color: #1a1a2e;
background: #f5f5f5;
}
a {
color: #2563eb;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
h1 {
margin-bottom: 1rem;
font-size: 1.8rem;
}
button {
padding: 0.5rem 1.2rem;
border: none;
border-radius: 6px;
background: #2563eb;
color: #fff;
font-size: 0.95rem;
cursor: pointer;
&:disabled {
opacity: 0.6;
cursor: not-allowed;
}
&:hover:not(:disabled) {
background: #1d4ed8;
}
}
input {
width: 100%;
padding: 0.5rem 0.75rem;
border: 1px solid #d1d5db;
border-radius: 6px;
font-size: 0.95rem;
&:focus {
outline: none;
border-color: #2563eb;
box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
}
// Страница авторизации
.auth-page {
max-width: 400px;
margin: 4rem auto;
padding: 2rem;
background: #fff;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.form-group {
margin-bottom: 1rem;
label {
display: block;
margin-bottom: 0.25rem;
font-weight: 500;
font-size: 0.9rem;
}
}
.error {
color: #dc2626;
font-size: 0.9rem;
margin-bottom: 0.75rem;
}
// Главная страница
.home-page {
max-width: 600px;
margin: 4rem auto;
padding: 2rem;
text-align: center;
p {
margin-bottom: 1.5rem;
}
}