From c84877a63ae3a03cad09f3c077b8c92f514cc0b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Tue, 11 Sep 2012 22:22:24 +0200 Subject: [PATCH 1/4] Modif dynastie_root --- wsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wsgi.py b/wsgi.py index ea6038b..9a4e7c6 100644 --- a/wsgi.py +++ b/wsgi.py @@ -18,7 +18,7 @@ import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dynastie.settings") -dynastie_root = '/home/soutade/Projets_Perso/dynastie2/dynastie/' +dynastie_root = '/home/soutade/dynastie/' if dynastie_root not in sys.path: sys.path.append(dynastie_root) dynastie_root += 'dynastie/' From 6b8e1ad0a2ee7f19118c66c876c50101252916e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Thu, 11 Oct 2012 19:00:26 +0200 Subject: [PATCH 2/4] Fix a bug in edit_post template --- templates/edit_post.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/edit_post.html b/templates/edit_post.html index 6a032d9..0168549 100644 --- a/templates/edit_post.html +++ b/templates/edit_post.html @@ -9,7 +9,7 @@ {% endblock %} {% block content %} -
{% csrf_token %} +{% csrf_token %} {{ form.as_p }} From fa497ae59aa456c2f36cfe414ad5ee6f78d5ee80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Sat, 20 Oct 2012 21:05:02 +0200 Subject: [PATCH 3/4] Forgot an s --- views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views.py b/views.py index f9dbe3c..e3327bf 100644 --- a/views.py +++ b/views.py @@ -564,7 +564,7 @@ def add_comment(request, post_id, parent_id): emails[email] = comment.author - if post.author.email not in email: + if post.author.email not in emails: emails[post.author.email] = post.author.first_name if len(emails) > 0: From 6e292d9e2dde674fb615b2696d67cf4bf5fca59a Mon Sep 17 00:00:00 2001 From: Gregory Soutade Date: Tue, 6 Nov 2012 20:52:07 +0100 Subject: [PATCH 4/4] Add blog.soutade.fr as example --- sites/blog.soutade.fr/_archive.html | 13 + sites/blog.soutade.fr/_base.html | 67 +++++ sites/blog.soutade.fr/_base_post.html | 70 +++++ sites/blog.soutade.fr/_category.html | 13 + sites/blog.soutade.fr/_index.html | 15 ++ sites/blog.soutade.fr/_post.html | 32 +++ sites/blog.soutade.fr/about.html | 86 ++++++ sites/blog.soutade.fr/css/blog.css | 366 ++++++++++++++++++++++++++ sites/blog.soutade.fr/js/base64.js | 142 ++++++++++ sites/blog.soutade.fr/js/blog.js | 93 +++++++ 10 files changed, 897 insertions(+) create mode 100755 sites/blog.soutade.fr/_archive.html create mode 100755 sites/blog.soutade.fr/_base.html create mode 100644 sites/blog.soutade.fr/_base_post.html create mode 100755 sites/blog.soutade.fr/_category.html create mode 100755 sites/blog.soutade.fr/_index.html create mode 100755 sites/blog.soutade.fr/_post.html create mode 100755 sites/blog.soutade.fr/about.html create mode 100755 sites/blog.soutade.fr/css/blog.css create mode 100755 sites/blog.soutade.fr/js/base64.js create mode 100644 sites/blog.soutade.fr/js/blog.js diff --git a/sites/blog.soutade.fr/_archive.html b/sites/blog.soutade.fr/_archive.html new file mode 100755 index 0000000..5ca1e8d --- /dev/null +++ b/sites/blog.soutade.fr/_archive.html @@ -0,0 +1,13 @@ + +
Archives
+ +
+ +
+ |
Écrit par
+
+
+ +
+ +
diff --git a/sites/blog.soutade.fr/_base.html b/sites/blog.soutade.fr/_base.html new file mode 100755 index 0000000..61ef29c --- /dev/null +++ b/sites/blog.soutade.fr/_base.html @@ -0,0 +1,67 @@ + + + + + + + + Blog de Grégory Soutadé + + + + + + +
+ +
+
+ +
+ +
+ +
+ + diff --git a/sites/blog.soutade.fr/_base_post.html b/sites/blog.soutade.fr/_base_post.html new file mode 100644 index 0000000..d0ae825 --- /dev/null +++ b/sites/blog.soutade.fr/_base_post.html @@ -0,0 +1,70 @@ + + + + + + + + + + Blog de Grégory Soutadé + + + + + + + +
+ +
+
+ +
+ +
+ +
+ + diff --git a/sites/blog.soutade.fr/_category.html b/sites/blog.soutade.fr/_category.html new file mode 100755 index 0000000..575ceb4 --- /dev/null +++ b/sites/blog.soutade.fr/_category.html @@ -0,0 +1,13 @@ + +
+ +
+ +
+ |
Écrit par
+
+
+ +
+ +
diff --git a/sites/blog.soutade.fr/_index.html b/sites/blog.soutade.fr/_index.html new file mode 100755 index 0000000..468d17c --- /dev/null +++ b/sites/blog.soutade.fr/_index.html @@ -0,0 +1,15 @@ + + +
+ +
+ |
Écrit par
+
+
+ +
+ + More posts... + + +
diff --git a/sites/blog.soutade.fr/_post.html b/sites/blog.soutade.fr/_post.html new file mode 100755 index 0000000..e8b8231 --- /dev/null +++ b/sites/blog.soutade.fr/_post.html @@ -0,0 +1,32 @@ + + +
+
+ +
+ |
Écrit par
+
+
+ + + +
# De, le
+ + Répondre
+ + Auteur :


