Template:Content/styles.css: Difference between revisions

From Delanor Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(20 intermediate revisions by the same user not shown)
Line 8: Line 8:
}
}


/* Each tile card (image + text container) */
/* Tile container */
.tile-row > div {
.tile {
     width: 180px;
     width: 180px;
     height: 220px;
     height: 240px;
     padding: 0.5em;
     padding: 0.5em;
     background: #fdfaf3;
     background: var(--mw-content-background-color, #f5f0dc);
     border: 1px solid #c8b68e; /* ✅ Visible border around the whole tile */
     border: 1px solid var(--mw-content-border-color, #c8b68e);
     border-radius: 6px;
     border-radius: 6px;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* optional soft shadow */
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
    justify-content: space-between;  /* ✅ Push label to bottom */
     align-items: center;
     align-items: center;
     text-align: center;
     text-align: center;
     transition: transform 0.2s;
     transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    overflow: hidden;
    color: var(--mw-text-color, #222);
}
}


.tile-row > div:hover {
/* Hover effect */
.tile:hover {
     transform: scale(1.03);
     transform: scale(1.03);
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
}


/* Image container */
/* Image wrapper fills remaining vertical space */
.tile-top {
.tile-top {
     width: 100%;
     width: 100%;
     height: 100px;
     flex-grow: 1;                     /* ✅ Expand into all space except label */
    margin-bottom: 0.8em;
     display: flex;
     display: flex;
     justify-content: center;
     justify-content: center;
     align-items: center;
     align-items: center;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0;
}
}


/* Image scaling */
/* Image auto-crops to fit tile nicely */
.tile-top img {
.tile-top img {
     max-height: 100%;
     width: 100%;
     max-width: 100%;
    height: 100%;
     object-fit: cover;                /* ✅ Crop if necessary */
    display: block;
}
 
.equipment-stats-tile .tile-top img {
    width: 140px;
    height: 140px;
     object-fit: contain;
     object-fit: contain;
     display: block;
     image-rendering: pixelated;
}
}


/* Label styling */
/* Text label at the bottom */
.tile-bottom {
.tile-bottom {
     font-size: 1em;
     font-size: 1.2em;
     font-weight: 500;
    font-family: "Linux Libertine", Georgia, serif;  /* Serif style like wiki headings */
     color: #222;
     font-weight: normal;                             /* ✅ Not bold */
     text-align: center;
     width: 100%;
     width: 100%;
     text-align: center;
     padding: 0.6em 0 0.3em 0;
    margin: 0;
    border: none;
     background: none;
     background: none;
     border: none;
     box-sizing: border-box;
     padding: 0;
     line-height: 1.4;
}
}


/* Remove MediaWiki default link styles */
 
.tile-bottom a {
/* Remove default link styles */
.tile-bottom a,
.tile-top a {
     all: unset;
     all: unset;
     font-size: inherit;
     font-size: inherit;
     font-weight: inherit;
     font-weight: inherit;
     color: inherit;
     color: inherit;
    cursor: pointer;
     display: inline-block;
     display: inline-block;
     text-align: center;
     text-align: center;
     line-height: 1.4;
     line-height: 1.4;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}
}


.tile-bottom a:hover {
.tile-bottom a:hover,
.tile-top a:hover {
     text-decoration: underline;
     text-decoration: underline;
    color: #000;
}
}


/* Responsive tweak */
/* Mobile responsiveness */
@media (max-width: 800px) {
@media (max-width: 800px) {
     .tile-row > div {
     .tile {
         flex: 1 1 45%;
         width: 45%;
        height: auto;
    }
 
    .tile-top {
         height: auto;
         height: auto;
     }
     }
}
}

Latest revision as of 07:06, 26 July 2025

.tile-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2em;
    margin: 2em auto;
    max-width: 1200px;
}

/* Tile container */
.tile {
    width: 180px;
    height: 240px;
    padding: 0.5em;
    background: var(--mw-content-background-color, #f5f0dc);
    border: 1px solid var(--mw-content-border-color, #c8b68e);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;   /* ✅ Push label to bottom */
    align-items: center;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    overflow: hidden;
    color: var(--mw-text-color, #222);
}

/* Hover effect */
.tile:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Image wrapper fills remaining vertical space */
.tile-top {
    width: 100%;
    flex-grow: 1;                     /* ✅ Expand into all space except label */
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0;
}

/* Image auto-crops to fit tile nicely */
.tile-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;                /* ✅ Crop if necessary */
    display: block;
}

.equipment-stats-tile .tile-top img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    image-rendering: pixelated;
}

/* Text label at the bottom */
.tile-bottom {
    font-size: 1.2em;
    font-family: "Linux Libertine", Georgia, serif;  /* Serif style like wiki headings */
    font-weight: normal;                             /* ✅ Not bold */
    text-align: center;
    width: 100%;
    padding: 0.6em 0 0.3em 0;
    margin: 0;
    border: none;
    background: none;
    box-sizing: border-box;
    line-height: 1.4;
}


/* Remove default link styles */
.tile-bottom a,
.tile-top a {
    all: unset;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    display: inline-block;
    text-align: center;
    line-height: 1.4;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.tile-bottom a:hover,
.tile-top a:hover {
    text-decoration: underline;
    color: #000;
}

/* Mobile responsiveness */
@media (max-width: 800px) {
    .tile {
        width: 45%;
        height: auto;
    }

    .tile-top {
        height: auto;
    }
}