Template:Main Page/Sandbox/card/styles.css: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 26: | Line 26: | ||
} | } | ||
/* Default hover when no | /* Default hover when no color modifier */ | ||
.home-card:not(.home-card--red):not(.home-card--orange):hover { | .home-card:not(.home-card--red):not(.home-card--orange):not(.home-card--yellow):not(.home-card--green):not(.home-card--blue):not(.home-card--purple):hover { | ||
background: #21262d; | background: #21262d; | ||
border-color: #8b949e; | border-color: #8b949e; | ||
| Line 103: | Line 103: | ||
} | } | ||
/* White text on | /* White text on all full-color cards */ | ||
.home-card--red .home-card__label a, | .home-card--red .home-card__label a, | ||
.home-card--orange .home-card__label a { | .home-card--orange .home-card__label a, | ||
.home-card--yellow .home-card__label a, | |||
.home-card--green .home-card__label a, | |||
.home-card--blue .home-card__label a, | |||
.home-card--purple .home-card__label a { | |||
color: #fff !important; | color: #fff !important; | ||
} | } | ||
.home-card--red .home-card__icon, | .home-card--red .home-card__icon, | ||
.home-card--orange .home-card__icon { | .home-card--orange .home-card__icon, | ||
.home-card--yellow .home-card__icon, | |||
.home-card--green .home-card__icon, | |||
.home-card--blue .home-card__icon, | |||
.home-card--purple .home-card__icon { | |||
filter: none; | filter: none; | ||
} | } | ||
/* Color variants: | /* Color variants: full fill + brighter border (all sides) */ | ||
.home-card--red { | .home-card--red { | ||
background: #5c1a1a; | background: #5c1a1a; | ||
border: | border: 2px solid #e5534b; | ||
} | } | ||
.home-card--red:hover { | .home-card--red:hover { | ||
background: #6e2222; | background: #6e2222; | ||
border-color: # | border-color: #f85149; | ||
} | } | ||
.home-card--orange { | .home-card--orange { | ||
background: # | background: #3b2e25; | ||
border: | border: 2px solid #664c38; | ||
} | } | ||
.home-card--orange:hover { | .home-card--orange:hover { | ||
background: # | background: #4a3828; | ||
border-color: # | border-color: #f0883e; | ||
} | } | ||
.home-card--yellow { | .home-card--yellow { | ||
background: # | background: #3d3520; | ||
border: | border: 2px solid #d4a72c; | ||
} | } | ||
.home-card--yellow:hover { | |||
background: #4a4020; | |||
border-color: #e5b82e; | |||
} | |||
.home-card--green { | .home-card--green { | ||
background: # | background: #1a2e1a; | ||
border: | border: 2px solid #3fb950; | ||
border- | } | ||
.home-card--green:hover { | |||
background: #1e3d1e; | |||
border-color: #56d364; | |||
} | } | ||
.home-card--blue { | .home-card--blue { | ||
background: # | background: #1a2433; | ||
border: | border: 2px solid #58a6ff; | ||
} | } | ||
.home-card--blue:hover { | |||
background: #1e2d44; | |||
border-color: #79c0ff; | |||
} | |||
.home-card--purple { | .home-card--purple { | ||
background: # | background: #2a1a3d; | ||
border: | border: 2px solid #bc8cff; | ||
border- | } | ||
.home-card--purple:hover { | |||
background: #35204a; | |||
border-color: #d2a8ff; | |||
} | } | ||
Revision as of 19:18, 3 February 2026
/* Container for the tile grid */
.resonite-home-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
gap: 12px;
margin: 1em 0 2em 0;
}
/* The Card/Tile */
.home-card {
position: relative;
cursor: pointer;
background: #161b22;
border: 1px solid #30363d;
border-radius: 8px;
padding: 24px 10px;
text-align: center;
transition: background 0.2s, transform 0.1s;
display: flex;
flex-direction: column;
align-items: center;
}
.home-card:hover {
transform: translateY(-2px);
}
/* Default hover when no color modifier */
.home-card:not(.home-card--red):not(.home-card--orange):not(.home-card--yellow):not(.home-card--green):not(.home-card--blue):not(.home-card--purple):hover {
background: #21262d;
border-color: #8b949e;
}
/* Icon: ensure emoji displays (no code-block styling) */
.home-card__icon {
font-size: 2.5em;
margin-bottom: 12px;
line-height: 1;
position: relative;
z-index: 0;
font-family: inherit;
white-space: normal;
}
/* Undo code-block appearance if parser wraps label in <pre> */
.home-card__label pre {
display: inline;
margin: 0;
padding: 0;
font-family: inherit;
font-size: inherit;
white-space: normal;
background: none;
border: none;
}
/* Label: stretch over entire card so the link fills the card (one clickable area) */
.home-card__label {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
padding-bottom: 1em;
}
.home-card__label a {
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
color: #c9d1d9 !important;
font-weight: bold;
text-decoration: none !important;
font-size: 0.95em;
background: none !important;
border: none !important;
border-radius: 0 !important;
padding: 0 !important;
box-shadow: none !important;
}
/* External link: show only label + small icon (no full URL) */
.home-card--external .home-card__label a {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.home-card--external .home-card__label a::after {
content: " \29C9";
font-size: 0.75em;
opacity: 0.85;
white-space: nowrap;
}
/* White text on all full-color cards */
.home-card--red .home-card__label a,
.home-card--orange .home-card__label a,
.home-card--yellow .home-card__label a,
.home-card--green .home-card__label a,
.home-card--blue .home-card__label a,
.home-card--purple .home-card__label a {
color: #fff !important;
}
.home-card--red .home-card__icon,
.home-card--orange .home-card__icon,
.home-card--yellow .home-card__icon,
.home-card--green .home-card__icon,
.home-card--blue .home-card__icon,
.home-card--purple .home-card__icon {
filter: none;
}
/* Color variants: full fill + brighter border (all sides) */
.home-card--red {
background: #5c1a1a;
border: 2px solid #e5534b;
}
.home-card--red:hover {
background: #6e2222;
border-color: #f85149;
}
.home-card--orange {
background: #3b2e25;
border: 2px solid #664c38;
}
.home-card--orange:hover {
background: #4a3828;
border-color: #f0883e;
}
.home-card--yellow {
background: #3d3520;
border: 2px solid #d4a72c;
}
.home-card--yellow:hover {
background: #4a4020;
border-color: #e5b82e;
}
.home-card--green {
background: #1a2e1a;
border: 2px solid #3fb950;
}
.home-card--green:hover {
background: #1e3d1e;
border-color: #56d364;
}
.home-card--blue {
background: #1a2433;
border: 2px solid #58a6ff;
}
.home-card--blue:hover {
background: #1e2d44;
border-color: #79c0ff;
}
.home-card--purple {
background: #2a1a3d;
border: 2px solid #bc8cff;
}
.home-card--purple:hover {
background: #35204a;
border-color: #d2a8ff;
}