+ e-mail* :


+ Le commentaire :


+ +
+
+ + Auteur :


+ e-mail* :


+ Le commentaire :


+

+ * Seulement pour être notifié d'une réponse à cet article +
+
+
+
diff --git a/sites/blog.soutade.fr/about.html b/sites/blog.soutade.fr/about.html new file mode 100755 index 0000000..03223cf --- /dev/null +++ b/sites/blog.soutade.fr/about.html @@ -0,0 +1,86 @@ + + + + + + + + Blog de Grégory Soutadé + + + + + + + + +
+ +
+
+ Bonjour, je m'appelle Grégory Soutadé. Ingénieur en informatique (logiciel embarqué). Actuellement en poste chez Neotion (dans nos beaux locaux de Sophia-Antipolis).

+ Pour me contatcter :
+
    +
  • PGEgaHJlZj0ibWFpbHRvOmdyZWdvcnlAc291dGFkZS5mciI+Z3JlZ29yeUBzb3V0YWRlLmZyPC9hPg==
  • +
  • Facebook
  • +
+
+ +
+ +
+ + diff --git a/sites/blog.soutade.fr/css/blog.css b/sites/blog.soutade.fr/css/blog.css new file mode 100755 index 0000000..8648de7 --- /dev/null +++ b/sites/blog.soutade.fr/css/blog.css @@ -0,0 +1,366 @@ +html +{ + height:100%; +} + +body +{ + /* margin: 0 auto; */ + padding: 0; + background-color: #ffffe2; + margin-left: 20%; + margin-right: 20%; + height:100%; +} + +div.body +{ + position:relative; + top:-315px; + display:table; + width:100%; + height:100%; + background-color:white; + border-style:solid; + border-color:black; + border-width:3px; + margin-top:150px; +} + +#logo +{ + z-index:2; + display:inline; + position:relative; + /* top:-135px; */ + top: 33px; + left:-27px; +} + +#title a +{ + z-index:12; + display:inline; + color:black; + font-family: Verdana,Geneva,Arial,Helvetica,Sans-Serif; + font-size: 50px; + padding-left:180px; +} + +#header +{ + padding-top:50px; + padding-bottom:50px; +} + +#recents_title +{ + font-weight:bold; +} + +div.table {display:table;} +div.table-row {display:table-row;} +div.table-cell {display:table-cell;} + +div.content +{ + display:table-cell; + padding-left:3%; + padding-right:2%; + /* margin-top:2%; */ + width:75%; +} + +div.menu +{ + display:table-cell; + width:20%; + margin:8px; +} + +#menu_main +{ + padding:10px; +} + +div.menu > div.menu_content +{ + background-color: #edeee7; + border-style : solid ridge ridge solid; + border-color:#d4d6c6; + border-width:2px; + border-bottom-width:4px; + border-right-width:4px; + padding:6px; + margin :10px; +} + +div.menu > div.menu_content > div.menu_content_header +{ + font-family: Tahoma,Arial,Helvetica,Sans-Serif; + font-size: 17px; + background-image: url("/images/BlockHeaderIcon.png"); + background-repeat: no-repeat; + background-position: left center; + padding-left: 18px; + color: #475028; +} + +div.menu > div.menu_content > div.menu_content_content +{ + color: #5e6a34; +} + +div.menu_content_content a +{ + font-family: Tahoma,Arial,Helvetica,Sans-Serif; + color: #5e6a34; + font-weight: normal; + font-style: normal; +} + +div.menu > div.menu_content > div.menu_content_content a:link +{ + font-family: Tahoma,Arial,Helvetica,Sans-Serif; + color: #5e6a34; + font-weight: normal; + font-style: normal; +} + +div.menu > div.menu_content > div.menu_content_content a:hover +{ + font-family: Tahoma,Arial,Helvetica,Sans-Serif; + color: #5e6a34; + font-weight: normal; + font-style: normal; +} + +div.menu > div.menu_content > div.menu_content_content ul +{ + padding-left:20px; +} + +div.menu > div.menu_content > div.menu_content_content li +{ + list-style-image: url("/images/BlockContentBullets.png"); +} + +div.footer +{ + width:100%; + display:block; + text-align:center; + padding:15px; +} + +div.post +{ + display:block; + margin-bottom:100px; +} + +div.post > div.post_header +{ + display:block; + font-family: Tahoma,Arial,Helvetica,Sans-Serif; + color: #3c3e2d; + padding-bottom:5px; +} + +div.post > div.post_header > div.title > a +{ + display:block; + text-decoration:none; + margin: 0.2em 0; + padding: 0; + font-weight:normal; + font-style:normal; + letter-spacing:normal; + word-spacing:normal; + font-variant:normal; + text-decoration:none; + font-variant:normal; + text-transform:none; + text-align:left; + text-indent:0; + line-height:inherit; + font-family: Verdana, Geneva, Arial, Helvetica, Sans-Serif; + font-size: 26px; + color: #181B0D; +} + +div.post > div.post_header > div.title > a:hover +{ + display:block; + text-decoration:none; + margin: 0.2em 0; + padding: 0; + font-weight:normal; + font-style:normal; + letter-spacing:normal; + word-spacing:normal; + font-variant:normal; + text-decoration:none; + font-variant:normal; + text-transform:none; + text-align:left; + text-indent:0; + line-height:inherit; + font-family: Verdana, Geneva, Arial, Helvetica, Sans-Serif; + font-size: 26px; + color: #181B0D; +} + +div.post > div.post_header > div.post_sub_header +{ + display:block; + background-color: #edeee7; + /* margin-left : 10px; */ + padding : 3px; +} + +div.post > div.post_header > div.post_sub_header > div.author_icon +{ + display:inline; + background-image: url('/images/authoricon.png'); + background-repeat: no-repeat; + background-position: center left; + padding-left: 18px; +} + +div.post > div.post_header > div.post_sub_header > div.author_icon > div.author +{ + display:inline; +} + +div.post > div.post_header > div.post_sub_header > div.date +{ + display:inline; + font-family: Tahoma,Arial,Helvetica,Sans-Serif; + background-image: url('/images/dateicon.png'); + background-repeat: no-repeat; + background-position: left center; + padding-left: 18px; +} + +div.post > div.post_content +{ + display:block; + margin-top:1%; + font-family: Tahoma, Arial, Helvetica, Sans-Serif; + color: #171811; + +} + +div.recents +{ + margin-left:20px; +} + +#archive_year, #category_name +{ + font-size:50; + padding-bottom:20px; +} + +div.navigation +{ + margin:5px; + text-align:center; +} + +a, a:link, a:hover +{ + font-family: Tahoma,Arial,Helvetica,Sans-Serif; + color: #818f00; + text-decoration:none; +} + +h1, h2, h3, h4, h5, h6, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited +{ + font-weight: normal; + font-style: normal; +} + +h2, h2 a, h2 a:link, h2 a:visited, h2 a:hover +{ + font-family: Verdana,Geneva,Arial,Helvetica,Sans-Serif; + font-size: 26px; + color: #8c9d4d; +} + +h3, h3 a, h3 a:link, h3 a:visited, h3 a:hover +{ + font-family: Verdana,Geneva,Arial,Helvetica,Sans-Serif; + font-size: 21px; + color: #65684b; +} + +h4 +{ + font-size: 1em; +} + +ul li +{ + list-style-image: url("/images/bullet.png"); +} + +.comments +{ + padding-left:1%; + padding-top:1%; + padding-bottom:1%; + margin-bottom:5%; +} + +.comment +{ + background-color: #edeceb; + border-style:solid; + border-radius: 10px; + border-color: #8e785b; + /* margin-bottom:3%; */ + padding:5px; + margin:15px +} + +.comment .comment +{ + /* padding-top:15px; */ + /* padding-left:15px; */ + /* margin-bottom:2px; */ + margin-top:15px; + margin-left:15px; + margin-bottom:1px; + margin-right:1px; +} + +.comment_content +{ + padding-top:5px; + padding-left:5px; + margin-bottom:5px; +} + +.comment_index, .comment_author, .comment_date +{ + display: inline +} + +.comment_author, .comment_date +{ + margin-left:5px; + margin-right:5px; +} + +.comment_author +{ + font-weight:bold; +} + +.response +{ + display:none; + padding:5px; +} \ No newline at end of file diff --git a/sites/blog.soutade.fr/js/base64.js b/sites/blog.soutade.fr/js/base64.js new file mode 100755 index 0000000..80f8ee7 --- /dev/null +++ b/sites/blog.soutade.fr/js/base64.js @@ -0,0 +1,142 @@ +/** + * + * Base64 encode / decode + * http://www.webtoolkit.info/ + * + **/ + +var Base64 = { + + // private property + _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", + + // public method for encoding + encode : function (input) { + var output = ""; + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; + var i = 0; + + input = Base64._utf8_encode(input); + + while (i < input.length) { + + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + + enc1 = chr1 >> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); + enc4 = chr3 & 63; + + if (isNaN(chr2)) { + enc3 = enc4 = 64; + } else if (isNaN(chr3)) { + enc4 = 64; + } + + output = output + + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); + + } + + return output; + }, + + // public method for decoding + decode : function (input) { + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + + while (i < input.length) { + + enc1 = this._keyStr.indexOf(input.charAt(i++)); + enc2 = this._keyStr.indexOf(input.charAt(i++)); + enc3 = this._keyStr.indexOf(input.charAt(i++)); + enc4 = this._keyStr.indexOf(input.charAt(i++)); + + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + + output = output + String.fromCharCode(chr1); + + if (enc3 != 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 != 64) { + output = output + String.fromCharCode(chr3); + } + + } + + output = Base64._utf8_decode(output); + + return output; + + }, + + // private method for UTF-8 encoding + _utf8_encode : function (string) { + string = string.replace(/\r\n/g,"\n"); + var utftext = ""; + + for (var n = 0; n < string.length; n++) { + + var c = string.charCodeAt(n); + + if (c < 128) { + utftext += String.fromCharCode(c); + } + else if((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } + else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + + return utftext; + }, + + // private method for UTF-8 decoding + _utf8_decode : function (utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + } + +} \ No newline at end of file diff --git a/sites/blog.soutade.fr/js/blog.js b/sites/blog.soutade.fr/js/blog.js new file mode 100644 index 0000000..325d87f --- /dev/null +++ b/sites/blog.soutade.fr/js/blog.js @@ -0,0 +1,93 @@ + +// http://www.quirksmode.org/js/cookies.html +function readCookie(name) { + var nameEQ = name + "="; + var ca = document.cookie.split(';'); + for(var i=0;i < ca.length;i++) { + var c = ca[i]; + while (c.charAt(0)==' ') c = c.substring(1,c.length); + if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); + } + return null; +} + +function init() +{ + var i=0; + + var author = readCookie("author"); + var email = readCookie("email"); + + for (i=0;;i++) + { + id = "response_"+i; + var div = document.getElementById(id); + + if (div == null) break; + + var inputs = div.getElementsByTagName("input"); + for(a=0; a