Files
recipes/cookbook/templates/test.html
2021-01-13 03:13:07 +01:00

62 lines
1.8 KiB
HTML

{% extends "base.html" %}
{% load render_bundle from webpack_loader %}
{% load static %}
{% load i18n %}
{% load l10n %}
{% load custom_tags %}
{% block title %}{{ recipe.name }}{% endblock %}
{% block content %}
{% recipe_rating recipe request.user as rating %}
<!--
<div class="row">
<div class="col-md-12">
<h3>{{ recipe.name }} {{ rating|safe }}</h3>
{% if recipe.storage %}
<small>{% trans 'in' %} <a
href="{% url 'edit_storage' recipe.storage.pk %}">{{ recipe.storage.name }}</a></small><br/>
{% endif %}
{% if recipe.internal %}
<small>{% trans 'by' %} {{ recipe.created_by.get_user_name }}<br/></small>
{% endif %}
{% if recipe.keywords %}
{% for x in recipe.keywords.all %}
<span class="badge badge-pill badge-light">{{ x }}</span>
{% endfor %}
{% endif %}
</div>
</div>
-->
<div id="app">
<recipe-view recipe_id="5"></recipe-view>
</div>
{% endblock %}
{% block script %}
<script src="{% url 'javascript-catalog' %}"></script>
{% if debug %}
<script src="{% url 'js_reverse' %}"></script>
{% else %}
<script src="{% static 'django_js_reverse/js/reverse.js' %}"></script>
{% endif %}
<script type="application/javascript">
window.RECIPE_ID = {{recipe.pk}};
window.USER_PREF = {
'use_fractions': {% if request.user.userpreference.use_fractions %} true {% else %} false {% endif %},
'ingredient_decimals': {{ request.user.userpreference.ingredient_decimals }},
}
</script>
{% render_bundle 'chunk-vendors' %}
{% render_bundle 'recipe_view' %}
{% endblock %}