aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/layout.html42
-rw-r--r--templates/login.html18
-rw-r--r--templates/news/list.html80
3 files changed, 74 insertions, 66 deletions
diff --git a/templates/layout.html b/templates/layout.html
index fcce2da..07b101f 100644
--- a/templates/layout.html
+++ b/templates/layout.html
@@ -4,40 +4,36 @@
<title>{% block title %}Site de la famille{% endblock %}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" media="screen" type="text/css"
- href="{{ url_for('static', filename = 'style.css') }}" />
+ href="{{ url_for('static', filename = 'stylenew.css') }}" />
+ <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.3.0/pure-min.css" />
<link rel="alternate" type="application/rss+xml" title="Les actualités" href='rss.xml' />
</head>
<body>
{% block body %}
- <div class="container">
- <div class="sheet">
- <div class="top">
- <p><strong>{{session['user_name']}}</strong>
- (<a href="/user/edit">Mon compte</a> |
- <a href="/logout">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>
- </tr>
- </table>
- </div>
- <div class="main">
+ <div id="topmenu" class="pure-menu pure-menu-open pure-menu-horizontal pure-menu-fixed">
+ <ul style="text-align:center">
+ <li><a href="/">Accueil</a></li>
+ <li><a href="/article/">Articles</a></li>
+ </ul>
+ <ul style="text-align:right">
+ <li><a class="pure-menu-heading"
+ href="/user/edit">{{session['user_name']}}</a></li>
+ <li><a class="pure-menu-heading"
+ href="/logout">Se déconnecter</a></li>
+ </ul>
+ </div>
+ <div id="layout" class="pure-g">
{% block content %}{% endblock %}
</div>
- </div>
- </div>
{% endblock body %}
<script type="text/javascript"
- src="{{ url_for('static', filename='jquery.min.js')}}"></script>
+ src="{{ url_for('static', filename='jquery.min.js')}}"></script>
<script type="text/javascript"
- src="{{ url_for('static', filename='famille.js')}}"></script>
+ src="{{ url_for('static', filename='famille.js')}}">) </script>
<script type="text/javascript"
- src="{{ url_for('static', filename='jquery.timeago.js')}}"></script>
+ src="{{ url_for('static', filename='jquery.timeago.js')}}"></script>
<script type="text/javascript"
- src="{{ url_for('static', filename='jquery.timeago.fr.js')}}">
+ src="{{ url_for('static', filename='jquery.timeago.fr.js')}}">
</script>
</body>
</html>
diff --git a/templates/login.html b/templates/login.html
index d2bb8cb..3cad5c7 100644
--- a/templates/login.html
+++ b/templates/login.html
@@ -1,16 +1,18 @@
{% extends "layout.html" %}
{%block title %}Connexion{% endblock %}
{% block body %}
- <form id = "connection" action="{{ url_for('login') }}" method="post">
+<div style="margin:10em auto;width:200px">
+ <form class="pure-form pure-form-stacked" id = "connection" action="{{ url_for('login') }}" method="post">
<fieldset>
<legend>Connexion</legend>
- <p>
- <label for="name">Nom : </label>
- <input type="text" id="name" name=username /><br/>
- <label for="password">Mot de passe : </label>
- <input type="password" id="password" name=password /><br/>
- </p>
- <p class="submit"><input type="submit" value="Se connecter"/></p>
+ <label for="name">Nom : </label>
+ <input type="text" id="name" placeholder="Prénom" name="username" />
+ <label for="password">Mot de passe : </label>
+ <input type="password" id="password" placeholder="Mot de passe" name="password" />
+ <br/>
+ <button type="submit" class="pure-button pure-button-primary">Se connecter</button>
{% if error %}<p class=error><strong>Erreur:</strong> {{ error }}</p>{% endif %}
+ </fieldset>
</form>
+</div>
{% endblock %}
diff --git a/templates/news/list.html b/templates/news/list.html
index d25715b..af6dcb2 100644
--- a/templates/news/list.html
+++ b/templates/news/list.html
@@ -1,54 +1,64 @@
{% extends 'layout.html' %}
{% block content %}
-<div class="second_menu">
- <a href="/news/add/">Ajouter une actualité</a>
+<!-- <div class="second_menu"> -->
+<!-- <a href="/news/add/">Ajouter une actualité</a> -->
+<!-- </div> -->
+
+<div class="pure-u-3-5">
+ <div class="content">
+ {% for news in news %}
+ <div class="pure-u">
+ <h2><a href="{{url_for('show_news', news_id = news.id)}}">{{ news.title }}</a></h2>
+
+ {% if news.user_name==session.user_name %}
+ <div class="pure-u">
+ <a href="{{url_for('edit_news', news_id = news.id)}}">
+ Modifier cette actualité
+ </a>
+ </div>
+ {% endif %}
+
+ <p>Posté par <a href="{{url_for('view_user', user_id = news.user_id)}}">{{ news.user_name }}</a> le {{news.date|format_date}}</p>
+
+ </div>
+
+ <p class="comments">
+ <a href="{{url_for('show_news', news_id = news.id)}}#comments">{{"Commentaire"|pluralize(news.ncomments)}}</a> |
+ <a href="{{url_for('show_news', news_id = news.id)}}#add">Ajouter un commentaire</a>
+ </p>
+
+ <div class="news_content">
+ <p>{{ news.content_cache|safe }}</p>
+ </div>
+ {% endfor %}
+ </div>
</div>
-<div class="quickview">
-<h2>Dernières visites</h2>
-<table>
+<div class="pure-u-2-5">
+ <h2>Dernières visites</h2>
+
+ <table class="pure-table pure-table-horizontal">
{% for user in users %}
<tr>
- <td><a href="{{url_for('view_user', user_id=user.id)}}">{{user.user_name}}</a></td>
- <td>{{user.last_seen|format_ago('%a %d %b à %Hh%M')|safe}}</td>
+ <td><a href="{{url_for('view_user', user_id=user.id)}}">{{user.user_name}}</a></td>
+ <td>{{user.last_seen|format_ago('%a %d %b à %Hh%M')|safe}}</td>
</tr>
{% endfor %}
-</table>
+ </table>
-<h2>Derniers commentaires</h2>
-<ul id="last-comments">
+ <h2>Derniers commentaires</h2>
+ <ul id="last-comments">
{% for comment in comments %}
<li><a href="{{url_for('view_user', user_id=comment.user_id)}}">{{comment.user_name}}</a>
- {{comment.date|format_ago('%a %d %b à %Hh%M')|safe}}<br/>
- {{comment.content_cache|shortify|safe}} <a href="{{url_for('show_news', news_id=comment.news_id)}}#comments">[…]</a>
+ {{comment.date|format_ago('%a %d %b à %Hh%M')|safe}}<br/>
+ {{comment.content_cache|shortify|safe}} <a href="{{url_for('show_news', news_id=comment.news_id)}}#comments">[…]</a>
</li>
{% else %}
Pas de commentaires.
{% endfor %}
-</ul>
+ </ul>
</div>
-<div class="news">
- {% for news in news %}
- <div class="news_head">
- <h2><a href="{{url_for('show_news', news_id = news.id)}}">{{ news.title }}</a>
- </h2>
- {% if news.user_name==session.user_name %}
- <div style="float:right">
- <a href="{{url_for('edit_news', news_id = news.id)}}">Modifier cette actualité</a>
- </div>
- {% endif %}
- <p>Posté par <a href="{{url_for('view_user', user_id = news.user_id)}}">{{ news.user_name }}</a> le {{news.date|format_date}}</p>
- </div>
- <p class="comments">
- <a href="{{url_for('show_news', news_id = news.id)}}#comments">{{"Commentaire"|pluralize(news.ncomments)}}</a> |
- <a href="{{url_for('show_news', news_id = news.id)}}#add">Ajouter un commentaire</a>
-</p>
- <div class="news_content">
- <p>{{ news.content_cache|safe }}</p>
- </div>
- {% endfor %}
-</div>
-<div style="clear:both"/>
+<!-- <div style="clear:both"/> -->
{% endblock %}