abdullahtarawneh.com/assets/scss/layouts/shortcodes/hcard-full.scss
2024-03-08 14:46:56 -06:00

99 lines
1.8 KiB
SCSS

.h-card.full {
--border-radius: 10px;
height: min-content;
border-radius: var(--border-radius, 10px);
background: #eee;
h2 {
text-align: center;
font-size: 1em;
margin: 0em;
padding: 1rem;
}
header {
aspect-ratio: 2;
background-image: url('/images/sunset.jpg');
background-size: cover;
background-position: center;
position: relative;
border-top-left-radius: var(--border-radius, 10px);
border-top-right-radius: var(--border-radius, 10px);
img {
border-radius: 12px;
background-color: #ddd;
padding: 10px;
width: 120px;
height: 120px;
position: absolute;
left: calc(50% - 60px);
top: calc(100% - 60px);
}
margin-bottom: 60px;
}
.info {
text-align: center;
p {
margin: 0;
}
.p-name {
font-weight: bold;
text-align: center;
font-size: 1.5em;
}
.u-uid {
text-decoration: none;
font-family: monospace;
color: inherit;
font-size: 1rem;
}
.p-note {
margin-bottom: 1em;
}
}
.metadata {
padding-block-end: 2rem;
display: grid;
max-width: calc(33ch + 1em);
margin: 0 auto;
gap: 1em;
.field {
display: grid;
place-items: start;
gap: 0.5em;
padding: 0 1em;
}
dt {
font-weight: bold;
font-variant: small-caps
}
dd {
}
}
@media (min-width: 40em) {
display: grid;
grid-template-columns: 20em 1fr;
grid-template-areas:
"header meta"
"info meta";
header {
width: 20em;
grid-area: header;
border-top-right-radius: 0;
}
.info {
grid-area: info;
}
.metadata {
grid-area: meta;
padding-block-start: 2em;
max-width: unset;
width: 100%;
padding-left: 2em;
background: #e6e6e6;
border-top-right-radius: var(--border-radius, 10px);
border-bottom-right-radius: var(--border-radius, 10px);
}
max-width: 40em;
margin: 0 auto;
}
}