Template:ProjectCard/styles.css: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 19: | Line 19: | ||
box-sizing: border-box; | box-sizing: border-box; | ||
position: relative; | position: relative; | ||
text-align: left; | text-align: left; | ||
transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s; | 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; | ||
} | } | ||
| Line 31: | Line 30: | ||
border-left-color: var(--wiki-primary); | border-left-color: var(--wiki-primary); | ||
transform: translateY(-2px); | 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: 20; /* Keeps button clickable over title overlay */ | |||
} | |||
.project-card-flip-btn:hover { | |||
text-decoration: underline; | |||
} | } | ||
| Line 192: | Line 262: | ||
.project-card-contributors.loaded::before { content: '👤'; } | .project-card-contributors.loaded::before { content: '👤'; } | ||
.project-card-updated.loaded::before { content: '🕐'; } | .project-card-updated.loaded::before { content: '🕐'; } | ||
Revision as of 02:59, 2 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: 20; /* Keeps button clickable over title overlay */
}
.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 dashed;
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;
}
.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: 1;
}
.project-badge-status {
display: inline-block;
font-size: 0.72em;
font-weight: bold;
padding: 2px 8px;
border-radius: 3px;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.project-badge-status--active { background-color: rgba(40, 167, 69, 0.15); color: #28a745; }
.project-badge-status--hiatus { background-color: rgba(255, 193, 7, 0.20); color: #b8860b; }
.project-badge-status--completed { background-color: var(--wiki-primary-subtle); color: var(--wiki-primary); }
.project-badge-status--abandoned { background-color: rgba(108, 117, 125, 0.15); color: #6c757d; }
.project-badge-license {
display: inline-block;
font-size: 0.72em;
font-weight: bold;
padding: 2px 8px;
border-radius: 3px;
background-color: var(--color-surface-2);
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);
color: var(--color-base--subtle);
}
.project-card-creator,
.project-card-label {
font-size: 0.82em;
color: var(--color-base--subtle);
position: relative;
z-index: 1;
}
.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: 1;
}
.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: 1;
}
.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: 1;
}
.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: '🕐'; }