logo

blog

Unnamed repository; edit this file 'description' to name the repository.
commit 94d1fafea4d6420177dd79b9423daed00bf6cd3c
parent 02cd3ff0f7d625bf3b355743725aa653605f0293
Author: lanodan <lanodan.delta@free.fr>
Date:   Fri, 18 Jul 2014 07:13:20 +0200

Major change

Diffstat:
404.php | 2+-
about.php | 97++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------
css/basic.css | 12+++---------
css/footer.css | 2+-
css/live.css | 3---
css/navbar.css | 20+++++++++++++++-----
footer.php | 14+++++++-------
index.php | 19+++++++++++--------
lang/en.php | 26+++++++++++++-------------
lang/fr.php | 26+++++++++++++-------------
lang/index.php | 1-
lang/lang.php | 9++++++---
live.php | 2+-
navbar.php | 53++++++++++++++++++++++++++++-------------------------
post.php | 2+-
rss.php | 13++++++++-----
16 files changed, 175 insertions(+), 126 deletions(-)

diff --git a/404.php b/404.php @@ -5,7 +5,7 @@ <html> <head> <meta charset="utf-8"> - <title>404 not found<?=baseTitle?></title> + <title>404 not found<?=$locale['fullTitle']?></title> <link rel="stylesheet" type="text/css" href="css/basic.css"> <link rel="stylesheet" type="text/css" href="css/navbar.css"> <link rel="stylesheet" type="text/css" href="css/footer.css"> diff --git a/about.php b/about.php @@ -5,61 +5,98 @@ <html> <head> <meta charset="utf-8"> - <title><?=about.baseTitle?></title> + <title><?=$locale['about'].$locale['fullTitle']?></title> <link rel="stylesheet" type="text/css" href="css/basic.css"> <link rel="stylesheet" type="text/css" href="css/navbar.css"> <link rel="stylesheet" type="text/css" href="css/footer.css"> </head> <body> <?php include 'navbar.php'; ?> - <section id="content" style="text-align: left;"> - <h1><?=about?></h1> - <p>Haelwenn MONNIER, <?=date_diff(date_create('1998-04-02'), date_create('today'))->y?> - <?php if ($lang == 'fr'){ ?> - ans. J'utilise UNIX/Linux depuis que je suis petit. Mon but est de vivre de la programmation (que j'apprend depuis environ 2012) ou de l'Art (ma plus ancienne passion). je sais administrer un server web, minecraft. Je defend les logiciels libres (et le mouvement LGBT). Je parle Francais(langue natale), Anglais et un peu d'Espagnol et de Japonnais. Je vit en Bretagne et je suis présent au hackerspace, <a href="//breizh-entropy.org/">Breizh-Entropy</a>. - <?php } else { ?> - years. I've alway used UNIX/Linux. I'd like to live by my coding (I learn it since 2012) or Art (my older passion). I can administrate servers (web, minecraft[game]). I support open software (and LGBT). I can talk French(native), English and a bit of Spannish and Japannese. I live in brittany and I'm at an hackerspace, <a href="//breizh-entropy.org/">Breizh-Entropy</a>. - <?php } ?></p> - <code> - <span class="code_comment">-----BEGIN GEEK CODE BLOCK-----<br> - Version: 3.12</span><br> - GCS d-- s: a--- C++ UL+++ P+++ L++++ E--- W+++ N o-- K w---<br> - O M- V PS++ PE-- Y+ PGP++ t 5 X R++ !tv b+ DI- D+<br> - G e-- h r++ y<br> - <span class="code_comment">------END GEEK CODE BLOCK------</span> - </code> + <section> + <h1><?=$locale['about']?></h1> + <p>Haelwenn MONNIER, <?=date_diff(date_create('1998-04-02'), date_create('today'))->y?> + <?php if ($locale == 'fr'){ ?> + ans. Aussi connut sous le pseudonyme lanodan, j'utilise UNIX/Linux depuis que je suis petit, aujourd'hui je connait donc très bien le domaine. Mon but est de vivre de la programmation (que j'apprend depuis environ 2012) et/ou de l'Art (mes plus anciennes passions). J'aime explorer et créer ce dont j'ai besoin moi-même ou en communautée. Je défend les logiciels libres et l'égalitée. Je parle Français (langue maternelle), Anglais et un peu d'Espagnol et de Japonnais. Je vit en Bretagne et je suis présent au hackerspace, <a href="//breizh-entropy.org/">Breizh-Entropy</a>. + <?php } else { ?> + years. Also know as lanodan, I use UNIX/Linux since my first years(~4 years old) so now I now it very well. I'd like to live by coding (I learn it since 2012) or Art (theses 2 are my passions). I love to explore and create what I need myself or with others. I act for free and open software, and egality. I talk French(native language), English and a bit of Spannish and Japannese. I live in brittany and I'm at <a href="//breizh-entropy.org/">Breizh-Entropy</a>, a hackerspace. + <?php } ?></p> + <pre><code> -----BEGIN GEEK CODE BLOCK----- + Version: 3.12 + GAT dpu s+: a--- C++ UL+++ P++ L++++ E--- W+++ N+ o+ K++ w--- + O- M- V- PS+++ PE-- Y++ PGP+++ t+ 5 X R++ !tv b- DI D- + G++ e-- h r++ y + ------END GEEK CODE BLOCK------</code></pre> <ul> - <li><strong>GPG:</strong> 0x4BBEBBAD (8E4B AA5E E6FB D5A8 D04F 3BE5 C873 8479 4BBE BBAD) expires 2015-03-15</li> - <li><strong>Mail:</strong><ul> - <li><a href="mailto:haelwenn.monnier@gmail.com">haelwenn.monnier@gmail.com</a></li> - <li><a href="mailto:lanodan.delta@free.fr">lanodan.delta@free.fr</a></li> - </ul></li> - <li><strong>XMPP/Jabber:</strong> lanodan@jappix.com</li> - <li><strong>Facebook:</strong> <a href="http://www.fsf.org/fb"><img width="20vw" src="http://static.fsf.org/nosvn/no-facebook-me.png" alt="Not f'd — you won't find me on Facebook" title="you won't find me on Facebook"/></a></li> - <li><strong>Skype:</strong> <img width="20vw" src="" alt="Not ms'd - You won't find me on Skype" title="You won't find me on Skype"/></li> - <h1><?=links?></h1> + <li><strong>GPG:</strong> (0x4BBEBBAD) 8E4B AA5E E6FB D5A8 D04F 3BE5 C873 8479 4BBE BBAD</li> + <li><strong>Mail:</strong><a href="mailto:lanodan.delta@free.fr">lanodan.delta@free.fr</a> + <li><strong>XMPP/Jabber:</strong> lanodan@jappix.com OTR: EA4D74E46634112DF4A238DFE72B9BBF6C9F</li> + <li><strong>Facebook:</strong> <a href="http://fsf.org/fb"><img src="//the-delta.net/datalove/librism/NotFB.png" alt="Not f'd — you won't find me on Facebook" title="you won't find me on Facebook"/></a></li> + <li><strong>Skype:</strong> <img src="//the-delta.net/datalove/librism/NotMS.png" alt="Not MS'd - You won't find me on Microsoft's products" title="You won't find me on Skype"/></li> + </section> + <section> + <h1><?=$locale['links']?></h1> <ul> <li><a href="//github.com/lanodan"><img src="//github.com/favicon.ico"> Github</a></li> </ul> <ul> - <li><h2><img src="images/twitter.svg" width="20px" alt="twitter-bird"/> Twitter</h2> + <li><img src="images/twitter.svg" width="20px" alt="twitter-bird"/>Twitter <ul> <li><a href="//twitter.com/lanodan">@lanodan</a></li> <li><a href="//twitter.com/lanobottl">@lanobottl</a></li> - <li><a href="//twitter.com/lanodanNSFW">@lanodanNSFW</a> <strong class="warn"><?=NSFW?></strong></li> + <li><a href="//twitter.com/lanodanNSFW">@lanodanNSFW</a> <strong class="warn" title="Not Safe For Work">NSFW</strong></li> <li><a href="//twitter.com/derpi_">@derpi_</a></li> <li><a href="//twitter.com/TheDeltaNet">@TheDeltaNet</a></li> </ul> </li> - <li><h2><img src="//tumblr.com/favicon.ico"> Tumblr</h2> + <li><img src="//tumblr.com/favicon.ico">Tumblr <ul> <li><a href="//lanodan.tumblr.com">lanodan.tumblr.com</a></li> - <li><a href="//lanodan-nsfw.tumblr.com">lanodan-nsfw.tumblr.com</a> <strong class="warn"><?=NSFW?></strong></li> + <li><a href="//lanodan-nsfw.tumblr.com">lanodan-nsfw.tumblr.com</a> <strong class="warn" title="Not Safe For Work">NSFW</strong></li> <li><a href="//the-delta.tumblr.com">the-delta.tumblr.com</a></li> </ul> </li> </ul> </section> + <section> + <table> + <thead> + <tr><th>Age</th><th>OS</th></tr> + </thead> + <tbody> + <tr><td>3</td><td>Open-Suse</td></tr> + <tr><td>10</td><td>Open-Solaris [R.I.P]</td></tr> + <tr><td>12</td><td>Ubuntu (10.04 → 12.04)</td></tr> + <tr><td>15</td><td>FreeBSD</td></tr> + <tr><td>15</td><td>Debian</td></tr> + </tbody> + </table> + </section> + <section> + <h1>Boycott:</h1> + <ul> + <?php if ($lang == 'fr'){ ?> + <li><strong>Adobe:</strong> Prix élevé et utilise des formats propriétaires</li> + <li><strong>Apple:</strong> Le matériel coute trop cher et n'est ni Ouvert ni Libre (par contre le prix du système d'exploitation me semble correct).</li> + <li><strong>Facebook:</strong> Trop social pour moi :D Nan, je rigole, les gens sont des moutons et ils se font de l'argent dessus et ils ne respectent pas la vie privée.</li> + <li><strong>Google:</strong> Parcequ'ils veulent tracer tout le monde et conquérir internet.</li> + <li><strong>Micromou(aka micro$oft):</strong> Prix trop élevé, aucune qualitée, non Libre et Ouvert</li> + <li><strong>Netflix:</strong> (je ne l'ai jamais utilisé) → DRM.</li> + <li><strong>OpenClassroom anciennement Site Du 0:</strong> Le 0 du site originel représente la note que je mettrais au site.</li> + <li><strong>w3schools,</strong> ou le site d'apprentissage du web n'est pas a la norme W3C.</li> + <li>Et tout ce que l'on achete(pas louer) mais qui ne nous appartient pas(ex: DVD).</li> + <?php } else { ?> + <li><strong>Adobe:</strong> Costy and proprietary formats.</li> + <li><strong>Apple:</strong> Hardware cost too much and is not Open (The Operating System price is okay for me)</li> + <li><strong>Facebook:</strong> Too social for me :D Nope, just kidding, People are sheep and they are making money on it.</li> + <li><strong>Google:</strong> Because they want to trace everyone and conquer the internet.</li> + <li><strong>Micro$oft:</strong> Cost too much, no quality, not Open</li> + <li><strong>Netflix:</strong> (never ever used before) → DRM.</li> + <li><strong>OpenClassroom aka Site du 0:</strong> The 0 is the mark I'd give to this website.</li> + <li><strong>w3schools</strong> or the web learn website without W3C norm.</li> + <li>And everything we bought(not rent) and don't own(ex: DVD).</li> + <?php } ?> + </ul> + </section> <?php include 'footer.php';?> </body> </html> diff --git a/css/basic.css b/css/basic.css @@ -1,18 +1,16 @@ -* { - margin: 0px; - padding: 0px; -} html, body { background-color: #E3E3E3; color: #000000; height: 100%; + margin: 0; + padding: 0; } a { color: #0000EE; text-decoration: none; } a:hover {text-decoration: underline;} -section.post { +section.article { box-shadow: 0px 0px 10px 0px; padding: 10px; margin: 10px; @@ -25,9 +23,6 @@ code { text-align: left; font: monospace; } -h1,h2,h3,h4,h5,h6 { - text-decoration: underline; -} strong.bold {display: block;} ul,ol {margin-left: 2em;} #content { @@ -41,5 +36,4 @@ ul,ol {margin-left: 2em;} } .tags { font-family: monospace; - font-style: italic; } diff --git a/css/footer.css b/css/footer.css @@ -1,5 +1,5 @@ footer { - background-color: #efefef; + background-color: #B80000; background-image: linear-gradient(0deg, #900, #D00); display: block; box-shadow: 0px 0px 5px; diff --git a/css/live.css b/css/live.css @@ -1,3 +0,0 @@ -html, body { - height: 100%; -} diff --git a/css/navbar.css b/css/navbar.css @@ -1,10 +1,15 @@ nav { - background: #B80000 linear-gradient(0deg, #900, #D00); + background-color: #B80000; + background-image: linear-gradient(0deg, #900, #D00); color: #222222; font-size: 21px; display: block; box-shadow: 0px 0px 0.5vh; } +nav * { + margin: 0; + padding: 0; +} nav a { color: inherit; display: block; @@ -13,14 +18,19 @@ nav a { nav ul { list-style: none; display: inline-block; - margin-left: 0; } nav ul li { transition: 0.5s; display: inline-table; } -nav li:hover {background: #AB0000 linear-gradient(0deg, #800000, #C40000);} -nav li:active {background: #910000 linear-gradient(0deg, #660000, #AB0000);} +nav li:hover { + background-color: #AB0000; + background-image: linear-gradient(0deg, #800000, #C40000); +} +nav li:active { + background-color: #910000; + background-image: linear-gradient(0deg, #660000, #AB0000); +} nav ul li:hover > ul {display: block;} nav ul ul { display: none; @@ -38,6 +48,6 @@ nav ul ul ul { top: 0; font-size: 14px; } -.right {float: right;} +nav ul.right {float: right;} .expand_down:after {content: " ▿";} .expand_right:after {content: " ▻";} diff --git a/footer.php b/footer.php @@ -1,7 +1,7 @@ -<footer> - <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"> - <img alt="CC-BY-SA" src="http://i.creativecommons.org/l/by-sa/4.0/88x31.png" /> - </a> - <?=license?> - <strong><a href="http://www.anybrowser.org/campaign/"><?=anybrowser?></a></strong> -</footer> + <footer> + <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"> + <img alt="CC-BY-SA" src="http://i.creativecommons.org/l/by-sa/4.0/88x31.png" /> + </a> + <?=$locale['license']?> + <strong><a href="http://www.anybrowser.org/campaign/"><?=$locale['anybrowser']?></a></strong> + </footer> diff --git a/index.php b/index.php @@ -17,26 +17,29 @@ <html> <head> <meta charset="utf-8"> - <title><?=mainPage.baseTitle?></title> + <title><?=$locale['mainPage'].$locale['fullTitle']?></title> <link rel="stylesheet" type="text/css" href="css/basic.css"> <link rel="stylesheet" type="text/css" href="css/navbar.css"> <link rel="stylesheet" type="text/css" href="css/footer.css"> </head> <body> - <?php include 'navbar.php'; ?> - <section id=content> +<?php include 'navbar.php'; ?> + <section id="content"> <?php while($row = $result->fetch_array()) { $rows[] = $row; } foreach($rows as $row) { - print ' <article> - <a href="post?id='.$row['id'].'"><h1>'.$row['title'].'</h1></a> + print ' <section class="article"> + <h1><a href="post?id='.$row['id'].'">'.$row['title'].'</a></h1> + <article> '.$row['content'].' - <span class="tags">'.$row['tags'].'</span> </article> - <hr/>'."\n"; + <div class="info"><span class="tags>"'.$row['tags'].'</span><date>'.date("c", strtotime($row['pubDate']) ).'</date></div> + </section> + <hr /> +'; } # free result set @@ -46,6 +49,6 @@ $mysqli->close(); ?> </section> - <?php include 'footer.php';?> +<?php include 'footer.php';?> </body> </html> diff --git a/lang/en.php b/lang/en.php @@ -1,20 +1,20 @@ <?php - /** * @file * English language file. */ -define('mainPage', 'Main Page'); -define('mainPageWelcome', 'Welcome on the main page of my blog !'); -define('baseTitle', ' - Lanodan\'s blog'); -define('home', 'Home'); -define('tuto', 'Tutorials'); -define('coding', 'Coding'); -define('creations', 'Creations'); -define('drawing', 'Drawing'); -define('links', 'Links'); -define('about', 'About'); -define('license', 'This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.'); -define('anybrowser', 'Viewable on Any Browser') +$locale['mainPage']='Main Page'; +$locale['mainPageWelcome']='Welcome on the main page of my blog \!'; +$locale['title']='Lanodan\'s blog'; +$locale['fullTitle']=' - '.$locale['title']; +$locale['home']='Home'; +$locale['tuto']='Tutorials'; +$locale['coding']='Coding'; +$locale['creations']='Creations'; +$locale['drawing']='Drawing'; +$locale['links']='Links'; +$locale['about']='About'; +$locale['license']='This work is licensed under a <a rel="license" href="//creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.'; +$locale['anybrowser']='Viewable on Any Browser'; ?> diff --git a/lang/fr.php b/lang/fr.php @@ -1,20 +1,20 @@ <?php - /** * @file * French language file. */ -define('mainPage', 'Page Principale'); -define('mainPageWelcome', 'Bienvenue sur la page principale de mon blog !'); -define('baseTitle', ' - Blog de lanodan'); -define('home', 'Accueil'); -define('tuto', 'Tutoriels'); -define('coding', 'Programmation'); -define('creations', 'Créations'); -define('drawing', 'Graphisme'); -define('links', 'Liens'); -define('about', 'A Propos'); -define('license', 'Ce(tte) œuvre est mise à disposition selon les termes de la <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Licence Creative Commons Attribution - Partage dans les Mêmes Conditions 4.0 International</a>.'); -define('anybrowser', 'Visionable sur tous les navigateurs'); +$locale['mainPage']='Page Principale'; +$locale['mainPageWelcome']='Bienvenue sur la page principale de mon blog \!'; +$locale['title']='web-journal de lanodan'; +$locale['fullTitle']=' - '.$locale['title']; +$locale['home']='Accueil'; +$locale['tuto']='Tutoriels'; +$locale['coding']='Programmation'; +$locale['creations']='Créations'; +$locale['drawing']='Graphisme'; +$locale['links']='Liens'; +$locale['about']='A Propos'; +$locale['license']='Ce(tte) œuvre est mise à disposition selon les termes de la <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Licence Creative Commons Attribution - Partage dans les Mêmes Conditions 4.0 International</a>.'; +$locale['anybrowser']='Visionable sur tous les navigateurs'; ?> diff --git a/lang/index.php b/lang/index.php @@ -1,5 +1,4 @@ <?php - $known_languages = array('fr', 'en'); ## just add new language here when you need $lang = 'fr'; //default language setting $lang = $_COOKIE['lang']; $lang = $_GET['lang'];//let user define his lang setting diff --git a/lang/lang.php b/lang/lang.php @@ -1,11 +1,14 @@ <?php - $langs = array('fr', 'fr-FR', 'en', 'en-US', 'en-UK'); //just add new language here when you need + $langs = array('fr','en'); //just add new language here when you need if (empty($_COOKIE['lang'])) { - http_negociate_language($langs, $lang); + $header = new http\Header('Language-Accept', $_SERVER['HTTP_ACCEPT_LANGUAGE']); + $negotiate = $header->negotiate($langs); + $lang = substr($negotiate, 0, 2); setcookie('lang', $lang, '0', '/'); } else { $lang = $_COOKIE['lang']; } - include 'lang/'.$lang.'.php'; + include_once 'lang/'.$lang.'.php'; + ?> diff --git a/live.php b/live.php @@ -5,7 +5,7 @@ <html> <head> <meta charset="utf-8"> - <title><?=mainPage.baseTitle?></title> + <title><?=$lang['mainPage'].$lang['fullTitle']?></title> <link rel="stylesheet" type="text/css" href="css/basic.css"> <link rel="stylesheet" type="text/css" href="css/live.css"> </head> diff --git a/navbar.php b/navbar.php @@ -1,27 +1,30 @@ -<nav> - <ul class="menus"> - <li><a href="/"><?=home?></a></li> - <li><a href="/about"><?=about?></a></li> - <li><a class="expand_down" href="/tuto/"><?=tuto?></a> - <ul> - <li><a href="/tuto/coding/"><?=coding?></a></li> + <nav> + <ul class="menus"> + <li><a href="/"><?=$locale['home']?></a></li> + <li><a href="/about"><?=$locale['about']?></a></li> +<?php +/* <li><a class="expand_down" href="/tuto/"><?=$locale['tuto']?></a> + * <ul> + * <li><a href="/tuto/coding/"><?=$locale['coding']?></a></li> + * </ul> + * </li> + * <li><a class="expand_down" href="/creations/"><?=$locale['creations']?></a> + * <ul> + * <li><a class="expand_right" href="/creations/code/"><?=$locale['coding']?></a> + * <ul> + * <li><a href="/creations/code/php">PHP</a></li> + * <li><a href="/creations/code/htmlCSS">HTML/CSS</a></li> + * </ul> + * </li> + * <li><a href="/creations/drawing/"><?=$locale['drawing']?></a></li> + * </ul> + * </li> + */ +?> </ul> - </li> - <li><a class="expand_down" href="/creations/"><?=creations?></a> - <ul> - <li><a class="expand_right" href="/creations/code/"><?=coding?></a> - <ul> - <li><a href="/creations/code/php">PHP</a></li> - <li><a href="/creations/code/htmlCSS">HTML/CSS</a></li> - </ul> - </li> - <li><a href="/creations/drawing/"><?=drawing?></a></li> + <ul class="right"> + <li><a href="/lang/?lang=fr">Français</a></li> + <li><a href="/lang/?lang=en">English</a></li> + <li><a href="/rss">RSS</a></li> </ul> - </li> - </ul> - <ul class="right"> - <li><a href="/lang/?lang=fr">Français</a></li> - <li><a href="/lang/?lang=en">English</a></li> - <li><a href="/rss">RSS</a></li> - </ul> -</nav> + </nav> diff --git a/post.php b/post.php @@ -24,7 +24,7 @@ <html> <head> <meta charset="utf-8"> - <title><?=mainPage.baseTitle?></title> + <title><?=$locale['mainPage'].$locale['fullTitle']?></title> <link rel="stylesheet" type="text/css" href="css/basic.css"> <link rel="stylesheet" type="text/css" href="css/navbar.css"> <link rel="stylesheet" type="text/css" href="css/footer.css"> diff --git a/rss.php b/rss.php @@ -1,12 +1,15 @@ +<?php + header('Content-Type: application/xml; charset=UTF-8'); + require_once 'lang/lang.php'; + require_once 'config.php'; +?> <?xml version="1.0"?> <rss version="2.0"> <channel> - <title><?=baseTitle?></title> + <title><?=$locale['title']?></title> <description></description> <link>http://<?=$_SERVER['HTTP_HOST']?>/</link> <?php - header('Content-Type: application/xml; charset=UTF-8'); - require_once 'config.php'; $mysqli = new mysqli($mysql['host'], $mysql['user'], $mysql['passwd'], $mysql['database']); @@ -26,8 +29,8 @@ <title>'.$row['title'].'</title> <description>'.$row['description'].'</description> <link>'.$row['link'].'</link> - <guid permalink>http://'.$_SERVER['HTTP_HOST'].'/post?id='.$row['id'].'</guid> - <pubDate>'.$row['pubDate'].'</pubDate> + <guid permalink="">http://'.$_SERVER['HTTP_HOST'].'/post?id='.$row['id'].'</guid> + <pubDate>'.date("c", strtotime($row['pubDate']) ).'</pubDate> <category>'.$row['tags'].'</category> </item>'."\n"; }