diff --git a/dev-random/LICENSE.txt b/dev-random/LICENSE.txt new file mode 100644 index 0000000..5a8e332 --- /dev/null +++ b/dev-random/LICENSE.txt @@ -0,0 +1,14 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + diff --git a/dev-random/screenshot.png b/dev-random/screenshot.png new file mode 100644 index 0000000..a1e468b Binary files /dev/null and b/dev-random/screenshot.png differ diff --git a/dev-random/static/css/main.css b/dev-random/static/css/main.css new file mode 100644 index 0000000..7978af3 --- /dev/null +++ b/dev-random/static/css/main.css @@ -0,0 +1,218 @@ +@import url("pygments.css"); + +/******************************************************************************/ +/* General Style */ +/******************************************************************************/ + + +article, section, +header, footer, +aside, nav { + display: block; +} + +html { + width: 100%; + height: 100%; + margin: 0; + padding: 0; +} + +body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + min-width: 750px; + + background-color: white; + color: #101010; + + font-family: helvetica, arial, freesans, clean, sans-serif; + font-size: 95%; + line-height: 1.35em; + letter-spacing: .1em; +} + +h1, h2, h3, +h4, h5, h6 { + color: #333333; + + font-family: "Georgia", "FreeSerif", serif; + font-style: italic; + font-weight: bolder; +} + +h1 a, h2 a, +h3 a, h4 a, +h5 a, h6 a { + color: inherit; + + text-decoration: inherit; +} + +h1 a:hover, h2 a:hover, +h3 a:hover, h4 a:hover, +h5 a:hover, h6 a:hover { + text-decoration: inherit; +} + +a { + color: #2a6a88; + + font-weight: bold; + text-decoration: none; +} + + +a:hover { + text-decoration: underline; +} + + +pre { + margin: 1em .5em; + padding: .75em; + border: 1px solid silver; + background: #111111; + color: #ffffff; + + font-family: monospace; + line-height: 1.15em; + + overflow: auto; +} + + + +/******************************************************************************/ +/* Specific Styles */ +/******************************************************************************/ + + +.page .head h1 { + margin: .7em auto; + + font-family: Georgia, "Times New Roman", Times, serif; + font-size: 2.8em; + text-align: center; +} + +.widget ul li { + margin: .1em .4em; + + font-size: 0.8em; + letter-spacing: 0.2em; + text-decoration: none; + font-variant: small-caps; +} + +.content #page-title { + font-size: .9em; +} + + +.content .post { + clear: both; + margin: 1em 0 3em 0; +} + + +.post .post-header { + margin: 0; + padding: .1em; + font-family: Georgia, "Times New Roman", Times, serif; +} + + +.post .post-header time { + margin: 0; + padding: 0; + + font-size: .7em; + line-height: 1em; + text-transform: uppercase; + letter-spacing: .2em; + font-weight: lighter; +} + + +.post .post-header h1 { + margin: 0; + padding: 0; + + border-bottom: thin dashed silver; + + font-size: 1.5em; + font-weight: bolder; + font-style: normal; + letter-spacing: 0.0em; + line-height: 1em; +} + +.post .post-header h1:hover { + border-bottom: thin dashed #333; +} + +.post .post-header .meta { + font-size: .9em; + letter-spacing: 0.2em; + text-decoration: none; +} + + +.post .post-content { + clear: both; + margin: 0; + padding: .5em .1em; +} + + +.post .post-footer { + clear: both; + margin: 0; + padding: .1em; + + font-family: Georgia, "Times New Roman", Times, serif; +} + + +.post .post-footer .readmore { + font-size: 0.8em; + letter-spacing: 0.2em; + text-decoration: none; + font-variant: small-caps; +} + + +.page .foot p { + display: block; + width: 60%; + + text-align: center; + margin-left: auto; + margin-right: auto; +} + + + +/******************************************************************************/ +/* Misc */ +/******************************************************************************/ + +#github-link { + display: block; + position: absolute; + top: 0; + left: 0; + width: 50px; + height: 100px; + background-image: url("../img/corner.png"); + margin: 0; + border: none; + text-decoration: none; + color: transparent; + font-size: 0px; + text-decoration: none; +} + diff --git a/dev-random/static/css/pygments.css b/dev-random/static/css/pygments.css new file mode 100644 index 0000000..046ceca --- /dev/null +++ b/dev-random/static/css/pygments.css @@ -0,0 +1,69 @@ +pre .hll { background-color: #333333 } +pre .c { color: #008800; font-style: italic; background-color: #0f140f } /* Comment */ +pre .err { color: #ffffff } /* Error */ +pre .g { color: #ffffff } /* Generic */ +pre .k { color: #fb660a; font-weight: bold } /* Keyword */ +pre .l { color: #ffffff } /* Literal */ +pre .n { color: #ffffff } /* Name */ +pre .o { color: #ffffff } /* Operator */ +pre .x { color: #ffffff } /* Other */ +pre .p { color: #ffffff } /* Punctuation */ +pre .cm { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Multiline */ +pre .cp { color: #ff0007; font-weight: bold; font-style: italic; background-color: #0f140f } /* Comment.Preproc */ +pre .c1 { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Single */ +pre .cs { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Special */ +pre .gd { color: #ffffff } /* Generic.Deleted */ +pre .ge { color: #ffffff } /* Generic.Emph */ +pre .gr { color: #ffffff } /* Generic.Error */ +pre .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +pre .gi { color: #ffffff } /* Generic.Inserted */ +pre .go { color: #aaaaaa; } /* Generic.Output */ +pre .gp { color: #FFA500; } /* Generic.Prompt */ +pre .gs { color: #ffffff } /* Generic.Strong */ +pre .gu { color: #ffffff; font-weight: bold } /* Generic.Subheading */ +pre .gt { color: #ffffff } /* Generic.Traceback */ +pre .kc { color: #fb660a; font-weight: bold } /* Keyword.Constant */ +pre .kd { color: #fb660a; font-weight: bold } /* Keyword.Declaration */ +pre .kn { color: #fb660a; font-weight: bold } /* Keyword.Namespace */ +pre .kp { color: #fb660a } /* Keyword.Pseudo */ +pre .kr { color: #fb660a; font-weight: bold } /* Keyword.Reserved */ +pre .kt { color: #cdcaa9; font-weight: bold } /* Keyword.Type */ +pre .ld { color: #ffffff } /* Literal.Date */ +pre .m { color: #0086f7; font-weight: bold } /* Literal.Number */ +pre .s { color: #0086d2 } /* Literal.String */ +pre .na { color: #ff0086; font-weight: bold } /* Name.Attribute */ +pre .nb { color: #ffffff } /* Name.Builtin */ +pre .nc { color: #ffffff } /* Name.Class */ +pre .no { color: #0086d2 } /* Name.Constant */ +pre .nd { color: #ffffff } /* Name.Decorator */ +pre .ni { color: #ffffff } /* Name.Entity */ +pre .ne { color: #ffffff } /* Name.Exception */ +pre .nf { color: #ff0086; font-weight: bold } /* Name.Function */ +pre .nl { color: #ffffff } /* Name.Label */ +pre .nn { color: #ffffff } /* Name.Namespace */ +pre .nx { color: #ffffff } /* Name.Other */ +pre .py { color: #ffffff } /* Name.Property */ +pre .nt { color: #fb660a; font-weight: bold } /* Name.Tag */ +pre .nv { color: #fb660a } /* Name.Variable */ +pre .ow { color: #ffffff } /* Operator.Word */ +pre .w { color: #888888 } /* Text.Whitespace */ +pre .mf { color: #0086f7; font-weight: bold } /* Literal.Number.Float */ +pre .mh { color: #0086f7; font-weight: bold } /* Literal.Number.Hex */ +pre .mi { color: #0086f7; font-weight: bold } /* Literal.Number.Integer */ +pre .mo { color: #0086f7; font-weight: bold } /* Literal.Number.Oct */ +pre .sb { color: #0086d2 } /* Literal.String.Backtick */ +pre .sc { color: #0086d2 } /* Literal.String.Char */ +pre .sd { color: #0086d2 } /* Literal.String.Doc */ +pre .s2 { color: #0086d2 } /* Literal.String.Double */ +pre .se { color: #0086d2 } /* Literal.String.Escape */ +pre .sh { color: #0086d2 } /* Literal.String.Heredoc */ +pre .si { color: #0086d2 } /* Literal.String.Interpol */ +pre .sx { color: #0086d2 } /* Literal.String.Other */ +pre .sr { color: #0086d2 } /* Literal.String.Regex */ +pre .s1 { color: #0086d2 } /* Literal.String.Single */ +pre .ss { color: #0086d2 } /* Literal.String.Symbol */ +pre .bp { color: #ffffff } /* Name.Builtin.Pseudo */ +pre .vc { color: #fb660a } /* Name.Variable.Class */ +pre .vg { color: #fb660a } /* Name.Variable.Global */ +pre .vi { color: #fb660a } /* Name.Variable.Instance */ +pre .il { color: #0086f7; font-weight: bold } /* Literal.Number.Integer.Long */ diff --git a/dev-random/static/css/skeleton.css b/dev-random/static/css/skeleton.css new file mode 100644 index 0000000..02010f7 --- /dev/null +++ b/dev-random/static/css/skeleton.css @@ -0,0 +1,68 @@ + +.page { + display: block; + margin-top: 5%; +} + +.page .head, +.page .main, +.page .foot { + display: block; + width: 100%; + clear: both; +} + +.page .main { + display: table; + border-collapse: separate; + border-spacing: .5%; + width: 75%; + margin: .5em auto; + clear: both; +} + +.page .main .sidebar { + display: table-cell; + width: 25%; +} + +.page .main .content { + display: table-cell; + width: 74%; +} + +@media screen and (max-width: 800px) { + .page .main { + width: 100%; + clear: both; + } +} + +@media screen and (max-width: 700px) { + .page .main { + display: block; + } + + .page .main .sidebar, + .page .main .content { + display: block; + margin: 0 .5em; + width: 100%; + clear: both; + } + + .widget { + display: block; + } + + .widget ul, + .widget li { + display: inline; + } + + .widget h3 { display: none; } +} + +@media print { + .sidebar { display: none; } +} diff --git a/dev-random/static/img/corner.png b/dev-random/static/img/corner.png new file mode 100644 index 0000000..52e8690 Binary files /dev/null and b/dev-random/static/img/corner.png differ diff --git a/dev-random/static/js/hex2ascii.js b/dev-random/static/js/hex2ascii.js new file mode 100644 index 0000000..3dde36f --- /dev/null +++ b/dev-random/static/js/hex2ascii.js @@ -0,0 +1,20 @@ + +window.hex2ascii = {}; +window.hex2ascii.init = function() { + var els = document.getElementsByClassName('hex'), + hex, text, + i, j, e; + + for(i=0; i < els.length; i++) { + e = els[i]; + hex = e.innerHTML.split(' '); + text = ""; + + for(j=0; j < hex.length; j++) { + text += String.fromCharCode(parseInt(hex[j], 16)); + } + + e.innerHTML = text; + e.className = e.className.replace('hex',''); + } +}; diff --git a/dev-random/static/js/html5shiv.js b/dev-random/static/js/html5shiv.js new file mode 100644 index 0000000..74c9564 --- /dev/null +++ b/dev-random/static/js/html5shiv.js @@ -0,0 +1,3 @@ +/*! HTML5 Shiv pre3.5 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed + Uncompressed source: https://github.com/aFarkas/html5shiv */ +(function(a,b){function h(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function i(){var a=l.elements;return typeof a=="string"?a.split(" "):a}function j(a){var b={},c=a.createElement,f=a.createDocumentFragment,g=f();a.createElement=function(a){l.shivMethods||c(a);var f;return b[a]?f=b[a].cloneNode():e.test(a)?f=(b[a]=c(a)).cloneNode():f=c(a),f.canHaveChildren&&!d.test(a)?g.appendChild(f):f},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/\w+/g,function(a){return b[a]=c(a),g.createElement(a),'c("'+a+'")'})+");return n}")(l,g)}function k(a){var b;return a.documentShived?a:(l.shivCSS&&!f&&(b=!!h(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),g||(b=!j(a)),b&&(a.documentShived=b),a)}function p(a){var b,c=a.getElementsByTagName("*"),d=c.length,e=RegExp("^(?:"+i().join("|")+")$","i"),f=[];while(d--)b=c[d],e.test(b.nodeName)&&f.push(b.applyElement(q(b)));return f}function q(a){var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(n+":"+a.nodeName);while(d--)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function r(a){var b,c=a.split("{"),d=c.length,e=RegExp("(^|[\\s,>+~])("+i().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),f="$1"+n+"\\:$2";while(d--)b=c[d]=c[d].split("}"),b[b.length-1]=b[b.length-1].replace(e,f),c[d]=b.join("}");return c.join("{")}function s(a){var b=a.length;while(b--)a[b].removeNode()}function t(a){var b,c,d=a.namespaces,e=a.parentWindow;return!o||a.printShived?a:(typeof d[n]=="undefined"&&d.add(n),e.attachEvent("onbeforeprint",function(){var d,e,f,g=a.styleSheets,i=[],j=g.length,k=Array(j);while(j--)k[j]=g[j];while(f=k.pop())if(!f.disabled&&m.test(f.media)){for(d=f.imports,j=0,e=d.length;j",f="hidden"in c,f&&typeof injectElementWithStyles=="function"&&injectElementWithStyles("#modernizr{}",function(b){b.hidden=!0,f=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).display=="none"}),g=c.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var l={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:k};a.html5=l,k(b);var m=/^$|\b(?:all|print)\b/,n="html5shiv",o=!g&&function(){var c=b.documentElement;return typeof b.namespaces!="undefined"&&typeof b.parentWindow!="undefined"&&typeof c.applyElement!="undefined"&&typeof c.removeNode!="undefined"&&typeof a.attachEvent!="undefined"}();l.type+=" print",l.shivPrint=t,t(b)})(this,document) \ No newline at end of file diff --git a/dev-random/templates/archives.html b/dev-random/templates/archives.html new file mode 100644 index 0000000..1ba36dd --- /dev/null +++ b/dev-random/templates/archives.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block content_title %}{{ SITENAME }} — Archives{% endblock %} + +{%- block content %} +
+

