MediaWiki:BentoGrid.css: Difference between revisions
From The Seven Sages of Rome
No edit summary |
No edit summary |
||
Line 55: | Line 55: | ||
} | } | ||
#bento-item- | #bento-item-image { | ||
background-size: cover; | background-size: cover; | ||
background-position: center; | background-position: center; | ||
Line 68: | Line 67: | ||
} | } | ||
#bento-item- | #bento-item-image:hover { | ||
filter: grayscale(0%); | filter: grayscale(0%); | ||
} | } | ||
/* Create a dark overlay */ | /* Create a dark overlay */ | ||
#bento-item- | #bento-item-image::before { | ||
content: ""; | content: ""; | ||
position: absolute; | position: absolute; | ||
Line 87: | Line 86: | ||
/* Ensure text is on top of overlay */ | /* Ensure text is on top of overlay */ | ||
#bento-item- | #bento-item-image * { | ||
position: relative; | position: relative; | ||
z-index: 1; | z-index: 1; | ||
} | } | ||
#bento-item- | #bento-item-image a { | ||
color: white !important; | color: white !important; | ||
} | } | ||
#bento-item- | #bento-item-image p { | ||
color: white !important; | color: white !important; | ||
} | |||
/* Individual Bento Image Cards */ | |||
#bento-item-manuscript { | |||
background-image: url('https://db.seven-sages-of-rome.org/images/f/f5/BL_IO_Islamic_3214%2C_fol._29v.jpeg'); | |||
} | |||
#bento-item-print { | |||
background-image: url('https://db.seven-sages-of-rome.org/images/4/49/Bento_1.jpg'); | |||
} | } |
Revision as of 08:39, 30 January 2025
/* Bento Grid */
.bento-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 15px;
padding: 15px;
}
.bento-item {
background-color: #f8f9fa;
border-radius: 10px;
padding: 20px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
transition: all 0.3s ease;
}
.bento-item:hover {
transform: translateY(-5px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.bento-item h3 {
margin-bottom: 10px;
}
.bento-item p {
margin-bottom: 0;
}
.bento-item-primary {
grid-column: span 2;
grid-row: span 2;
background-color: transparent;
}
.bento-item-wide {
grid-column: span 2;
}
@media (max-width: 768px) {
.bento-grid {
grid-template-columns: repeat(2, 1fr);
}
.bento-item-primary,
.bento-item-regular,
.bento-item-wide {
grid-column: span 2;
}
}
#bento-item-image {
background-size: cover;
background-position: center;
background-repeat: no-repeat;
width: 100%;
height: 100%;
filter: grayscale(70%);
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
#bento-item-image:hover {
filter: grayscale(0%);
}
/* Create a dark overlay */
#bento-item-image::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5); /* Adjust transparency (0.3-0.6 works well) */
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
/* Ensure text is on top of overlay */
#bento-item-image * {
position: relative;
z-index: 1;
}
#bento-item-image a {
color: white !important;
}
#bento-item-image p {
color: white !important;
}
/* Individual Bento Image Cards */
#bento-item-manuscript {
background-image: url('https://db.seven-sages-of-rome.org/images/f/f5/BL_IO_Islamic_3214%2C_fol._29v.jpeg');
}
#bento-item-print {
background-image: url('https://db.seven-sages-of-rome.org/images/4/49/Bento_1.jpg');
}