Template:ProjectCard/styles.css: Difference between revisions
Template page
More actions
No edit summary |
Removed badges, refactored to Template:ProjectBadges/styles.css |
||
| Line 173: | Line 173: | ||
position: relative; | position: relative; | ||
z-index: 20; /* Sit above the card link */ | z-index: 20; /* Sit above the card link */ | ||
} | } | ||
Latest revision as of 00:14, 3 April 2026
/* Template:ProjectCard/styles.css */
.project-card-wrap {
display: inline-block;
vertical-align: top;
margin: 10px;
}
.project-card {
width: 300px;
background-color: var(--color-surface-1);
border: 1px solid;
border-top-color: var(--border-color-base);
border-right-color: var(--border-color-base);
border-bottom-color: var(--border-color-base);
border-left-color: var(--border-color-base);
border-radius: 4px;
box-shadow: 0 1px 3px rgba(0,0,0,0.07);
overflow: hidden;
box-sizing: border-box;
position: relative;
text-align: left;
transition: box-shadow 0.2s, border-top-color 0.2s, border-right-color 0.2s, border-bottom-color 0.2s, border-left-color 0.2s, transform 0.2s;
}
.project-card:hover {
box-shadow: 0 4px 16px rgba(0,0,0,0.15);
border-top-color: var(--wiki-primary);
border-right-color: var(--wiki-primary);
border-bottom-color: var(--wiki-primary);
border-left-color: var(--wiki-primary);
transform: translateY(-2px);
}
/* Sanitizer-Safe 2D Flip Logic */
.project-card-inner {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.project-card-front {
display: block;
width: 100%;
}
.project-card-back {
display: none;
width: 100%;
height: 100%;
padding: 20px;
box-sizing: border-box;
background-color: var(--color-surface-1);
color: var(--color-base);
flex-direction: column;
}
.project-card-inner.is-flipped .project-card-front {
display: none;
}
.project-card-inner.is-flipped .project-card-back {
display: flex;
}
.project-card-back-header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid;
border-bottom-color: var(--border-color-base);
padding-bottom: 8px;
margin-bottom: 12px;
}
.project-card-back-title {
font-weight: bold;
font-size: 0.95em;
color: var(--wiki-primary);
}
.project-card-back-content {
font-size: 0.9em;
line-height: 1.5;
overflow-y: auto;
}
.project-card-flip-btn {
background: none;
border: none;
color: var(--wiki-primary);
font-size: 0.85em;
font-weight: bold;
cursor: pointer;
padding: 0;
margin-left: auto;
position: relative;
z-index: 30; /* Higher than the 10 of the card link */
}
.project-card-flip-btn:hover {
text-decoration: underline;
}
.project-card-image {
width: 100%;
height: 300px;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--color-surface-2);
overflow: hidden;
position: relative;
z-index: 0;
}
.project-card-image img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.project-card-image-fallback {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background-color: var(--color-surface-2);
border-bottom: 1px solid;
border-bottom-color: var(--border-color-base);
}
.project-card-body {
padding: 12px 14px 14px;
}
.project-card-title {
font-weight: bold;
font-size: 1em;
line-height: 1.3;
margin-bottom: 7px;
display: block;
}
.project-card-title a {
color: var(--color-base);
text-decoration: none;
display: block;
}
/* This creates the full-card clickable area */
.project-card-title a::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
}
.project-card:hover .project-card-title a {
color: var(--wiki-primary);
}
.project-card-badges {
display: flex;
flex-wrap: wrap;
gap: 5px;
margin-bottom: 7px;
position: relative;
z-index: 20; /* Sit above the card link */
}
.project-card-creator,
.project-card-label {
font-size: 0.82em;
color: var(--color-base--subtle);
position: relative;
z-index: 20;
}
.project-card-creator { margin-bottom: 6px; }
.project-card-extra {
font-size: 0.8em;
color: var(--color-base--subtle);
line-height: 1.4;
margin-bottom: 3px;
position: relative;
z-index: 20;
}
.project-card-extra strong { color: var(--color-base); }
.project-card-tags {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-top: 8px;
margin-bottom: 6px;
position: relative;
z-index: 20;
}
.project-card-tag {
display: inline-block;
background-color: var(--wiki-primary-subtle);
color: var(--wiki-primary);
font-size: 0.72em;
font-weight: bold;
padding: 2px 7px;
border-radius: 3px;
white-space: nowrap;
}
.project-card-footer {
display: flex;
gap: 10px;
margin-top: 8px;
padding-top: 8px;
border-top: 1px solid;
border-top-color: var(--border-color-base);
font-size: 0.75em;
color: var(--color-base--subtle);
position: relative;
z-index: 20; /* Ensures buttons/text in footer are clickable */
}
.project-card-meta-item::before { content: '⏳'; font-size: 0.85em; margin-right: 3px; opacity: 0.5; }
.project-card-contributors.loaded::before { content: '👤'; }
.project-card-updated.loaded::before { content: '🕐'; }