Archives

+
+ {% for article in articles %} + {% if loop.first or article.date.strftime('%Y %m') != articles[loop.index0-1].date.strftime('%Y %m') %} +
+

{{ article.date.strftime('%B %Y') }}

+
    + {% endif %} + +
  • + + {{ article.title }} + +
  • + + {% if loop.last or article.date.strftime('%Y %m') != articles[loop.index0+1].date.strftime('%Y %m') %} +
+
+ {% endif %} + {% endfor %} +
+
+{% endblock content -%} diff --git a/dev-random/templates/article.html b/dev-random/templates/article.html new file mode 100644 index 0000000..ab5679c --- /dev/null +++ b/dev-random/templates/article.html @@ -0,0 +1,57 @@ +{% extends "base.html" %} + +{% block headers %} + {{ super() }} + + +{% endblock %} + +{% block title %}{{ article.title }} — {{ super() }}{% endblock %} + +{%- block content %} +
+
+ +

+ + {{ article.title }} + +

+ +
+
+ {{ article.content}} +
+ + {% if DISQUS_SITENAME %} +
+
+ + + blog comments powered by Disqus + {% endif %} +
+{% endblock content -%} diff --git a/dev-random/templates/author.html b/dev-random/templates/author.html new file mode 100644 index 0000000..e323690 --- /dev/null +++ b/dev-random/templates/author.html @@ -0,0 +1,5 @@ +{% extends "index.html" %} + +{% block title %}{{ super() }} — Articles de {{ author }}{% endblock %} + +{% block index_title %}Articles de {{ author }} :{% endblock %} diff --git a/dev-random/templates/base.html b/dev-random/templates/base.html new file mode 100644 index 0000000..1424ca4 --- /dev/null +++ b/dev-random/templates/base.html @@ -0,0 +1,65 @@ + + + + {% block headers %} + + {% block title %}{{ SITENAME }}{%endblock%} + + + + + {% if FEED_RSS %} + + {% endif %} + + + {% if GOOGLE_ANALYTICS %} + + {% endif %} + {% endblock headers %} + + +
+
+

