aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2012-11-04 11:52:42 -0500
committerGuillaume Horel <guillaume.horel@gmail.com>2012-11-04 11:52:42 -0500
commitba4695dbdfcb96af70f9139ad279536d9398d29a (patch)
tree070cce177f32a1f65767d07de843d86ed65d66a9
parent3f99773d4ea7d2fedaaf4660078d3318ce8ec28a (diff)
downloadfamille-flask-ba4695dbdfcb96af70f9139ad279536d9398d29a.tar.gz
Import static files from Thibaut's site
-rw-r--r--description1
-rw-r--r--settings.ini5
-rw-r--r--static/gfx/.directory5
-rw-r--r--static/gfx/Sans titre.xcfbin0 -> 87368 bytes
-rw-r--r--static/gfx/center.pngbin0 -> 351 bytes
-rw-r--r--static/gfx/center2.pngbin0 -> 381 bytes
-rw-r--r--static/gfx/center3.pngbin0 -> 262 bytes
-rw-r--r--static/gfx/exemple.pngbin0 -> 23347 bytes
-rw-r--r--static/gfx/gift.pngbin0 -> 21228 bytes
-rw-r--r--static/gfx/home.pngbin0 -> 6892 bytes
-rw-r--r--static/gfx/main.pngbin0 -> 231 bytes
-rw-r--r--static/gfx/main2.pngbin0 -> 188 bytes
-rw-r--r--static/gfx/main3.pngbin0 -> 205 bytes
-rw-r--r--static/gfx/menu.pngbin0 -> 25432 bytes
-rw-r--r--static/gfx/menu2.pngbin0 -> 222 bytes
-rw-r--r--static/gfx/news.pngbin0 -> 1667 bytes
-rw-r--r--static/gfx/ok.pngbin0 -> 1948 bytes
-rw-r--r--static/gfx/top.pngbin0 -> 337 bytes
-rw-r--r--static/style.css511
-rw-r--r--templates/base.html45
-rw-r--r--templates/news/news_detail.html41
-rw-r--r--templates/news/news_list.html23
-rw-r--r--templates/news/post.html8
23 files changed, 638 insertions, 1 deletions
diff --git a/description b/description
deleted file mode 100644
index cc86d1e..0000000
--- a/description
+++ /dev/null
@@ -1 +0,0 @@
-Flask rewrite of the family website
diff --git a/settings.ini b/settings.ini
new file mode 100644
index 0000000..928c6f4
--- /dev/null
+++ b/settings.ini
@@ -0,0 +1,5 @@
+DATABASE = 'famille.db'
+DEBUG = True
+SECRET_KEY = '\x95\x98j\xcaL\xaeA\xf9\xe6-\xa7uV\xe5Y\x83\xe0\xab\x00\xb6\xeb\xde\xc2\x14'
+USERNAME = 'admin'
+PASSWORD = 'default' \ No newline at end of file
diff --git a/static/gfx/.directory b/static/gfx/.directory
new file mode 100644
index 0000000..8dd99f8
--- /dev/null
+++ b/static/gfx/.directory
@@ -0,0 +1,5 @@
+[Dolphin]
+AdditionalInfo=3
+ShowPreview=true
+Timestamp=2009,10,2,15,21,34
+ViewMode=1
diff --git a/static/gfx/Sans titre.xcf b/static/gfx/Sans titre.xcf
new file mode 100644
index 0000000..51e0b0e
--- /dev/null
+++ b/static/gfx/Sans titre.xcf
Binary files differ
diff --git a/static/gfx/center.png b/static/gfx/center.png
new file mode 100644
index 0000000..ca1a07d
--- /dev/null
+++ b/static/gfx/center.png
Binary files differ
diff --git a/static/gfx/center2.png b/static/gfx/center2.png
new file mode 100644
index 0000000..562d987
--- /dev/null
+++ b/static/gfx/center2.png
Binary files differ
diff --git a/static/gfx/center3.png b/static/gfx/center3.png
new file mode 100644
index 0000000..2d77411
--- /dev/null
+++ b/static/gfx/center3.png
Binary files differ
diff --git a/static/gfx/exemple.png b/static/gfx/exemple.png
new file mode 100644
index 0000000..ece5186
--- /dev/null
+++ b/static/gfx/exemple.png
Binary files differ
diff --git a/static/gfx/gift.png b/static/gfx/gift.png
new file mode 100644
index 0000000..d2c26ec
--- /dev/null
+++ b/static/gfx/gift.png
Binary files differ
diff --git a/static/gfx/home.png b/static/gfx/home.png
new file mode 100644
index 0000000..708f40c
--- /dev/null
+++ b/static/gfx/home.png
Binary files differ
diff --git a/static/gfx/main.png b/static/gfx/main.png
new file mode 100644
index 0000000..94871c7
--- /dev/null
+++ b/static/gfx/main.png
Binary files differ
diff --git a/static/gfx/main2.png b/static/gfx/main2.png
new file mode 100644
index 0000000..9ac7527
--- /dev/null
+++ b/static/gfx/main2.png
Binary files differ
diff --git a/static/gfx/main3.png b/static/gfx/main3.png
new file mode 100644
index 0000000..1f2de24
--- /dev/null
+++ b/static/gfx/main3.png
Binary files differ
diff --git a/static/gfx/menu.png b/static/gfx/menu.png
new file mode 100644
index 0000000..e3a5fc7
--- /dev/null
+++ b/static/gfx/menu.png
Binary files differ
diff --git a/static/gfx/menu2.png b/static/gfx/menu2.png
new file mode 100644
index 0000000..3649ed3
--- /dev/null
+++ b/static/gfx/menu2.png
Binary files differ
diff --git a/static/gfx/news.png b/static/gfx/news.png
new file mode 100644
index 0000000..cf08762
--- /dev/null
+++ b/static/gfx/news.png
Binary files differ
diff --git a/static/gfx/ok.png b/static/gfx/ok.png
new file mode 100644
index 0000000..3914340
--- /dev/null
+++ b/static/gfx/ok.png
Binary files differ
diff --git a/static/gfx/top.png b/static/gfx/top.png
new file mode 100644
index 0000000..89dd911
--- /dev/null
+++ b/static/gfx/top.png
Binary files differ
diff --git a/static/style.css b/static/style.css
new file mode 100644
index 0000000..a5ad5e0
--- /dev/null
+++ b/static/style.css
@@ -0,0 +1,511 @@
+/**************************/
+/** Structure de la page **/
+/**************************/
+
+body {
+font-family: arial;
+font-size: 14px;
+padding:0;
+margin:0;
+background-color: #45395f;
+background-image : url('gfx/main.png');
+background-repeat : repeat;
+}
+
+.sheet{
+background-color : white;
+width:950px;
+margin-left:auto;
+margin-right:auto;
+margin-top:0px;
+margin-bottom : 0x;
+padding-top:0px;
+}
+
+.main {
+width : 900px;
+padding-left : 25px;
+padding-right : 25px;
+padding-top : 15px;
+padding-bottom : 15px;
+margin-left:auto;
+margin-right:auto;
+margin-top:0px;
+margin-bottom : 0x;
+color : black;
+height : 100%;
+background-image : url('gfx/center3.png');
+background-repeat : repeat-x;
+}
+
+.container{
+width : 1040px;
+background-image : url('gfx/center.png');
+background-repeat : repeat-y;
+margin-left:auto;
+margin-right:auto;
+}
+
+/*****************************************/
+/** Eléments communs à toutes les pages **/
+/*****************************************/
+
+.main_menu{
+width: 900px;
+margin-left:auto;
+margin-right:auto;
+padding-left : 25px;
+padding-right : 25px;
+height:50px;
+background-image : url('gfx/menu2.png');
+background-repeat : repeat-x;
+border-bottom : 2px groove black;
+border-top : 1px groove black;
+text-align:center;
+}
+
+.main_menu a{
+color : white;
+font-size : 20px;
+}
+
+.main_menu a:hover{
+text-decoration : none;
+color : white;
+}
+
+.main_menu td{
+height:50px;
+padding-left : 15px;
+padding-right: 15px;
+border-left:2px groove #002B56;
+border-right:2px groove #002B56;
+border-bottom : none;
+}
+
+.main_menu td:hover{
+border-bottom : 3px solid #EA8500;
+}
+
+.top{
+margin : 0px;
+padding : 0px;
+height : 70px;
+padding : 5px;
+text-align : right;
+color: black;
+font-size:15px;
+background-image : url('gfx/top.png');
+}
+
+.top:before{
+content : url('gfx/home.png');
+float:left;
+margin-left:20px;
+}
+
+.top p{
+margin-top:25px;
+}
+
+/***************************************************/
+/** mise en forme générale pour un style cohérent **/
+/***************************************************/
+
+h1{
+text-align : center;
+font-size : 25px;
+}
+
+a{
+text-decoration : none;
+color : #0060A4;
+}
+
+a:hover{
+text-decoration : underline;
+color : #EA8500;
+}
+
+.info {
+font-style : italic;
+}
+
+form{
+display : block;
+margin-left : auto;
+margin-right : auto;
+}
+
+label{
+display : block;
+float:left;
+text-align : right;
+padding-right : 5px;
+font-weight : bold;
+margin-bottom : 5px;
+}
+
+input {
+border : 1px solid #13294B;
+background-color : #EDF0FF;
+margin-bottom : 5px;
+}
+
+input:focus,select:focus {
+background-color : #B9CEFF;
+}
+
+input[type=button],[type=submit]{
+background-color : #B9CEFF;
+color : black;
+-moz-border-radius : 5px;
+}
+
+textarea{
+border : 1px solid #13294B;
+background-color : #EDF0FF;
+}
+
+legend {
+border : 1px solid #13294B;
+background-color : #EDF0FF;
+}
+
+fieldset{
+border : 1px solid #13294B;
+margin-bottom : 10px;
+}
+
+select{
+background-color : #EDF0FF;
+border : 1px solid #13294B;
+margin-bottom : 5px;
+}
+
+form p.submit{
+text-align : center;
+}
+
+
+pre.code{
+border : 1px solid #003669;
+background-color : #F2F2F2;
+width : 650px;
+margin-left:auto;
+margin-right:auto;
+padding : 5px;
+white-space: pre-wrap;
+}
+
+hr{
+color : #BFBFBF;
+border : none;
+background-color : #BFBFBF;
+height : 1px;
+}
+
+.hidden{
+display : none;
+}
+
+/***************************/
+/** Elements particuliers **/
+/***************************/
+
+.news{
+float : left;
+width : 650px;
+padding-right : 15px;
+border-right : 3px dotted gray;
+}
+
+.article{
+width : 750px;
+margin-left : auto;
+margin-right : auto;
+line-height:130%
+}
+
+.news_add label{
+width : 100px;
+}
+
+.news_add textarea{
+width : 650px;
+}
+
+.comment_add textarea{
+width : 650px;
+}
+
+.news_add input[type=text]{
+display : block;
+width : 650px;
+}
+
+.news_head{
+/* border-bottom : 1px solid #0060A4; */
+border-bottom : 1px solid #BFBFBF;
+}
+
+.news_head h2{
+margin-bottom : 5px;
+font-size : 18px;
+}
+
+.news_head:before{
+content : url('gfx/news.png');
+float:left;
+padding-top : 8px;
+margin-right : 5px;
+}
+
+.news_head p{
+margin : 0px;
+margin-bottom : 5px;
+}
+
+.news p.comments{
+margin-top:0px;
+text-align : right;
+}
+
+.quickview{
+width : 220px;
+float:right;
+}
+
+.quickview h2{
+margin : 0px;
+padding:0px;
+background-color : #BFBFBF;
+-moz-border-radius : 5px;
+-khtml-border-radius : 5px;
+padding-top : 3px;
+padding-bottom : 3px;
+color : white;
+text-align : center;
+font-size : 17px;
+}
+
+.quickview ul{
+list-style : none;
+padding-left:0px;
+}
+
+.quickview li{
+margin-bottom : 8px;
+}
+
+.quickview li:before{
+content : "> ";
+color : gray;
+}
+
+.quickview td{
+border: 0px;
+}
+
+.quickview table{
+margin-bottom : 10px;
+}
+
+form.userform {
+display : block;
+margin-left : auto;
+margin-right : auto;
+width : 600px;
+}
+
+form.userform label{
+width : 200px;
+}
+
+.comment_content{
+border : 1px solid #BFBFBF;
+-moz-border-radius-bottomleft : 10px;
+-moz-border-radius-bottomright : 10px;
+-khtml-border-bottom-left-radius : 10px;
+-khtml-border-bottom-right-radius : 10px;
+padding : 5px;
+margin-bottom : 20px;
+
+}
+
+h3.comment{
+margin : 0px;
+padding-left:5px;
+border : 1px solid #BFBFBF;
+-moz-border-radius-topleft : 7px;
+-moz-border-radius-topright : 7px;
+-khtml-border-top-left-radius : 7px;
+-khtml-border-top-right-radius : 7px;
+background-color : #BFBFBF;
+font-weight : normal;
+font-size : 15px;
+
+}
+
+.second_menu{
+text-align:center;
+}
+
+#connection label{
+width:150px;
+}
+
+form#connection{
+position : absolute;
+top:50%;
+left:50%;
+margin-left:-320px;
+margin-top:-95px;
+padding:20px;
+display : block;
+width:600px;
+height:160px;
+background-color : white;
+border : 5px solid #1E5E7C;
+}
+
+#connection fieldset{
+margin : 0px;
+}
+
+.infobox {
+margin-left:auto;
+margin-right:auto;
+border : 2px solid #3A8433;
+width : 500px;
+margin-top : 20px;
+margin-bottom : 20px;
+padding-left : 15px;
+padding-right : 15px;
+padding-top : 5px;
+padding-bottom : 5px;
+background-color : #ACFFA4;
+font-size : 15px;
+}
+
+.infobox:before {
+float:left;
+content : url('gfx/ok.png');
+}
+
+.errorbox {
+margin-left:auto;
+margin-right:auto;
+border : 2px solid #912B2D;
+width : 500px;
+margin-top : 20px;
+margin-bottom : 20px;
+padding-left : 15px;
+padding-right : 15px;
+padding-top : 5px;
+padding-bottom : 5px;
+background-color : #FF4C4F;
+}
+
+
+table {
+border-collapse : collapse;
+margin-left : auto;
+margin-right : auto;
+}
+
+th {
+border-bottom : 2px solid #434343;
+}
+
+td {
+border-bottom : 1px dotted gray;
+padding : 5px;
+}
+
+.file th{
+border:none;
+border-bottom: 2px solid black;
+}
+
+.file td{
+border:none;
+}
+
+caption{
+text-align : center;
+margin-bottom : 10px;
+font-size : 18px;
+font-weight : bold;
+}
+
+.upgraded{
+color : green;
+}
+
+.installed{
+color : green;
+}
+
+.removed{
+color : red;
+}
+
+.date{
+font-style : italic;
+}
+
+.news_content table
+{
+border-collapse:collapse;
+}
+
+.news_content table, th, td
+{
+border: 1px solid #003669;
+}
+
+.news_content th{
+background-color : #9AB7FF;
+}
+
+.news_content a img{
+border-style:none;
+}
+
+.news_content img{
+margin-right:10px;
+margin-top:0px;
+margin-bottom:0px;
+margin-left:10px;
+}
+
+.news_content .caption{
+border :1px solid gray;
+padding:7px;
+}
+
+.sommaire{
+display : table-cell;
+border : 1px solid #003669;
+list-style-type : none;
+padding : 10px;
+}
+
+.sommaire ul{
+list-style-type : none;
+}
+
+.sommaire:before{
+content : "Sommaire";
+display : block;
+width : 70px;
+margin-left: auto;
+margin-right : auto;
+font-weight : bold;
+}
+
+
+
+
+
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 %}