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):
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>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<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 %}
{% endblock %}
</head>
@ -14,6 +15,8 @@
{% endblock %}
</div>
<hr>
{% block footer %}
<div style="text-align: right;"><a href="{% url 'admin:index' %}">Gestion</a></div>
{% endblock %}
</body>
</html>

View File

@ -3,7 +3,7 @@
{% block content %}
<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>
@ -15,3 +15,7 @@
</ul>
{% endif %}
{% endblock %}
{% block footer %}
<div style="text-align: right;"><a href="{% url 'admin:recette_recette_change' recette.pk %}">Modifier</a></div>
{% endblock %}