diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2012-11-04 11:52:42 -0500 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2012-11-04 11:52:42 -0500 |
| commit | ba4695dbdfcb96af70f9139ad279536d9398d29a (patch) | |
| tree | 070cce177f32a1f65767d07de843d86ed65d66a9 /templates | |
| parent | 3f99773d4ea7d2fedaaf4660078d3318ce8ec28a (diff) | |
| download | famille-flask-ba4695dbdfcb96af70f9139ad279536d9398d29a.tar.gz | |
Import static files from Thibaut's site
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 45 | ||||
| -rw-r--r-- | templates/news/news_detail.html | 41 | ||||
| -rw-r--r-- | templates/news/news_list.html | 23 | ||||
| -rw-r--r-- | templates/news/post.html | 8 |
4 files changed, 117 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..1e2580f --- /dev/null +++ b/templates/base.html @@ -0,0 +1,45 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<head> + <title>{% block title %}Site de la famille{% endblock title %}</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" media="screen" type="text/css" title="Design" href="/static/style.css" /> + <link rel="alternate" type="application/rss+xml" title="Les actualités" href="rss.xml" /> + <link rel="icon" type="image/png" href="/views/favicon.png" /> + <script src="/library/jquery.js" type="text/javascript"></script> + <script type="text/javascript"> + $.fn.wait = function(time, type) { + time = time || 1000; + type = type || "fx"; + return this.queue(type, function() { + var self = this; + setTimeout(function() { + $(self).dequeue(); + }, time); + }); + }; + </script> +</head> +<body> +<div class="container"> +<div class="sheet"> +<div class="top"> + <p><strong><?=$_SESSION['username']?></strong> (<a href="/user/edit">Mon compte</a> | <a href="/disconnect.php">Se déconnecter</a>)</p> +</div> +<div class="main_menu"> + <table> + <tr> + <td><a href="/">Accueil</a></td> + <td><a href="/article/">Articles</a></td> + <td><a href="/user/">Famille</a></td> + <td><a href="/system/">Système</a></td> + </tr> +</table> +</div> +<div class="main"> +{% block content %}{% endblock %} +</div> +</div> +</div> +</body> +</html> diff --git a/templates/news/news_detail.html b/templates/news/news_detail.html new file mode 100644 index 0000000..f65b91e --- /dev/null +++ b/templates/news/news_detail.html @@ -0,0 +1,41 @@ +{% extends 'base.html' %} + +{% block content %} +{% with news.comment_set.all as comments %} +<div class="quickview"/> +<h2>Détails</h2> +<ul> + <li>Auteur : <a href="/user/view/name/<?=$this->news['name']?>">{{news.author}}</a></li> +<li>Date : {{news.date}} </li> +<li><a href="#comments">{{coments}}</a></li> +</div> + +<div class="news"/> +<h1>{{news.title}}</h1> + +<div class="news_content"> +{{news.text}} +</div> + +<hr/> + +<h2 id="comments">Commentaires</h2> +{% for comment in comments %} +<h3 class="comment">Posté par <a href="/user/view/name/<?=$comment['name']?>">{{comment.author}}</a> le {{comment.date}} </h3> +<div class="comment_content"/> +{{comment.text}} +</div> +{% endfor %} + +<h2 id="add">Ajouter un commentaire</h2> + +<form class="comment_add" method="post" action="/home/view/id/<?=$this->news['id']?>/#add"> +<textarea name="content" cols="90" rows="10"> +</textarea> + +<p class="submit"><input type="submit" value="Ajouter"/></p> +</div> + +<div style="clear:both"/> +{% endwith %} +{% endblock %} diff --git a/templates/news/news_list.html b/templates/news/news_list.html new file mode 100644 index 0000000..2119a68 --- /dev/null +++ b/templates/news/news_list.html @@ -0,0 +1,23 @@ +{% extends 'base.html' %} + +{% block content %} +<div class="news"> + {% for news in news_list %} + <div class="news_head"> + <h2><a href="{% url news-details pk=news.id %}">{{ news.title }}</a></h2> + <!--div style="float:right"><a href="/home/edit/id/<?=$news['ident']?>">Modifier cette actualité</a></div--> + <p>Posté par <a href="/user/view/name/<?=$news['name']?>">{{ news.author.username }}</a> le {{ news.date }}</p> + </div> + + <p class="comments">{% with news.comment__count as comment_count %} + <a href="{% url news-details pk=news.id %}#comment">{{ comment_count }} commentaire{{comment_count|pluralize}}</a> | + <a href="{% url news-details pk=news.id %}#add">Ajouter un commentaire</a> + </p>{% endwith %} + + <div class="news_content"> + {{ news.text }} + </div> + {% endfor %} +</div> +<div style="clear:both"/> +{% endblock %} diff --git a/templates/news/post.html b/templates/news/post.html new file mode 100644 index 0000000..56ad2e4 --- /dev/null +++ b/templates/news/post.html @@ -0,0 +1,8 @@ +{% extends 'base.html' %} + +{% block content %} +<form action="{% url news.views.post %}" method="post"> +{{ form.as_p }} +<input type="submit" value="Submit" /> +</form> +{% endblock %} |
