Files
xamxam/public/assets/main.css

411 lines
7.0 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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: 2;
min-height: 0;
}
main {
flex: 7;
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;
position: relative;
padding: 1rem;
box-sizing: border-box;
overflow: hidden;
display: flex;
flex-direction: column;
}
.cards-container {
display: grid;
gap: 0.75rem;
flex: 1;
min-height: 0;
padding: 0.5rem;
overflow: hidden;
}
/* Default: 3 rows × 4 columns = 12 items */
.cards-container {
grid-template-rows: repeat(3, 1fr);
grid-template-columns: repeat(4, 1fr);
grid-auto-flow: row;
}
/* Small screens: 2 rows × 3 columns = 6 items */
@media (max-width: 1200px) {
.cards-container {
grid-template-rows: repeat(2, 1fr);
grid-template-columns: repeat(3, 1fr);
}
}
/* Medium screens: 3 rows × 4 columns = 12 items */
@media (min-width: 1201px) and (max-width: 1500px) {
.cards-container {
grid-template-rows: repeat(3, 1fr);
grid-template-columns: repeat(4, 1fr);
}
}
/* Large screens: 3 rows × 6 columns = 18 items */
@media (min-width: 1701px) {
.cards-container {
grid-template-rows: repeat(3, 1fr);
grid-template-columns: repeat(6, 1fr);
}
}
/* Extra large screens: 4 rows × 6 columns = 24 items */
@media (min-width: 2000px) {
.cards-container {
grid-template-rows: repeat(4, 1fr);
grid-template-columns: repeat(6, 1fr);
}
}
/* Mobile placeholder (will adjust later) */
@media (max-width: 768px) {
.cards-container {
grid-template-rows: repeat(2, 1fr);
grid-template-columns: repeat(2, 1fr);
}
}
.card-link {
text-decoration: none;
color: inherit;
display: block;
height: 100%;
}
.card {
background: #eee;
border-radius: 8px;
padding: 0.5rem;
height: 100%;
width: 100%;
box-sizing: border-box;
transition: transform 0.2s, box-shadow 0.2s;
display: flex;
flex-direction: column;
overflow: hidden;
min-width: 0;
min-height: 0;
}
.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.3rem;
height: 100%;
overflow: hidden;
}
.card .title {
font-size: 0.75rem;
font-weight: 600;
margin: 0;
line-height: 1.15;
color: #333;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.card .authors {
font-size: 0.65rem;
margin: 0;
color: #666;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.card .year {
font-size: 0.65rem;
margin: 0;
color: #9557b5;
font-weight: 600;
}
.card .tags {
display: flex;
flex-wrap: wrap;
gap: 0.2rem;
margin-top: auto;
padding-top: 0.2rem;
}
.card .tag {
font-size: 0.55rem;
padding: 0.15rem 0.25rem;
background: rgba(149, 87, 181, 0.15);
color: #7a3d95;
border-radius: 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
font-weight: 500;
}
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: 0.75rem;
background: rgba(255, 255, 255, 0.1);
border-radius: 10px;
margin-top: 1rem;
width: fit-content;
align-self: center;
flex-shrink: 0;
}
.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;
}