+ {{ SITENAME }} +

+
+ +
+ {% include "includes/sidebar.html" %} + {% block content %} + {% endblock content %} +
+ + +
+ + diff --git a/dev-random/templates/categories.html b/dev-random/templates/categories.html new file mode 100644 index 0000000..0a5b0f4 --- /dev/null +++ b/dev-random/templates/categories.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block title %}{{ super() }} — Catégories{% endblock title %} + +{%- block content %} +
+

Catégories

+
    + {% for category, n in categories %} +
  • {{ category }} ({{ n|count }} articles)
  • + {% endfor %} +
+
+{% endblock content -%} diff --git a/dev-random/templates/category.html b/dev-random/templates/category.html new file mode 100644 index 0000000..0a5dade --- /dev/null +++ b/dev-random/templates/category.html @@ -0,0 +1,5 @@ +{% extends "index.html" %} + +{% block title %}{{ super() }} — Articles dans la catégorie «{{ category }}»{% endblock %} + +{% block index_title %}Articles dans la catégorie «{{ category }}» :{% endblock %} diff --git a/dev-random/templates/includes/sidebar.html b/dev-random/templates/includes/sidebar.html new file mode 100644 index 0000000..3c42ef9 --- /dev/null +++ b/dev-random/templates/includes/sidebar.html @@ -0,0 +1,46 @@ + diff --git a/dev-random/templates/index.html b/dev-random/templates/index.html new file mode 100644 index 0000000..11314d1 --- /dev/null +++ b/dev-random/templates/index.html @@ -0,0 +1,64 @@ +{% extends "base.html" %} + +{%- block content %} +
+

