MediaWiki:BentoGrid.css: Difference between revisions

From The Seven Sages of Rome
No edit summary
Tags: Manual revert Reverted
No edit summary
Tags: Manual revert Reverted
Line 79: Line 79:
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
     background: rgba(0, 0, 0, 0.6); /* Adjust transparency (0.3-0.6 works well) */
     background: rgba(0, 0, 0, 0.5); /* Adjust transparency (0.3-0.6 works well) */
     -webkit-border-radius: 10px;
     -webkit-border-radius: 10px;
     -moz-border-radius: 10px;
     -moz-border-radius: 10px;

Revision as of 08:44, 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-color: #D2D4AD;
}