minor ui/ux improvements
This commit is contained in:
parent
272341f1dc
commit
c4905d39c1
@ -13,6 +13,7 @@
|
|||||||
<a href="https://github.com/vabene1111/recipes/stargazers" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/github/stars/vabene1111/recipes" ></a>
|
<a href="https://github.com/vabene1111/recipes/stargazers" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/github/stars/vabene1111/recipes" ></a>
|
||||||
<a href="https://github.com/vabene1111/recipes/network/members" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/github/forks/vabene1111/recipes" ></a>
|
<a href="https://github.com/vabene1111/recipes/network/members" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/github/forks/vabene1111/recipes" ></a>
|
||||||
<a href="https://hub.docker.com/r/vabene1111/recipes" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/docker/pulls/vabene1111/recipes" ></a>
|
<a href="https://hub.docker.com/r/vabene1111/recipes" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/docker/pulls/vabene1111/recipes" ></a>
|
||||||
|
<a href="https://github.com/vabene1111/recipes/releases/latest" rel="noopener noreferrer"><img src="https://img.shields.io/github/v/release/vabene1111/recipes" ></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
10
cookbook/static/themes/tandoor.min.css
vendored
10
cookbook/static/themes/tandoor.min.css
vendored
@ -10402,16 +10402,6 @@ footer a:hover {
|
|||||||
box-shadow: none
|
box-shadow: none
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-content {
|
|
||||||
width: 500px
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 575px) {
|
|
||||||
.modal-content {
|
|
||||||
width: 300px
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-content .modal-header {
|
.modal-content .modal-header {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border: none
|
border: none
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -60,7 +60,7 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-{% nav_color request %} bg-header" id="id_main_nav"
|
<nav class="navbar navbar-expand-lg navbar-dark bg-{% nav_color request %} bg-header" id="id_main_nav"
|
||||||
style="{% sticky_nav request %}; z-index: 1061">
|
style="{% sticky_nav request %}">
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText"
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText"
|
||||||
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
|
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
@ -152,14 +152,20 @@
|
|||||||
<a class="dropdown-item" href="{% url 'view_history' %}"><i
|
<a class="dropdown-item" href="{% url 'view_history' %}"><i
|
||||||
class="fas fa-history"></i> {% trans 'History' %}</a>
|
class="fas fa-history"></i> {% trans 'History' %}</a>
|
||||||
{% if request.user == request.space.created_by %}
|
{% if request.user == request.space.created_by %}
|
||||||
<a class="dropdown-item" href="{% url 'view_space' %}"><i class="fas fa-server fa-fw"></i> {% trans 'Space Settings' %}</a>
|
<a class="dropdown-item" href="{% url 'view_space' %}"><i
|
||||||
|
class="fas fa-server fa-fw"></i> {% trans 'Space Settings' %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.is_superuser %}
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="{% url 'view_system' %}"><i
|
<a class="dropdown-item" href="{% url 'view_system' %}"><i
|
||||||
class="fas fa-server fa-fw"></i> {% trans 'System' %}</a>
|
class="fas fa-server fa-fw"></i> {% trans 'System' %}</a>
|
||||||
<a class="dropdown-item" href="{% url 'admin:index' %}"><i
|
<a class="dropdown-item" href="{% url 'admin:index' %}"><i
|
||||||
class="fas fa-user-shield fa-fw"></i> {% trans 'Admin' %}</a>
|
class="fas fa-user-shield fa-fw"></i> {% trans 'Admin' %}</a>
|
||||||
|
{% if user.is_superuser %}
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item" href="{% url 'list_keyword' %}"><i
|
||||||
|
class="fas fa-tags"></i> {% trans 'Keywords' %}</a>
|
||||||
|
<a class="dropdown-item" href="{% url 'admin:index' %}"><i
|
||||||
|
class="fas fa-user-shield fa-fw"></i> {% trans 'Admin' %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="{% url 'docs_markdown' %}"><i
|
<a class="dropdown-item" href="{% url 'docs_markdown' %}"><i
|
||||||
@ -192,10 +198,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<br/>
|
<div class="container-fluid mt-2 mt-md-5 mt-xl-5 mt-lg-5" id="id_base_container">
|
||||||
<br/>
|
|
||||||
|
|
||||||
<div class="container-fluid" id="id_base_container">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xl-2 d-none d-xl-block">
|
<div class="col-xl-2 d-none d-xl-block">
|
||||||
{% block content_xl_left %}
|
{% block content_xl_left %}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -54,7 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col col-md-4 col-10">
|
<div class="col col-md-4 col-10 mt-2 mt-md-0 mt-lg-0 mt-xl-0">
|
||||||
<div class="row d-flex" style="padding-left: 16px">
|
<div class="row d-flex" style="padding-left: 16px">
|
||||||
<div class="my-auto" style="padding-right: 4px">
|
<div class="my-auto" style="padding-right: 4px">
|
||||||
<i class="fas fa-pizza-slice fa-2x text-primary"></i>
|
<i class="fas fa-pizza-slice fa-2x text-primary"></i>
|
||||||
|
@ -22,9 +22,14 @@
|
|||||||
|
|
||||||
<b-card-text style="text-overflow: ellipsis;">
|
<b-card-text style="text-overflow: ellipsis;">
|
||||||
<template v-if="recipe !== null">
|
<template v-if="recipe !== null">
|
||||||
|
<recipe-rating :recipe="recipe"></recipe-rating>
|
||||||
|
<span v-if="recipe.description.length > 120">
|
||||||
|
{{ recipe.description.substr(0, 120) + "\u2026" }}
|
||||||
|
</span>
|
||||||
|
<span v-if="recipe.description.length <= 120">
|
||||||
{{ recipe.description }}
|
{{ recipe.description }}
|
||||||
|
</span>
|
||||||
<recipe-rating :recipe="recipe"></recipe-rating> <br/> <!-- TODO UGLY! -->
|
<br/> <!-- TODO UGLY! -->
|
||||||
<last-cooked :recipe="recipe"></last-cooked>
|
<last-cooked :recipe="recipe"></last-cooked>
|
||||||
<keywords :recipe="recipe" style="margin-top: 4px"></keywords>
|
<keywords :recipe="recipe" style="margin-top: 4px"></keywords>
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class="dropdown d-print-none">
|
<div class="dropdown d-print-none">
|
||||||
<a class="btn shadow-none" href="#" role="button" id="dropdownMenuLink"
|
<a class="btn shadow-none" href="#" role="button" id="dropdownMenuLink"
|
||||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<i class="fas fa-ellipsis-v"></i>
|
<i class="fas fa-ellipsis-v fa-lg"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuLink">
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuLink">
|
||||||
@ -37,9 +37,11 @@
|
|||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<a href="#">
|
||||||
<button class="dropdown-item" onclick="window.print()"><i
|
<button class="dropdown-item" onclick="window.print()"><i
|
||||||
class="fas fa-print fa-fw"></i> {{ $t('Print') }}
|
class="fas fa-print fa-fw"></i> {{ $t('Print') }}
|
||||||
</button>
|
</button>
|
||||||
|
</a>
|
||||||
|
|
||||||
<a class="dropdown-item" :href="resolveDjangoUrl('view_export') + '?r=' + recipe.id" target="_blank"
|
<a class="dropdown-item" :href="resolveDjangoUrl('view_export') + '?r=' + recipe.id" target="_blank"
|
||||||
rel="noopener noreferrer"><i class="fas fa-file-export fa-fw"></i> {{ $t('Export') }}</a>
|
rel="noopener noreferrer"><i class="fas fa-file-export fa-fw"></i> {{ $t('Export') }}</a>
|
||||||
@ -60,11 +62,14 @@
|
|||||||
<b-modal :id="`modal-share-link_${modal_id}`" v-bind:title="$t('Share')" hide-footer>
|
<b-modal :id="`modal-share-link_${modal_id}`" v-bind:title="$t('Share')" hide-footer>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col-md-12">
|
<div class="col col-md-12">
|
||||||
<label v-if="recipe_share_link !== undefined">{{ $t('Link') }}</label>
|
<label v-if="recipe_share_link !== undefined">{{ $t('Public share link') }}</label>
|
||||||
<input ref="share_link_ref" class="form-control" v-model="recipe_share_link"/>
|
<input ref="share_link_ref" class="form-control" v-model="recipe_share_link"/>
|
||||||
<b-button class="mt-2 mb-3" variant="secondary" @click="$bvModal.hide(`modal-share-link_${modal_id}`)">{{ $t('Close') }}</b-button>
|
<b-button class="mt-2 mb-3 d-none d-md-inline" variant="secondary"
|
||||||
<b-button class="mt-2 mb-3 ml-2" variant="primary" @click="copyShareLink()">{{ $t('Copy') }}</b-button>
|
@click="$bvModal.hide(`modal-share-link_${modal_id}`)">{{ $t('Close') }}
|
||||||
<b-button class="mt-2 mb-3 ml-2 float-right" variant="success" @click="shareIntend()">{{ $t('Share') }} <i class="fa fa-share-alt"></i></b-button>
|
</b-button>
|
||||||
|
<b-button class="mt-2 mb-3 ml-md-2" variant="primary" @click="copyShareLink()">{{ $t('Copy') }}</b-button>
|
||||||
|
<b-button class="mt-2 mb-3 ml-2 float-right" variant="success" @click="shareIntend()">{{ $t('Share') }} <i
|
||||||
|
class="fa fa-share-alt"></i></b-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -128,7 +133,7 @@ export default {
|
|||||||
shareIntend: function () {
|
shareIntend: function () {
|
||||||
let shareData = {
|
let shareData = {
|
||||||
title: this.recipe.name,
|
title: this.recipe.name,
|
||||||
text: this.$t('Check out this recipe!'),
|
text: `${this.$t('Check out this recipe: ')} ${this.recipe.name}`,
|
||||||
url: this.recipe_share_link
|
url: this.recipe_share_link
|
||||||
}
|
}
|
||||||
navigator.share(shareData)
|
navigator.share(shareData)
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<span style="display: inline-block;" v-if="recipe.rating > 0">
|
<span class="d-inline" v-if="recipe.rating > 0">
|
||||||
<i class="fas fa-star fa-xs" v-for="i in Math.floor(recipe.rating)" v-bind:key="i"></i>
|
<i class="fas fa-star fa-xs text-primary" v-for="i in Math.floor(recipe.rating)" v-bind:key="i"></i>
|
||||||
<i class="fas fa-star-half-alt fa-xs" v-if="recipe.rating % 1 > 0"></i>
|
<i class="fas fa-star-half-alt fa-xs text-primary" v-if="recipe.rating % 1 > 0"></i>
|
||||||
|
<i class="far fa-star fa-xs text-secondary" v-for="i in (5 - Math.ceil(recipe.rating))" v-bind:key="i + 10"></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user