commit: d4300bca5af6a54f542a239ef5b622f8d7b68b85
parent 818c03c70b0ed0542957cc97cd0b61fb570b9265
Author: Changbai Li <lcb931023@gmail.com>
Date: Fri, 21 Jun 2019 23:04:47 +0800
bugfix: convert recipe name to url on the ingredient pages
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/templates/ingredient.js b/scripts/templates/ingredient.js
@@ -101,7 +101,7 @@ function IngredientTemplate (id, rect) {
var name = id
html += `
<li class='recipe'>
- <a onclick="Ø('query').bang('${name}')" class='photo' href='#${name}' style='background-image:url(media/recipes/${name.to_path()}.jpg)'></a>
+ <a onclick="Ø('query').bang('${name}')" class='photo' href='#${name.to_url()}' style='background-image:url(media/recipes/${name.to_path()}.jpg)'></a>
<t class='name'>${name.capitalize()}</t>
<t class='details'><b>${recipe.TIME} minutes</b><br />${count_ingredients(recipe)} ingredients<br />${recipe.INST.length} steps</t>
</li>`