Improved image expansion in Projects. Introduced Mods page.
This commit is contained in:
258
styles/mods.css
Normal file
258
styles/mods.css
Normal file
@@ -0,0 +1,258 @@
|
||||
|
||||
/* ---- mods tab ---- */
|
||||
|
||||
.mod-games {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
/* ---- game section ---- */
|
||||
|
||||
.mod-game {
|
||||
background: var(--bg-raised);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 20px 20px 22px;
|
||||
transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out),
|
||||
border-color 0.2s ease;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mod-game-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
.mod-game-chevron {
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
color: var(--muted);
|
||||
transition: transform 0.2s var(--ease-out);
|
||||
}
|
||||
|
||||
.mod-game-heading {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 10px;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.mod-game-title {
|
||||
font-family: var(--mono);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.mod-game-platform {
|
||||
font-family: var(--mono);
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.mod-game-count {
|
||||
flex: 0 0 auto;
|
||||
font-family: var(--mono);
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
padding: 2px 8px;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mod-game-description {
|
||||
font-family: var(--sans);
|
||||
font-size: 13px;
|
||||
line-height: var(--leading-normal);
|
||||
color: var(--fg-secondary);
|
||||
margin: 10px 0 0 20px;
|
||||
}
|
||||
|
||||
/* ---- mod list ---- */
|
||||
|
||||
.mod-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
margin: 16px 0 0 20px;
|
||||
}
|
||||
|
||||
.mod-list-empty {
|
||||
font-family: var(--mono);
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
margin: 16px 0 0 20px;
|
||||
}
|
||||
|
||||
/* ---- mod card ---- */
|
||||
|
||||
.mod-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
padding: 16px;
|
||||
border-radius: var(--radius-md);
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s var(--ease-out);
|
||||
}
|
||||
|
||||
.mod-card-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.mod-card-title {
|
||||
font-family: var(--mono);
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
transition: color 0.2s ease;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mod-card-version {
|
||||
flex: 0 0 auto;
|
||||
font-family: var(--mono);
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mod-card-description {
|
||||
font-family: var(--sans);
|
||||
font-size: 13px;
|
||||
line-height: var(--leading-normal);
|
||||
color: var(--fg-secondary);
|
||||
margin: 0 0 14px 0;
|
||||
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
line-clamp: 3;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.mod-card-foot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
/* Keeps the link pinned to the bottom when neighbouring cards are taller. */
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.mod-card-tags {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
flex-wrap: wrap;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mod-tag {
|
||||
font-family: var(--mono);
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 500;
|
||||
color: var(--accent);
|
||||
background: var(--accent-bg);
|
||||
padding: 2px 8px;
|
||||
border-radius: var(--radius-sm);
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
.mod-card-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
flex: 0 0 auto;
|
||||
font-family: var(--mono);
|
||||
font-size: var(--text-xs);
|
||||
padding: 5px 10px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--bg);
|
||||
white-space: nowrap;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
/* ---- narrow layout: single column, less per card ---- */
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.mod-games {
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.mod-game {
|
||||
padding: 16px 14px 18px;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.mod-game-title {
|
||||
font-size: var(--text-base);
|
||||
}
|
||||
|
||||
/* The platform line and the game blurb are context, not content -- the
|
||||
narrow layout drops them and keeps the mod list itself. */
|
||||
.mod-game-platform,
|
||||
.mod-game-description {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mod-list,
|
||||
.mod-list-empty {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
margin-left: 0;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.mod-card {
|
||||
padding: 12px 14px;
|
||||
}
|
||||
|
||||
.mod-card-head {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.mod-card-description {
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* Tags are the first thing to go: the title, blurb and link carry the card. */
|
||||
.mod-card-tags {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mod-card-link {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.mod-game,
|
||||
.mod-card,
|
||||
.mod-game-chevron {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user