{% block index_title %}Tous les articles{% endblock index_title %}

+ + {% for article in articles_page.object_list %} + + {% endfor %} + + {%- if articles_page %} + + {%- endif%} +
+{% endblock content -%} diff --git a/dev-random/templates/page.html b/dev-random/templates/page.html new file mode 100644 index 0000000..f0bc3c9 --- /dev/null +++ b/dev-random/templates/page.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} + +{% block title %}{{ super() }} — {{ page.url }}{% endblock title %} + +{%- block content %} +
+

{{ page.title }}

+ {{ page.content }} +
+{% endblock content -%} diff --git a/dev-random/templates/tag.html b/dev-random/templates/tag.html new file mode 100644 index 0000000..ca4fc94 --- /dev/null +++ b/dev-random/templates/tag.html @@ -0,0 +1,6 @@ +{% extends "index.html" %} + +{% block title %}{{ super() }} — Articles avec le mot clé « {{ tag }} »{% endblock %} + +{% block index_title %}Articles avec le mot clé « {{ tag }} » :{% endblock %} + diff --git a/dev-random/templates/tags.html b/dev-random/templates/tags.html new file mode 100644 index 0000000..b95d401 --- /dev/null +++ b/dev-random/templates/tags.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block title %}{{ super() }} — Mots-clés{% endblock title %} + +{%- block content %} +
+

Mots-clés

+
    + {% for tag in tag_cloud %} +
  • {{ tag.0 }}
  • + {% endfor %} +
+
+{% endblock content -%}