Skip to content

Commit

Permalink
Add data-property attributes (see #10)
Browse files Browse the repository at this point in the history
  • Loading branch information
lachholden committed Oct 31, 2023
1 parent 1269fcf commit c429419
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/RecipeCardTitleBlock.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@
{#if frontmatter}
{#each Object.entries(frontmatter) as [key, value]}
{#if formatFrontmatterValue(key, value)}
<span class="frontmatter-entry">
<span class="key">{key}</span>
<span class="value">
<span class="title-block-property">
<span class="key" data-property-key={key}
>{key}</span
>
<span class="value" data-property-value={value}>
<!-- eslint-disable -->
{@html formatFrontmatterValue(key, value)}
</span>
Expand Down Expand Up @@ -89,7 +91,7 @@
justify-content: start;
gap: var(--size-2-1) var(--size-4-4);
}
.frontmatter-entry {
.title-block-property {
display: inline-block;
font-size: var(--font-small);
}
Expand Down

0 comments on commit c429419

Please sign in to comment.