Bugs corrections and added the design of my own blog as demo code

This commit is contained in:
Phyks 2013-11-17 00:32:35 +01:00
parent 0c99b44c9a
commit 91b1e0396e
11 changed files with 358 additions and 7 deletions

View File

@ -844,8 +844,8 @@ for i in os.listdir("blog/"):
content = fh.read()
fh.seek(0)
if content.find("#header") != -1:
content = content.replace("#header",
if content.find("#include_header_here") != -1:
content = content.replace("#include_header_here",
header.replace("@title",
(params["BLOG_TITLE"] +
" - "+i[:-5].title()),
@ -854,5 +854,5 @@ for i in os.listdir("blog/"):
fh.write(content)
fh.seek(0)
if content.find("#footer") != -1:
fh.write(content.replace("#footer", footer, 1))
if content.find("#include_footer_here") != -1:
fh.write(content.replace("#include_footer_here", footer, 1))

View File

@ -4,7 +4,7 @@
@title=Un exemple d'article
@tags=test
-->
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<p>1Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>

29
raw/contact.html Normal file
View File

@ -0,0 +1,29 @@
#include_header_here
<article>
<aside class="aside_article">
<p class="month">Phyks</p>
</aside>
<div class="article">
<h1 class="article_title">Contact</h1>
<h2>E-mail</h2>
<p>[FR] Vous pouvez me contacter par e-mail à l'adresse suivante (pseudo@domaine.me) :</p>
<p>[EN] You can contact me using the following e-mail address (nick@domain.me) :</p>
<p class="center"><span class="contact_e-mail">@</span></p>
<h2>Jabber</h2>
<p>[FR] Vous pouvez également me joindre sur Jabber :</p>
<p>[EN] I'm also available very often on Jabber :</p>
<p class="center"><span class="contact_e-mail">@</span></p>
<h2>Divers</h2>
<ul>
<li>Mon <a href="https://github.com/phyks/">profil Github</a>.</li>
<li>[FR] Tous les codes que j'écris et les articles de ce blog sont sous licence <em>BEERWARE</em> (sauf mention contraire). Vous êtes libres de faire tout ce que vous voulez avec. Si vous souhaitez me soutenir, le meilleur moyen reste de liartager ces informations autour de vous (et de citer la source :). Vous liouvez également me liayer <del>une bière</del> un soda <em>via</em> Flattr ou tout autre moyen qui vous convient.</li>
<li>[EN] All my source codes and articles on my blog are under a <em>BEERWARE</em> license (except if anything special is specified). You are free to do whatever you want with them. If you want to support me, the best way is to share these pieces of information around you (and to cite the source :). You can also pay me a <del>beer</del> soda <em>via</em> Flattr or any mean you want.</li>
</ul>
</div>
</article>
#include_footer_here

291
raw/design.css Normal file
View File

@ -0,0 +1,291 @@
html, body {
margin: 0;
padding: 0;
background-color: rgb(35, 34, 34);
background-image: url('img/bg.png');
font-family: "DejaVu Sans", Verdana, "Bitstream Vera Sans", Geneva, sans-serif;
line-height: 1.5em;
text-align: justify;
}
/* General classes */
.monospace {
font-family: "Lucida Console", Monaco, monospace;
}
.center {
text-align: center;
}
.contact_e-mail:before {
unicode-bidi: bidi-override;
direction: rtl;
content: "em.skyhp";
}
.contact_e-mail:after {
unicode-bidi: bidi-override;
direction: rtl;
content: "skyhp";
}
/* Wrapper */
#wrapper {
padding-left: 17em;
transition: all 0.4s ease 0s;
}
/* Hide the header and display it only in responsive view */
#header {
display: none;
text-align: center;
width: 50%;
margin: auto;
font-size: 0.9em;
padding: 0.3em;
}
#header h1 {
font-weight: normal;
padding: 0;
margin: 0;
margin-top: 0.5em;
background-color: rgb(117, 170, 39);
background-image: url("img/sidebar.png");
border: 1px solid black;
border-radius: 0.2em;
padding: 0.6em;
}
#header a {
color: white;
text-decoration: none;
}
/* Sidebar */
#sidebar-wrapper {
margin-left: -16em;
position: fixed;
left: 16em;
width: 16em;
height: 100%;
background: url('img/sidebar.png') repeat scroll 0% 0% rgb(17, 78, 121);
overflow-y: auto;
transition: all 0.4s ease 0s;
color: white;
padding-left: 0.5em;
padding-right: 0.5em;
font-size: 0.9em;
z-index: 1000;
}
#sidebar-wrapper a {
color: white;
}
#sidebar-wrapper h2 {
font-weight: normal;
text-align: center;
margin: 0.5em;
}
#sidebar-title {
font-size: 2em;
margin-top: 0.5em;
padding: 0.7em 0.5em;
background-color: rgb(117, 170, 39);
background-image: url("img/sidebar.png");
border-radius: 0.2em;
font-weight: normal;
text-align: center;
border: 1px solid black;
}
#sidebar-title a {
text-decoration: none;
}
#sidebar-tags {
text-align: center;
}
#sidebar-tags .tag {
display: inline;
}
#sidebar-tags .tag img {
width: 20%;
max-width: 4em;
margin: 0.5em 0.5em 1.5em;
}
#sidebar-tags .tag .popup {
position: absolute;
margin-left: -35%;
word-wrap: break-word;
width: 33%;
margin-top: 1em;
color: rgb(117, 170, 39);
background: none repeat scroll 0% 0% rgba(0, 0, 0, 0.9);
padding: 1em;
border-radius: 3px;
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.5);
opacity: 0;
text-align: center;
transform: scale(0) rotate(-12deg);
transition: all 0.25s ease 0s;
}
#sidebar-tags .tag:hover .popup, #sidebar-tags .tag:focus .popup
{
transform: scale(1) rotate(0);
opacity: 0.8;
}
#sidebar-articles {
opacity: 0.7;
text-align: center;
list-style-type: none;
padding: 0;
}
#sidebar-links {
list-style-type: none;
text-align: center;
padding: 0;
}
#sidebar-links li {
background-color: rgb(117, 170, 39);
background-image: url("img/sidebar.png");
text-align: right;
margin-right: 2em;
padding-right: 1em;
margin-bottom: 1em;
margin-left: -0.5em;
height: 2em;
border-top-right-radius: 0.7em;
border-bottom-right-radius: 0.7em;
border: 1px solid black;
transition: all 0.4s ease 0s;
}
#sidebar-links li:hover {
transform: scale(1.1);
}
/* Articles */
article {
max-width: 70em;
margin: auto;
}
.article {
background-color: white;
margin-left: 4.5em;
padding: 1.3em;
position: relative;
margin-bottom: 3em;
min-height: 5.48em;
}
#articles article:last-child {
margin-bottom: 0;
}
#articles h1, #articles h2, #articles h3, #articles h4, #articles h5 {
font-family: "Lucida Console", Monaco, monospace;
font-weight: normal;
}
article .article_title {
text-align: center;
margin-top: 0.1em;
margin-bottom: 1.5em;
}
#articles {
width: calc(100% - 1.5em);
padding-top: 1.5em;
}
#articles h1 {
margin: 0;
}
.aside_article {
position: absolute;
background-color: white;
font-size: 1.5em;
height: 4.5em;
padding: 0 0.5em;
-webkit-transform-origin: 100% 0;
-webkit-transform: translateX(-100%) translateY(1.2em) rotate(-90deg);
transform-origin: 100% 0;
transform: translateX(-100%) translateY(1.2em) rotate(-90deg);
}
.aside_article p {
display: block;
}
.aside_article .day {
float: right;
margin-bottom: 0.3em;
margin-top: 0.4em;
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
width: 100%;
text-align: center;
}
#articles .date {
font-size: 0.8em;
font-style: italic;
text-align: right;
margin: 0;
}
.archives {
text-align: center;
color: white;
}
.archives a {
color: white;
}
/* Media queries */
@media (max-width: 767px) {
#wrapper {
padding-left: 1.5em;
}
#sidebar-wrapper {
left: 0;
}
#sidebar-wrapper:hover {
left: 16em;
width: 16em;
transition: all 0.4s ease 0s;
}
#sidebar-title {
display: none;
}
}
@media (max-width: 600px) {
.aside_article {
display: none;
}
.article {
margin-left: auto;
}
#header {
display: block;
}
}

