feat: layout and UX improvements

This commit is contained in:
2025-11-15 12:54:00 +01:00
parent f417bebf1a
commit 0a986f4293
3 changed files with 350 additions and 128 deletions

View File

@@ -43,13 +43,15 @@ body {
}
.header-container {
max-width: 1200px;
margin: 0 auto;
width: 100%;
padding: 0 1rem;
}
.header-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 2rem;
column-gap: 0.75rem;
}
.header-left {
@@ -57,6 +59,22 @@ body {
align-items: center;
}
.header-right {
display: flex;
align-items: center;
gap: 0.75rem;
}
.header-fields-container {
width: 100%;
padding-top: 0;
}
.header-fields-container:has(.add-link-wrapper.show),
.header-fields-container:has(.search-wrapper.show) {
padding-top: 0.75rem;
}
.app-title {
display: flex;
align-items: center;
@@ -92,91 +110,46 @@ body {
gap: 0.75rem;
}
.archive-toggle-wrapper {
display: flex;
align-items: center;
gap: 0.5rem;
white-space: nowrap;
}
.toggle-label {
font-size: 0.85rem;
font-weight: 500;
color: var(--text-secondary);
transition: color 0.3s ease;
user-select: none;
}
.archive-toggle-wrapper.active .toggle-label {
color: var(--text-primary);
font-weight: 600;
}
.archive-toggle-wrapper:not(.active) .toggle-label {
color: var(--text-secondary);
font-weight: 500;
}
.archive-toggle {
position: relative;
width: 50px;
height: 26px;
background: var(--surface-light);
/* Archive Toggle Button */
.archive-toggle-btn {
background: transparent;
border: 1px solid var(--border);
border-radius: 13px;
color: var(--text-secondary);
padding: 0.5rem;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
padding: 0;
outline: none;
width: 36px;
height: 36px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
}
.archive-toggle:hover {
.archive-toggle-btn:hover {
background: var(--surface-light);
border-color: var(--secondary-color);
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
color: var(--secondary-color);
}
.archive-toggle.active {
background: var(--secondary-color);
.archive-toggle-btn.active {
background: rgba(139, 92, 246, 0.1);
border-color: var(--secondary-color);
color: var(--secondary-color);
}
.archive-toggle.active:hover {
background: var(--primary-hover);
border-color: var(--primary-hover);
}
.toggle-slider {
position: absolute;
top: 2px;
left: 2px;
.archive-toggle-btn svg {
width: 20px;
height: 20px;
background: white;
border-radius: 50%;
transition: transform 0.3s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.archive-toggle.active .toggle-slider {
transform: translateX(24px);
}
.container {
max-width: 1200px;
margin: 0 auto;
width: 100%;
padding: 1.5rem 1rem;
}
/* Top Section - Modern Unified Design */
.top-section {
margin-bottom: 1.5rem;
animation: fadeIn 0.6s ease-out;
}
.add-link-section {
animation: fadeIn 0.8s ease-out;
}
/* Top Section - Removed since add link is in header now */
.section-subtitle {
color: var(--text-secondary);
@@ -335,18 +308,156 @@ body {
to { transform: rotate(360deg); }
}
/* Search Toggle Button */
.search-toggle-btn {
display: flex;
background: transparent;
border: 1px solid var(--border);
color: var(--text-secondary);
padding: 0.5rem;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
width: 36px;
height: 36px;
flex-shrink: 0;
align-items: center;
justify-content: center;
}
.search-toggle-btn:hover {
background: var(--surface-light);
border-color: var(--primary-color);
color: var(--primary-color);
}
.search-toggle-btn.active {
background: rgba(99, 102, 241, 0.1);
border-color: var(--primary-color);
color: var(--primary-color);
}
.search-toggle-btn svg {
width: 20px;
height: 20px;
}
/* Add Link Toggle Button */
.add-link-toggle-btn {
display: flex;
background: transparent;
border: 1px solid var(--border);
color: var(--text-secondary);
padding: 0.5rem;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
width: 36px;
height: 36px;
flex-shrink: 0;
align-items: center;
justify-content: center;
}
.add-link-toggle-btn:hover {
background: var(--surface-light);
border-color: var(--primary-color);
color: var(--primary-color);
}
.add-link-toggle-btn.active {
background: rgba(99, 102, 241, 0.1);
border-color: var(--primary-color);
color: var(--primary-color);
}
.add-link-toggle-btn svg {
width: 20px;
height: 20px;
}
/* Add Link Wrapper in Header */
.add-link-wrapper {
width: 100%;
margin: 0;
padding: 0;
display: none;
opacity: 0;
transform: translateY(-10px);
transition: opacity 0.3s ease, transform 0.3s ease;
}
.add-link-wrapper.show {
display: block;
opacity: 1;
transform: translateY(0);
}
.add-link-wrapper .link-form {
margin: 0;
padding: 0;
}
.add-link-wrapper .input-wrapper {
margin: 0 !important;
background: rgba(255, 255, 255, 0.05) !important;
border: 1px solid rgba(255, 255, 255, 0.1) !important;
padding: 0.625rem 1rem !important;
border-radius: 12px !important;
height: 44px !important;
display: flex !important;
align-items: center !important;
gap: 0.75rem !important;
box-shadow: none !important;
}
.add-link-wrapper .input-wrapper #linkInput {
padding: 0 !important;
line-height: 1.5 !important;
}
.add-link-wrapper .input-wrapper .btn-add {
width: 32px !important;
height: 32px !important;
padding: 0.375rem !important;
flex-shrink: 0 !important;
}
.add-link-wrapper .input-wrapper .btn-add::after {
font-size: 1.25rem !important;
}
.add-link-wrapper .input-wrapper .btn-loader {
width: 14px !important;
height: 14px !important;
}
.add-link-wrapper .input-wrapper:focus-within {
border-color: var(--primary-color);
background: rgba(99, 102, 241, 0.1);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
/* Search in Header */
.search-wrapper {
display: flex;
width: 100%;
margin: 0;
padding: 0.625rem 1rem;
display: none;
align-items: center;
gap: 0.75rem;
background: rgba(255, 255, 255, 0.05);
padding: 0.625rem 1rem;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.1);
transition: all 0.3s ease;
width: 100%;
min-width: 250px;
opacity: 0;
transform: translateY(-10px);
}
.search-wrapper.show {
display: flex;
opacity: 1;
transform: translateY(0);
}
.search-wrapper:focus-within {
@@ -384,7 +495,7 @@ body {
/* Toast Container */
.toast-container {
position: fixed;
top: 1rem;
bottom: 1rem;
right: 1rem;
z-index: 1000;
display: flex;
@@ -665,7 +776,7 @@ body {
@media (max-width: 768px) {
.toast-container {
top: 0.75rem;
bottom: 0.75rem;
right: 0.75rem;
left: 0.75rem;
align-items: flex-end;
@@ -680,17 +791,12 @@ body {
padding: 0.75rem 0;
}
.header-container {
display: grid;
grid-template-columns: 1fr auto;
grid-template-rows: auto auto;
.header-row {
flex-wrap: wrap;
gap: 0.75rem;
align-items: center;
}
.header-left {
grid-column: 1;
grid-row: 1;
justify-content: flex-start;
}
@@ -703,19 +809,43 @@ body {
}
.header-right {
display: contents;
flex-wrap: wrap;
}
.archive-toggle-wrapper {
grid-column: 2;
grid-row: 1;
flex-shrink: 0;
.add-link-toggle-btn {
display: flex;
}
.add-link-wrapper {
width: 100%;
margin: 0;
padding: 0;
display: none;
opacity: 0;
transform: translateY(-10px);
transition: opacity 0.3s ease, transform 0.3s ease;
}
.add-link-wrapper.show {
display: block;
opacity: 1;
transform: translateY(0);
}
.search-wrapper {
grid-column: 1 / -1;
grid-row: 2;
width: 100%;
margin: 0;
padding: 0.625rem 1rem;
display: none;
opacity: 0;
transform: translateY(-10px);
transition: opacity 0.3s ease, transform 0.3s ease;
}
.search-wrapper.show {
display: flex;
opacity: 1;
transform: translateY(0);
}
.link-actions {
@@ -790,8 +920,8 @@ body {
@media (max-width: 400px) {
.header-right {
flex-direction: column;
gap: 0.75rem;
flex-wrap: nowrap;
gap: 0.5rem;
}
.search-wrapper {