Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
[#1767](https://github.com/nextcloud/cookbook/pull/1767) @lneugebauer
- Show info for empty cookbook or categories in recipe overview
[#1866](https://github.com/nextcloud/cookbook/pull/1866) @seyfeb
- Replace checkmark with strikethrough for recipe ingredients
[#1908](https://github.com/nextcloud/cookbook/pull/1908) @j0hannesr0th

### Fixed
- Fix translation string to not contain quotes
Expand Down
33 changes: 6 additions & 27 deletions src/components/RecipeIngredient.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
}"
@click="toggleDone"
>
<div class="checkmark" :class="{ done: isDone }">✔</div>
<div class="ingredient">
<VueShowdown :markdown="displayIngredient" />
<VueShowdown :markdown="formattedIngredient" flavor="github" />
</div>
<span v-if="!ingredientHasCorrectSyntax" class="icon-error" />
</li>
Expand Down Expand Up @@ -44,6 +43,11 @@ export default {
}
return this.ingredient
},
formattedIngredient() {
return this.isDone
? `~~${this.displayIngredient}~~`
: `**${this.displayIngredient}**`
},
},
methods: {
isHeader() {
Expand All @@ -69,37 +73,12 @@ li {
list-style-type: none;
}

.unindented {
position: relative;
left: -1.25em;
}

li > .checkmark {
display: inline;
visibility: hidden;
}

li > .done {
visibility: visible;
}

li:hover > .checkmark {
color: var(--color-primary-element);
opacity: 0.5;
visibility: visible;
}

li > .ingredient {
display: inline;
padding-left: 1em;
margin-left: 0.3em;
text-indent: -1em;
}

.ingredient:deep(a) {
text-decoration: underline;
}

li > span.icon-error {
margin-left: 0.3em;
}
Expand Down