Compare commits
4 commits
a9330d1570
...
54b3304f2f
Author | SHA1 | Date | |
---|---|---|---|
|
54b3304f2f | ||
|
e99d6a2eaf | ||
|
262ed4d526 | ||
|
86f1c62eed |
4 changed files with 62 additions and 32 deletions
|
@ -8,7 +8,7 @@
|
||||||
sizes="(min-width: 64em) 500px, 250px"
|
sizes="(min-width: 64em) 500px, 250px"
|
||||||
></eleventy-image
|
></eleventy-image
|
||||||
><span class="no-image" webc:else>Here you would see an illustration… If I had one…</span>
|
><span class="no-image" webc:else>Here you would see an illustration… If I had one…</span>
|
||||||
<figcaption class="info">
|
<figcaption class="caption">
|
||||||
<p class="title" @text="ability.name"></p>
|
<p class="title" @text="ability.name"></p>
|
||||||
<p class="description" @text="ability.description"></p>
|
<p class="description" @text="ability.description"></p>
|
||||||
</figcaption>
|
</figcaption>
|
||||||
|
@ -17,21 +17,26 @@
|
||||||
<style>
|
<style>
|
||||||
.ability {
|
.ability {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr;
|
grid-template:
|
||||||
justify-items: center;
|
'image' 15em
|
||||||
align-items: center;
|
'caption' 1fr / 1fr;
|
||||||
|
place-items: center;
|
||||||
gap: 1.5em;
|
gap: 1.5em;
|
||||||
|
|
||||||
margin-block: 1.5em;
|
margin-block: 1.5em;
|
||||||
margin-inline: 0;
|
margin-inline: 0;
|
||||||
|
|
||||||
@media (min-width: 45em) {
|
@media (min-width: 45em) {
|
||||||
grid-template-columns: auto 1fr;
|
grid-template: 'image caption' 1fr / 15em 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
& .image,
|
& .image,
|
||||||
& .no-image {
|
& .no-image {
|
||||||
max-width: 15em;
|
grid-area: image;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 15em;
|
||||||
|
height: 15em;
|
||||||
}
|
}
|
||||||
|
|
||||||
& .image {
|
& .image {
|
||||||
|
@ -41,13 +46,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
& .no-image {
|
& .no-image {
|
||||||
align-content: center;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
border: 0.125em dashed var(--clr-box-border);
|
border: 0.125em dashed var(--clr-box-border);
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
aspect-ratio: 1/1;
|
& .caption {
|
||||||
|
grid-area: caption;
|
||||||
}
|
}
|
||||||
|
|
||||||
& .title {
|
& .title {
|
||||||
|
|
|
@ -1,63 +1,85 @@
|
||||||
<ul class="character-colors">
|
<ul class="character-colors">
|
||||||
<li class="color" webc:for="color of colors">
|
<li class="color" webc:for="color of colors">
|
||||||
<div class="color-box" @attributes="({ style: `background-color: ${color.value}`})"></div>
|
<div class="color-box" @attributes="({ style: `background-color: ${color.value}`})"></div>
|
||||||
<div class="content">
|
<p class="heading" @text="color.name"></p>
|
||||||
<p class="heading" @text="color.name"></p>
|
<p class="value" @text="color.value"></p>
|
||||||
<p class="text" @text="color.value"></p>
|
|
||||||
</div>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.character-colors {
|
.character-colors {
|
||||||
--color-box-size: 5.5em;
|
--columns: repeat(auto-fit, minmax(15em, 1fr));
|
||||||
|
--clearance: 0.25rem;
|
||||||
|
--color-box-size: calc(var(--clearance) * 14);
|
||||||
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(8em, 1fr));
|
grid-template-columns: var(--columns);
|
||||||
gap: 1em;
|
gap: 0.75em;
|
||||||
|
|
||||||
margin-block: 2em;
|
margin-block: 2em;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
|
@media (min-width: 35em) {
|
||||||
|
--color-box-size: 5em;
|
||||||
|
--columns: repeat(auto-fit, minmax(8em, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
& .color {
|
& .color {
|
||||||
|
--areas: 'color heading' 'color value';
|
||||||
|
--rows: repeat(2, 1fr);
|
||||||
|
--columns: var(--color-box-size) 1fr;
|
||||||
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: subgrid;
|
grid-template-areas: var(--areas);
|
||||||
grid-template-rows: 1.5fr 1fr;
|
grid-template-rows: var(--rows);
|
||||||
|
grid-template-columns: var(--columns);
|
||||||
|
|
||||||
background-color: var(--clr-color-box-background);
|
background-color: var(--clr-color-box-background);
|
||||||
|
|
||||||
border: var(--border-thin) solid var(--clr-box-border);
|
border: var(--border-thin) solid var(--clr-box-border);
|
||||||
border-radius: 0.5em;
|
border-radius: 0.5em;
|
||||||
|
|
||||||
overflow: hidden;
|
overflow: clip;
|
||||||
|
|
||||||
|
@media (min-width: 35em) {
|
||||||
|
--areas: 'color' 'heading' 'value';
|
||||||
|
--rows: var(--color-box-size) 1fr auto;
|
||||||
|
--columns: 1fr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& .content {
|
& .color-box {
|
||||||
display: flex;
|
grid-area: color;
|
||||||
flex-flow: column nowrap;
|
width: 100%;
|
||||||
justify-content: space-between;
|
|
||||||
gap: 0.25em;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0.5em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
& p {
|
& .heading,
|
||||||
margin-block: 0;
|
& .value {
|
||||||
|
text-align: left;
|
||||||
|
margin: 0;
|
||||||
|
padding-block: calc(var(--clearance) * 2);
|
||||||
|
padding-inline: calc(var(--clearance) * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
& .heading {
|
& .heading {
|
||||||
flex: 1 0 auto;
|
grid-area: heading;
|
||||||
|
align-self: start;
|
||||||
|
|
||||||
font-size: 0.625em;
|
font-size: 0.625em;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
color: var(--clr-heading-data);
|
color: var(--clr-heading-data);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
text-align: left;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
& .text {
|
& .value {
|
||||||
flex: 0 0 auto;
|
grid-area: value;
|
||||||
|
align-self: end;
|
||||||
|
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
margin-inline: 0;
|
|
||||||
|
padding-block: 0 calc(var(--clearance) * 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -64,12 +64,14 @@
|
||||||
& .type {
|
& .type {
|
||||||
font-size: 0.625em;
|
font-size: 0.625em;
|
||||||
color: var(--clr-heading-data);
|
color: var(--clr-heading-data);
|
||||||
|
text-align: left;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
grid-area: type;
|
grid-area: type;
|
||||||
}
|
}
|
||||||
|
|
||||||
& .text {
|
& .text {
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
|
text-align: left;
|
||||||
margin-block: 0;
|
margin-block: 0;
|
||||||
margin-inline: 0;
|
margin-inline: 0;
|
||||||
color: var(--clr-text);
|
color: var(--clr-text);
|
||||||
|
|
|
@ -11,7 +11,7 @@ gallery: [
|
||||||
{
|
{
|
||||||
alt: Sebin's cold weather outfit,
|
alt: Sebin's cold weather outfit,
|
||||||
artist: Lara Belém,
|
artist: Lara Belém,
|
||||||
href: https://x.com/la_scarabie
|
href: https://bsky.app/profile/la-scarabie.bsky.social
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
alt: Sebin's workout attire,
|
alt: Sebin's workout attire,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue