abdullahtarawneh.com/assets/scss/layouts/shortcodes/hcard-full.scss

97 lines
1.7 KiB
SCSS
Raw Normal View History

.h-card.full {
2024-03-08 17:26:46 +00:00
--border-radius: 10px;
height: min-content;
2024-03-08 17:26:46 +00:00
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;
2024-03-08 17:26:46 +00:00
position: relative;
border-top-left-radius: var(--border-radius, 10px);
border-top-right-radius: var(--border-radius, 10px);
img {
2024-03-08 17:26:46 +00:00
border-radius: 12px;
background-color: #ddd;
padding: 10px;
2024-03-08 17:26:46 +00:00
width: 120px;
height: 120px;
position: absolute;
left: calc(50% - 60px);
top: calc(100% - 60px);
}
2024-03-08 17:26:46 +00:00
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 {
2024-03-08 17:26:46 +00:00
padding-block-end: 2rem;
display: grid;
2024-03-08 17:26:46 +00:00
max-width: calc(33ch + 1em);
margin: 0 auto;
2024-03-08 17:26:46 +00:00
gap: 1em;
.field {
2024-03-08 17:26:46 +00:00
display: grid;
place-items: start;
gap: 0.5em;
padding: 0 1em;
}
dt {
font-weight: bold;
2024-03-08 17:26:46 +00:00
font-variant: small-caps
}
dd {
2024-03-08 17:26:46 +00:00
}
}
@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);
}
}
}