Various different small improvements

This commit is contained in:
Claude Paroz 2018-05-26 16:55:07 +02:00
parent 2620a1b9b8
commit 991140fb8b
4 changed files with 11 additions and 3 deletions

View File

@ -2,4 +2,4 @@ from django import forms
class SearchForm(forms.Form): class SearchForm(forms.Form):
text = forms.CharField() text = forms.CharField(widget=forms.TextInput(attrs={'autofocus': True}))

View File

@ -0,0 +1 @@
div.photo { float: right; max-width: 100%; }

View File

@ -1,9 +1,10 @@
{% load static %}
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Recettes {% block title %}page title{% endblock %}</title> <title>Recettes {% block title %}page title{% endblock %}</title>
<link rel="stylesheet" href="{{ STATIC_URL }}css/main.css"> <link rel="stylesheet" href="{% static 'css/main.css' %}">
{% block extrahead %} {% block extrahead %}
{% endblock %} {% endblock %}
</head> </head>
@ -14,6 +15,8 @@
{% endblock %} {% endblock %}
</div> </div>
<hr> <hr>
{% block footer %}
<div style="text-align: right;"><a href="{% url 'admin:index' %}">Gestion</a></div> <div style="text-align: right;"><a href="{% url 'admin:index' %}">Gestion</a></div>
{% endblock %}
</body> </body>
</html> </html>

View File

@ -3,7 +3,7 @@
{% block content %} {% block content %}
<h1>{{ recette.nom }}</h1> <h1>{{ recette.nom }}</h1>
<div style="float:right;"><img src="{{ recette.photo }}"></div> <div class="photo"><img src="{{ recette.photo }}"></div>
<div>{{ recette.preparation }}</div> <div>{{ recette.preparation }}</div>
@ -15,3 +15,7 @@
</ul> </ul>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block footer %}
<div style="text-align: right;"><a href="{% url 'admin:recette_recette_change' recette.pk %}">Modifier</a></div>
{% endblock %}