MediaWiki:BentoGrid.css: Difference between revisions

From The Seven Sages of Rome
No edit summary
Tag: Reverted
No edit summary
 
(21 intermediate revisions by the same user not shown)
Line 26: Line 26:
.bento-item h3 {
.bento-item h3 {
     margin-bottom: 10px;
     margin-bottom: 10px;
}
.bento-item h3 span a {
    color: black !important;
}
}


Line 34: Line 38:
.bento-item-primary {
.bento-item-primary {
     grid-column: span 2;
     grid-column: span 2;
     grid-row: span 2;
     grid-row: span 6;
     background-color: transparent;
     background-color: transparent;
}
}
Line 42: Line 46:
}
}


@media (max-width: 768px) {
@media (max-width: 1035px) {
     .bento-grid {
     .bento-grid {
         grid-template-columns: repeat(2, 1fr);
         grid-template-columns: repeat(2, 1fr);
Line 55: Line 59:
}
}


.bento-item-image {
/* Ensure maps fit inside bento items */
    background-size: cover;
.bento-item .content-container {
    background-position: center;
    background-repeat: no-repeat;
     width: 100%;
     width: 100%;
     height: 100%;
     height: 300px; /* Adjust as needed */
    filter: grayscale(70%);
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
}
}


.bento-item-image:hover {
/* Override Semantic MediaWiki map container if needed */
filter: grayscale(0%);
.bento-item .smw-map-container {
    width: 100% !important;
    height: 100% !important;
}
}


/* Create a dark overlay */
/* Optional: Give the map-container a border radius like your cards */
#bento-item-image::before {
.content-container {
    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;
     border-radius: 10px;
}
     overflow: hidden;
 
/* 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-color: #D2D4AD;
}
}

Latest revision as of 18:35, 24 March 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 h3 span a {
    color: black !important;
}

.bento-item p {
    margin-bottom: 0;
}

.bento-item-primary {
    grid-column: span 2;
    grid-row: span 6;
    background-color: transparent;
}

.bento-item-wide {
    grid-column: span 2;
}

@media (max-width: 1035px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-item-primary,
    .bento-item-regular,
    .bento-item-wide {
        grid-column: span 2;
    }
   
}

/* Ensure maps fit inside bento items */
.bento-item .content-container {
    width: 100%;
    height: 300px; /* Adjust as needed */
}

/* Override Semantic MediaWiki map container if needed */
.bento-item .smw-map-container {
    width: 100% !important;
    height: 100% !important;
}

/* Optional: Give the map-container a border radius like your cards */
.content-container {
    border-radius: 10px;
    overflow: hidden;
}