18
raw/divers.html Normal file
View File

@ -0,0 +1,18 @@
#include_header_here
<article>
<aside class="aside_article">
<p class="month">Divers</p>
</aside>
<div class="article">
<h1 class="article_title">Liens divers</h1>
<ul>
<li><a href="#base_url/pub/">Divers documents en vrac</a></li>
<li><a href="#base_url/pub/respawn">Mon respawn</a></li>
<li><a href="http://git.phyks.me">Mon dépôt Git, alternatif à Github</a></li>
<li><a href="#base_url/autohebergement.html">Ma doc sur l'autohébergement</a></li>
<li><a href="http://snippet.phyks.me">Mes snippets</a></li>
<li><a href="http://velib.phyks.me">Ma webapp vélib</a> (cf <a href="https://github.com/phyks/BikeInParis">le projet sur Github</a>)</li>
</ul>
</div>
</article>
#include_footer_here

View File

@ -11,7 +11,7 @@
<div id="wrapper">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<h1 id="sidebar-title"><a href="#base_url">~Phyks</a></h1>
<h1 id="sidebar-title"><a href="@blog_url">~Phyks</a></h1>
<h2>Catégories</h2>
<nav id="sidebar-tags">
@ -34,7 +34,7 @@
<!-- Page content -->
<div id="header">
<h1><a href="#base_url">~Phyks</a></h1>
<h1><a href="@blog_url">~Phyks</a></h1>
</div>
<div id="articles">

11
raw/humans.txt Normal file
View File

@ -0,0 +1,11 @@
/* AUTHOR */
Phyks (Lucas Verney)
Website : http://phyks.me
Send me an e-mail : phyks@phyks.me
Or contact me on jabber : phyks@phyks.me
Or meet me on github : https://github.com/phyks/
/* SITE */
Last update: 2013/09/15
Standards: HTML5, CSS3 (valid)
Software: Only open-source software :)

BIN
raw/img/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

BIN
raw/img/sidebar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@ -2,6 +2,8 @@ BLOG_TITLE = Phyks' blog
NB_ARTICLES_INDEX = 20
BLOG_URL = http://localhost/Blog_test/blog/
IGNORE_FILES =
#RSS params
WEBMASTER = webmaster@phyks.me (Phyks)
LANGUAGE = fr

BIN
raw/tags/test.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB