diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2012-11-05 00:05:32 -0500 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2012-11-05 00:05:32 -0500 |
| commit | 6a1d6a7365fb917784d378cf3b3683c85bb81b48 (patch) | |
| tree | 50f15b242488337acfd2af82f4a3068ce654fc9d /templates | |
| parent | ba4695dbdfcb96af70f9139ad279536d9398d29a (diff) | |
| download | famille-flask-6a1d6a7365fb917784d378cf3b3683c85bb81b48.tar.gz | |
starting to hook things up
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 45 | ||||
| -rw-r--r-- | templates/layout.html | 31 | ||||
| -rw-r--r-- | templates/login.html | 17 |
3 files changed, 48 insertions, 45 deletions
diff --git a/templates/base.html b/templates/base.html deleted file mode 100644 index 1e2580f..0000000 --- a/templates/base.html +++ /dev/null @@ -1,45 +0,0 @@ -<!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/layout.html b/templates/layout.html new file mode 100644 index 0000000..be923ea --- /dev/null +++ b/templates/layout.html @@ -0,0 +1,31 @@ +<!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> + <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') }}" /> + <!-- <link rel="alternate" type="application/rss+xml" title="Les actualités" href="rss.xml" /> --> + </head> + <body> + <div class="container"> + <div class="sheet"> + <div class="top"> + (<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/login.html b/templates/login.html new file mode 100644 index 0000000..d1b94ee --- /dev/null +++ b/templates/login.html @@ -0,0 +1,17 @@ +{% extends "layout.html" %} +{% block content %} + +<h2>Login</h2> +{% if error %}<p class=error><strong>Error:</strong> {{ error }}{% endif %} + <form 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> + </form> + {% endblock %} |
