recipe page styling
This commit is contained in:
parent
acafcbc077
commit
a59ac44f3b
@ -36,6 +36,41 @@
|
||||
<recipe-view recipe_id="5"></recipe-view>
|
||||
</div>
|
||||
|
||||
{% if request.user.userpreference.comments %}
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<h5 {% if not comments %}class="d-print-none" {% endif %}><i class="far fa-comments"></i> {% trans 'Comments' %}
|
||||
</h5>
|
||||
{% for c in comments %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<small class="card-title">{{ c.updated_at }} {% trans 'by' %} {{ c.created_by.username }}</small> <a
|
||||
href="{% url 'edit_comment' c.pk %}" class="d-print-none"><i
|
||||
class="fas fa-pencil-alt"></i></a><br/>
|
||||
{{ c.text }}
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
{% endfor %}
|
||||
|
||||
{% if request.user.is_authenticated %}
|
||||
<div class="d-print-none">
|
||||
|
||||
<form method="POST" class="post-form">
|
||||
{% csrf_token %}
|
||||
<div class="input-group mb-3">
|
||||
<textarea name="comment-text" cols="15" rows="2" class="textarea form-control" required
|
||||
id="comment-id_text"></textarea>
|
||||
<div class="input-group-append">
|
||||
<input type="submit" value="{% trans 'Comment' %}" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="col col-md-3">
|
||||
<table>
|
||||
<tr>
|
||||
<td rowspan="2"><i class="fas fa-user-clock fa-2x text-primary"></i></td>
|
||||
@ -26,7 +26,7 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<div class="col col-md-3">
|
||||
<table>
|
||||
<tr>
|
||||
<td rowspan="2"><i class="far fa-clock fa-2x text-primary"></i></td>
|
||||
@ -38,11 +38,26 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
Hier kann noch text stehen
|
||||
<div class="col col-md-4 col-10">
|
||||
<table>
|
||||
<tr>
|
||||
<td >
|
||||
<i class="fas fa-pizza-slice fa-2x text-primary"></i>
|
||||
</td>
|
||||
<td >
|
||||
<input dir="rtl" style="border-width:0px;border:none; padding:0px; padding-left: 0.5vw; padding-right: 8px; max-width: 80px" value="1" maxlength="3"
|
||||
type="number" class="form-control form-control-lg" v-model.number="servings"/>
|
||||
</td>
|
||||
|
||||
<td style="padding-left: 0.5vw">
|
||||
<b>{{ _('Servings') }}</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-3" style="text-align: right">
|
||||
<div class="col col-md-2 col-2" style="text-align: right; padding-right: 1vw">
|
||||
<recipe-context-menu v-bind:recipe="recipe"></recipe-context-menu>
|
||||
</div>
|
||||
</div>
|
||||
@ -57,15 +72,6 @@
|
||||
<div class="col col-md-8">
|
||||
<h4 class="card-title"><i class="fas fa-pepper-hot"></i> {{ _('Ingredients') }}</h4>
|
||||
</div>
|
||||
<div class="col col-md-4">
|
||||
<div class="input-group d-print-none">
|
||||
<input type="number" value="1" maxlength="3" class="form-control" style="min-width: 4vw;"
|
||||
v-model.number="servings"/>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text"><i class="fas fa-calculator"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
|
@ -19,8 +19,6 @@
|
||||
class="d-print-none"> <i class="far fa-comment"></i>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
<div class="d-none d-print-block">
|
||||
<i class="far fa-comment-alt"></i> {{ ingredient.note }}
|
||||
</div>
|
||||
|
@ -6,67 +6,50 @@
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h5><i class="fas fa-carrot"></i> {{ _('Nutrition') }}</h5>
|
||||
<h4 class="card-title"><i class="fas fa-carrot"></i> {{ _('Nutrition') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-row">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ _('Calories') }}
|
||||
<div class="col-6">
|
||||
<i class="fas fa-fire fa-fw"></i> {{ _('Calories') }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ calculateAmount(recipe.nutrition.calories) }} kcal
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ _('Carbohydrates') }}
|
||||
<div class="col-6">
|
||||
<i class="fas fa-bread-slice fa-fw"></i> {{ _('Carbohydrates') }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
|
||||
{{ calculateAmount(recipe.nutrition.carbohydrates) }} g
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-row">
|
||||
<div class="flex-column">
|
||||
<div class="">
|
||||
{{ _('Fats') }}
|
||||
</div>
|
||||
<div class="">
|
||||
{{ calculateAmount(recipe.nutrition.fats) }}
|
||||
</div>
|
||||
<div class="">
|
||||
g
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<i class="fas fa-cheese fa-fw"></i> {{ _('Fats') }}
|
||||
</div>
|
||||
|
||||
<div class="flex-column">
|
||||
<div class="">
|
||||
{{ _('Fats') }}
|
||||
</div>
|
||||
<div class="">
|
||||
{{ calculateAmount(recipe.nutrition.fats) }}
|
||||
</div>
|
||||
<div class="">
|
||||
g
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ calculateAmount(recipe.nutrition.fats) }} g
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ _('Proteins') }}
|
||||
<div class="col-6">
|
||||
<i class="fas fa-drumstick-bite fa-fw"></i> {{ _('Proteins') }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ calculateAmount(recipe.nutrition.proteins) }} g
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
@ -48,7 +48,7 @@ module.exports = {
|
||||
.host('localhost')
|
||||
.port(8080)
|
||||
.hotOnly(true)
|
||||
.watchOptions({poll: 1000})
|
||||
.watchOptions({poll: 500})
|
||||
.https(false)
|
||||
.headers({"Access-Control-Allow-Origin": ["*"]})
|
||||
|
||||
|
@ -1 +1 @@
|
||||
{"status":"done","publicPath":"http://localhost:8080/","chunks":{"chunk-vendors":[{"name":"js/chunk-vendors.js","publicPath":"http://localhost:8080/js/chunk-vendors.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\chunk-vendors.js"}],"recipe_view":[{"name":"js/recipe_view.js","publicPath":"http://localhost:8080/js/recipe_view.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\recipe_view.js"},{"name":"recipe_view.984f442acdcbbef1634d.hot-update.js","publicPath":"http://localhost:8080/recipe_view.984f442acdcbbef1634d.hot-update.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\recipe_view.984f442acdcbbef1634d.hot-update.js"}]},"error":"ModuleError","message":"Module Error (from ./node_modules/eslint-loader/index.js):\n\nF:\\Developement\\Django\\recipes\\vue\\src\\components\\ImageViewer.vue\n 25:50 error 'resolveDjangoUrl' is not defined no-undef\n\n✖ 1 problem (1 error, 0 warnings)\n"}
|
||||
{"status":"done","publicPath":"http://localhost:8080/","chunks":{"chunk-vendors":[{"name":"js/chunk-vendors.js","publicPath":"http://localhost:8080/js/chunk-vendors.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\chunk-vendors.js"}],"recipe_view":[{"name":"js/recipe_view.js","publicPath":"http://localhost:8080/js/recipe_view.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\js\\recipe_view.js"},{"name":"recipe_view.b45a25f0f923b4f16949.hot-update.js","publicPath":"http://localhost:8080/recipe_view.b45a25f0f923b4f16949.hot-update.js","path":"F:\\Developement\\Django\\recipes\\cookbook\\static\\vue\\recipe_view.b45a25f0f923b4f16949.hot-update.js"}]},"error":"ModuleError","message":"Module Error (from ./node_modules/eslint-loader/index.js):\n\nF:\\Developement\\Django\\recipes\\vue\\src\\apps\\RecipeView\\RecipeView.vue\n 48:130 error Parsing error: missing-whitespace-between-attributes vue/no-parsing-error\n 48:131 error Parsing error: unexpected-character-in-attribute-name vue/no-parsing-error\n\n✖ 2 problems (2 errors, 0 warnings)\n"}
|
Loading…
Reference in New Issue
Block a user