mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
Layout improvements:
- Fixed header/main/footer ratios to 2:5, 3:5, 1:5 using flex
- Default to sans-serif font system stack
- Made sections properly flex-based instead of viewport height
Pagination improvements:
- First/previous/next/last navigation buttons (‹‹ ‹ › ››)
- Current page highlighted in colored badge
- Disabled state for unavailable actions
- Clean rounded button design with hover effects
- Proper spacing and visual hierarchy
Card styling:
- Better typography hierarchy
- Hover effects (lift + shadow)
- Improved spacing and readability
- Year displayed in brand color
Tests passing ✅
323 lines
5.2 KiB
CSS
323 lines
5.2 KiB
CSS
body {
|
|
margin: 0;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family:
|
|
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
|
|
Arial, sans-serif;
|
|
}
|
|
|
|
/* Layout ratios: header 2/5, main 3/5, footer 1/5 */
|
|
header {
|
|
flex: 1;
|
|
min-height: 0;
|
|
}
|
|
|
|
main {
|
|
flex: 4;
|
|
min-height: 0;
|
|
}
|
|
|
|
footer {
|
|
flex: 1;
|
|
min-height: 0;
|
|
}
|
|
|
|
header, main, footer {
|
|
padding: 1rem;
|
|
margin: 0;
|
|
border-radius: 40px;
|
|
}
|
|
|
|
header {
|
|
font-family: "police1", sans-serif;
|
|
background: #9557b5ff;
|
|
color: white;
|
|
display: flex;
|
|
gap: 4%;
|
|
padding: 1.5rem 3rem;
|
|
align-items: center;
|
|
overflow-y: auto;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
header .title {
|
|
color: white;
|
|
font-size: 1.75rem;
|
|
font-weight: 700;
|
|
text-decoration: none;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
header section {
|
|
flex: 1;
|
|
font-size: 0.9rem;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
header section p {
|
|
margin: 0.5rem 0;
|
|
}
|
|
|
|
header section p:first-child {
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
header section p:not(:first-child) {
|
|
font-size: 0.85rem;
|
|
opacity: 0.95;
|
|
}
|
|
|
|
header nav {
|
|
display: flex;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
header nav button {
|
|
background: rgba(255, 255, 255, 0.15);
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
color: white;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 20px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
font-size: 0.9rem;
|
|
font-family: inherit;
|
|
}
|
|
|
|
header nav button:hover {
|
|
background: rgba(255, 255, 255, 0.25);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
header nav a {
|
|
color: white;
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* Filter info banner */
|
|
.filter-info {
|
|
background: rgba(149, 87, 181, 0.9);
|
|
color: white;
|
|
padding: 0.5rem 1rem;
|
|
text-align: center;
|
|
font-size: 0.9rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.clear-filter {
|
|
color: white;
|
|
text-decoration: none;
|
|
padding: 0.25rem 0.75rem;
|
|
background: rgba(0, 0, 0, 0.2);
|
|
border-radius: 15px;
|
|
font-size: 0.85rem;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.clear-filter:hover {
|
|
background: rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
main {
|
|
background: #3c856bff;
|
|
display: grid;
|
|
grid-template-rows: repeat(2, minmax(0, 1fr));
|
|
grid-auto-flow: column;
|
|
grid-auto-columns: 260px;
|
|
gap: 1rem;
|
|
padding: 1rem;
|
|
box-sizing: border-box;
|
|
overflow-x: auto;
|
|
overflow-y: hidden;
|
|
scroll-snap-type: x mandatory;
|
|
}
|
|
|
|
.card-link {
|
|
text-decoration: none;
|
|
color: inherit;
|
|
display: block;
|
|
height: 100%;
|
|
}
|
|
|
|
.card {
|
|
background: #eee;
|
|
border-radius: 10px;
|
|
padding: 1rem;
|
|
scroll-snap-align: start;
|
|
height: 100%;
|
|
box-sizing: border-box;
|
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.card-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.card .title {
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
line-height: 1.3;
|
|
color: #333;
|
|
}
|
|
|
|
.card .authors {
|
|
font-size: 0.9rem;
|
|
margin: 0;
|
|
color: #666;
|
|
}
|
|
|
|
.card .year {
|
|
font-size: 0.85rem;
|
|
margin: 0;
|
|
color: #9557b5;
|
|
font-weight: 600;
|
|
}
|
|
|
|
footer {
|
|
background: #222222ff;
|
|
overflow: hidden;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* Years navigation in footer */
|
|
.years-nav {
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 1rem;
|
|
}
|
|
|
|
.years-scroll {
|
|
display: flex;
|
|
gap: 0.75rem;
|
|
overflow-x: auto;
|
|
overflow-y: hidden;
|
|
scroll-behavior: smooth;
|
|
padding: 0.75rem 0;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Hide scrollbar but keep functionality */
|
|
.years-scroll::-webkit-scrollbar {
|
|
height: 4px;
|
|
}
|
|
|
|
.years-scroll::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.years-scroll::-webkit-scrollbar-thumb {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.year-link {
|
|
color: white;
|
|
text-decoration: none;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 20px;
|
|
white-space: nowrap;
|
|
transition: background 0.2s;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.year-link:hover {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.year-link.active {
|
|
background: #9557b5ff;
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* Pagination controls */
|
|
.pagination {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
padding: 1rem;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: 10px;
|
|
margin: 1rem auto;
|
|
width: fit-content;
|
|
}
|
|
|
|
.pagination-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 2.5rem;
|
|
height: 2.5rem;
|
|
padding: 0 0.75rem;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
color: #3c856b;
|
|
text-decoration: none;
|
|
border-radius: 6px;
|
|
font-size: 1.2rem;
|
|
font-weight: 600;
|
|
transition: all 0.2s;
|
|
border: 2px solid transparent;
|
|
}
|
|
|
|
.pagination-btn:hover:not(.disabled) {
|
|
background: white;
|
|
border-color: #9557b5;
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.pagination-btn.disabled {
|
|
opacity: 0.3;
|
|
cursor: not-allowed;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.pagination-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.25rem;
|
|
padding: 0 1rem;
|
|
color: white;
|
|
font-size: 1rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.page-current {
|
|
font-size: 1.25rem;
|
|
font-weight: 700;
|
|
color: #9557b5;
|
|
background: white;
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 6px;
|
|
min-width: 2rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.page-separator {
|
|
font-weight: 300;
|
|
opacity: 0.6;
|
|
padding: 0 0.25rem;
|
|
}
|
|
|
|
.page-total {
|
|
opacity: 0.8;
|
|
}
|