logo

blog

My little blog can’t be this cute! git clone https://hacktivis.me/git/blog.git
commit: 1f437239e9bf07c9901b74055f30d83043993098
parent 8f1269e4798bd0ea21492350ab51830305fd90ca
Author: lanodan <lanodan.delta@free.fr>
Date:   Sat, 19 Apr 2014 08:07:06 +0200

RSS feed and main page

Diffstat:

M.gitignore1+
M404.php5++---
Mabout.php32++++++++++++++++++++++++--------
Aconfig.php.example7+++++++
Mcss/basic.css15++++++++++++++-
Dcss/errorDocument.css3---
Mcss/navbar.css19+++++++++++--------
Mfooter.php2+-
Mindex.php31+++++++++++++++++++++++++++----
Aline_qrcode.jpg0
Mlive.php3+--
Mrss.php32+++++++++++++++-----------------
12 files changed, 103 insertions(+), 47 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,2 +1,3 @@ *.swp *.swo +config.php diff --git a/404.php b/404.php @@ -1,5 +1,5 @@ <?php - include 'lang/lang.php'; + require_once 'lang/lang.php'; ?> <!DOCTYPE html> <html> @@ -7,12 +7,11 @@ <meta charset="utf-8"> <title>404 not found<?=baseTitle?></title> <link rel="stylesheet" type="text/css" href="css/basic.css"> - <link rel="stylesheet" type="text/css" href="css/errorDocument.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'; ?> + <?php include 'navbar.php';?> <section id="content"> <strong class="bold">Oops</strong> you found a diff --git a/about.php b/about.php @@ -1,26 +1,42 @@ <?php - include 'lang/lang.php'; + require_once 'lang/lang.php'; ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> - <title><?=links.baseTitle?></title> + <title><?=about.baseTitle?></title> <link rel="stylesheet" type="text/css" href="css/basic.css"> - <?php //<link rel="stylesheet" type="text/css" href="css/links.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'; ?> - <div id="content"> + <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. J'apprend le web depuis 2012. + 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 use UNIX/Linux. I learn the web since 2012. I talk French(native), English and a bit of Spannish and Japnannese. - <?php } ?> + 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> + <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> <ul> <li><a href="//github.com/lanodan"><img src="//github.com/favicon.ico"> Github</a></li> @@ -43,7 +59,7 @@ </ul> </li> </ul> - </div> + </section> <?php include 'footer.php';?> </body> </html> diff --git a/config.php.example b/config.php.example @@ -0,0 +1,7 @@ +<?php + $mysql['host'] = 'localhost'; + $mysql['user'] = 'www_data'; + $mysql['passwd'] = ''; + $mysql['database'] = 'www_data'; + $mysql['table'] = 'blog'; +?> diff --git a/css/basic.css b/css/basic.css @@ -7,6 +7,18 @@ html, body { color: #000000; height: 100%; } +a { + color: #0000EE; + text-decoration: none; +} +a:hover {text-decoration: underline;} +code { + background-color: #222222; + color: #C4C4C4; + display: table; + text-align: left; + font: monospace; +} #content { margin: 20px; text-align: center; @@ -14,8 +26,9 @@ html, body { } .warn { background-color: rgba(255, 60, 0, 0.2); - border-left: 2px solid #FF3C00; + border-bottom: 2px solid #FF3C00; } .bold {font-weight: bold;} +.code_comment {color: blue;} strong.bold {display: block;} ol, ul, li {list-style: none;} diff --git a/css/errorDocument.css b/css/errorDocument.css @@ -1,3 +0,0 @@ -#content { - font-size: 22px; -} diff --git a/css/navbar.css b/css/navbar.css @@ -1,33 +1,36 @@ -a {text-decoration: none;} -a:hover {text-decoration: underline;} nav { background: #B80000 linear-gradient(0deg, #900, #D00); + color: #222222; font-size: 21px; display: block; - box-shadow: 0px 0px 5px; + box-shadow: 0px 0px 0.5vh; +} +nav a { + color: inherit; + display: block; + padding: 0.5vw 0.5vh; } -nav a {color: #222;} nav ul { list-style: none; display: inline-block; } nav ul li { transition: 0.5s; - padding: 5px; display: inline-table; } -nav ul li:hover {background: #AB0000 linear-gradient(0deg, #800000, #C40000);} -nav ul li:active {background: #910000 linear-gradient(0deg, #660000, #AB0000);} +nav li:hover {background: #AB0000 linear-gradient(0deg, #800000, #C40000);} +nav li:active {background: #910000 linear-gradient(0deg, #660000, #AB0000);} nav ul li:hover > ul {display: block;} nav ul ul { display: none; font-size: 16px; position: absolute; background: #900; - box-shadow: 5px 5px 5px; + box-shadow: 0.3vw 0.3vw 0.3vw 0; } nav ul ul li {display: block;} nav ul ul li:hover {background: #B00;} +nav ul ul li:active {background: #E00;} nav ul ul ul { position: absolute; left: 100%; diff --git a/footer.php b/footer.php @@ -3,5 +3,5 @@ <img alt="CC-BY-SA" src="http://i.creativecommons.org/l/by-sa/4.0/88x31.png" /> </a> <?=license?> - <strong class="warn"><a href="http://www.anybrowser.org/campaign/"><?=anybrowser?></a></strong> + <strong><a href="http://www.anybrowser.org/campaign/"><?=anybrowser?></a></strong> </footer> diff --git a/index.php b/index.php @@ -1,5 +1,17 @@ <?php - include 'lang/lang.php'; + require_once 'lang/lang.php'; + require_once 'config.php'; + + $link = mysqli_connect($mysql['host'], $mysql['user'], $mysql['passwd'], $mysql['database']); + $query = 'SELECT * FROM '.$mysql['table'].' ORDER by id'; + + if (mysqli_connect_errno()) { + print 'Connect failed: '.mysqli_connect_error(); + exit(); + } + + $result = mysqli_query($link, $query); + ?> <!DOCTYPE html> <html> @@ -12,9 +24,20 @@ </head> <body> <?php include 'navbar.php'; ?> - <div id=content> - <?=mainPageWelcome?> - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam fringilla pulvinar ligula eget ullamcorper. Donec hendrerit dui sit amet volutpat facilisis. Phasellus sagittis ultricies mi vitae ullamcorper. Sed dictum eget nunc ut venenatis. In sed turpis vitae urna malesuada blandit nec eget nulla. Etiam sit amet eros eget massa lacinia fringilla. Morbi nec eleifend purus. Suspendisse potenti. Praesent vestibulum leo at libero volutpat dapibus. Donec suscipit nulla justo, quis interdum eros sollicitudin eget. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus iaculis nibh et mauris lacinia, lobortis fermentum velit suscipit. Duis a nunc a enim feugiat imperdiet. Vivamus dignissim, ipsum eget sollicitudin viverra, nibh quam dignissim arcu, at sagittis felis libero sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin imperdiet lobortis risus.<br><br> Aenean in tellus ac turpis sollicitudin tempor. In nec aliquet diam. Suspendisse potenti. Nullam posuere mollis libero vitae convallis. Cras vehicula vel diam vel molestie. Morbi accumsan vel massa ut vulputate. Ut semper purus vel elit eleifend, ut posuere nibh tempus. Fusce euismod odio sed leo pulvinar, quis vestibulum erat fermentum. Sed rhoncus velit sed pharetra porttitor. Nam ut tortor tellus. Quisque consequat libero ipsum, non viverra mi vehicula non. Nullam adipiscing, mi id ultrices pellentesque, massa mi condimentum massa, eget condimentum leo sapien at est.<br><br> Nullam in risus vitae magna sodales placerat. Cras volutpat mi nec tortor commodo, dictum tempor orci lobortis. Aenean mi ante, imperdiet eu molestie quis, venenatis fermentum quam. Integer porttitor urna eu elit luctus, quis convallis ligula ornare. Nulla vitae felis eu risus porttitor sodales. Proin dolor sapien, facilisis vitae pretium congue, faucibus quis massa. Phasellus eget consectetur lorem.<br><br> Ut convallis ante elit, fermentum convallis ante iaculis eget. Nam dignissim diam sit amet odio dictum scelerisque. Vestibulum velit felis, cursus eget nisi eu, rhoncus mollis orci. Nulla ut ligula scelerisque, semper eros a, viverra sapien. Praesent nulla erat, dignissim ut magna quis, rhoncus ullamcorper nunc. Integer in justo semper, ornare libero a, iaculis diam. Donec pellentesque, lacus posuere scelerisque accumsan, felis purus euismod lacus, vitae pharetra orci ipsum a libero. Proin eget dui nisl. In eget laoreet risus.<br><br> Vivamus vitae purus elementum, fringilla nunc quis, tincidunt odio. Cras dui nisl, tincidunt vitae consequat ac, accumsan ut augue. Vestibulum semper elit ac egestas dapibus. Integer a accumsan elit. Morbi malesuada, nisi non aliquet tempor, orci mi tempor odio, eu euismod odio quam luctus velit. Aenean consectetur purus ac justo placerat, ut vestibulum odio condimentum. Nullam ac quam sit amet felis lobortis laoreet. Fusce et semper diam. Ut blandit, mauris ut aliquet tincidunt, leo lacus fringilla neque, sit amet eleifend elit nisi nec nulla. Nunc condimentum suscipit ante, a convallis tellus rhoncus et. Quisque ultrices ante eu dolor vulputate porta. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed sit amet mauris at lorem tempor dapibus. Morbi a diam orci.<br><br> Maecenas turpis neque, pharetra vel nunc vel, hendrerit elementum nisl. Etiam auctor urna a fermentum rhoncus. Donec id gravida elit. Donec nec arcu vel odio lacinia euismod. Suspendisse semper feugiat laoreet. Nunc ullamcorper arcu eget urna semper, sed adipiscing ante tincidunt. Maecenas sem felis, facilisis at lacus nec, volutpat laoreet ante. Mauris consequat accumsan tortor, scelerisque fermentum tellus rutrum id. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Quisque quis tristique massa. Donec ullamcorper hendrerit auctor. Aenean molestie risus est, quis elementum neque gravida sit amet. Cras condimentum vel lorem vitae laoreet. Curabitur quis ligula ullamcorper, fringilla mauris nec, convallis justo. Pellentesque quis mi a magna fermentum egestas vitae eget libero. Cras lacinia libero luctus ante viverra, sed molestie massa molestie.<br><br> Curabitur molestie velit metus, ac tristique lorem sodales non. Integer tristique nunc nisl, quis ultrices odio tristique a. Duis eget mauris magna. Phasellus ac scelerisque mauris. Nam aliquam justo dolor, vel volutpat odio imperdiet eu. Nam placerat luctus lectus, sit amet ultricies risus tempus elementum. Nulla ut est neque. Nulla facilisi. Curabitur tincidunt urna sit amet eros porttitor, ac tempor nunc iaculis. Fusce urna sapien, elementum ut eros at, dignissim sagittis tellus. Ut vestibulum tortor id tortor vehicula, quis eleifend sapien congue. Praesent tempus lorem ut nisl viverra semper. Cras sagittis pharetra commodo. Fusce auctor ante arcu, id adipiscing magna cursus eget.<br><br> Mauris eget eros blandit, dapibus nibh at, consequat nisl. Praesent quis arcu gravida, adipiscing magna vestibulum, interdum dolor. Proin pharetra vel risus at tristique. Nullam tellus sapien, mattis quis porta congue, auctor a nulla. Maecenas pretium arcu ac felis lobortis rhoncus. Duis sed congue magna. Nam lacinia tortor sit amet elit facilisis molestie. Sed pellentesque dapibus nisi. Donec sodales sit amet tellus lobortis laoreet. Proin eu lacus ac mi condimentum dictum.<br><br> Fusce euismod nisi eget lectus vulputate aliquet. Ut at varius arcu, in rutrum ligula. Nam lobortis, velit a commodo suscipit, ligula orci sagittis arcu, sit amet ullamcorper metus magna quis dui. Nullam consequat tortor sed orci vestibulum, adipiscing interdum urna venenatis. Nulla facilisi. Duis et tortor vel ipsum feugiat dictum. Aenean quam odio, aliquet eu libero in, dictum venenatis nunc. Duis et mauris vel dolor laoreet ullamcorper tristique et eros. Nulla non aliquet odio. Praesent eros tortor, placerat vel ultrices non, pharetra at dolor. Cras tellus tellus, hendrerit sit amet dapibus id, ornare a nibh. Suspendisse potenti. Vestibulum tristique fringilla augue et sodales. Nunc nec tortor bibendum est mattis mollis nec non diam. Integer vitae blandit magna. Etiam lobortis enim eget libero tincidunt, dictum laoreet massa semper.<br><br> Interdum et malesuada fames ac ante ipsum primis in faucibus. Proin rhoncus mi lorem, quis aliquam libero lacinia eu. Aenean tincidunt aliquet justo laoreet elementum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce mollis, dui nec auctor congue, nisi est ornare metus, cursus elementum odio arcu a nunc. Vestibulum nec fringilla turpis, in aliquam libero. Pellentesque felis arcu, vehicula commodo nunc tincidunt, vestibulum fermentum erat. Sed placerat egestas aliquet. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.<br><br> Aenean dapibus ante felis, eu placerat est viverra vulputate. Aliquam ut sapien mauris. Morbi sit amet nulla et erat facilisis bibendum. Mauris libero lorem, posuere in bibendum ut, cursus et ipsum. Donec tincidunt enim a turpis posuere vehicula in et sem. Aliquam id odio posuere, condimentum velit vehicula, molestie quam. Etiam rutrum dictum magna, vitae vehicula leo rutrum in. Cras porta in dolor at posuere. Donec justo tellus, semper vel accumsan nec, convallis sed tortor. Phasellus laoreet at lacus gravida consectetur. Pellentesque faucibus leo eu est consequat venenatis. Cras hendrerit mauris id dui bibendum ultrices sed non eros.<br><br> Nullam ultricies varius molestie. Pellentesque tristique, massa et accumsan tristique, felis libero aliquam purus, quis ultrices velit eros accumsan nisl. Etiam ut convallis ligula, tempus mollis magna. Donec rutrum accumsan nulla vel feugiat. Donec a nulla bibendum, laoreet sem dictum, congue felis. Maecenas dignissim rutrum convallis. Phasellus tincidunt vulputate neque, sit amet aliquam metus tristique non. Vestibulum quis venenatis lorem, vel mollis nulla. Pellentesque euismod, quam nec elementum posuere, justo risus venenatis augue, sed tristique mi urna non justo. Proin lobortis id lorem sit amet fermentum.<br><br> Praesent id fringilla tortor. Vestibulum euismod, enim sed iaculis sodales, diam odio porta dui, ac tristique diam est nec mi. Cras ac mauris tincidunt, dictum lacus ac, scelerisque mauris. Quisque ornare sed lectus vel mollis. Sed dui nunc, pretium a consequat ut, molestie quis lectus. In at sodales lectus. Pellentesque sit amet ante et nisl viverra molestie. Vivamus fringilla consequat fermentum. Vivamus in lorem a risus adipiscing adipiscing. Donec varius sapien cursus pretium egestas. Aliquam est justo, porta nec convallis vel, ullamcorper ut est. Etiam luctus lacus quis sapien commodo, eget pharetra nisl molestie. Mauris blandit quis nunc eu auctor. Pellentesque eget tellus a ligula convallis eleifend. In at varius erat.<br><br> Maecenas eleifend varius orci a viverra. Proin ut malesuada tellus. Cras auctor justo ac sem interdum, in feugiat urna vestibulum. Suspendisse placerat augue urna, in molestie arcu malesuada sit amet. Curabitur ornare quam eget lectus porta, in ultricies ligula placerat. Aliquam erat volutpat. Cras eget sagittis nulla. Nam dignissim, nulla non venenatis ornare, risus leo egestas orci, at luctus tellus libero eget sapien.<br><br> Nam in erat a ligula vulputate porta. Nam id ante nibh. Aenean eu ullamcorper odio. Suspendisse turpis eros, vulputate vitae venenatis nec, viverra at lorem. Sed non luctus metus. Sed varius non diam ut faucibus. Maecenas nisi diam, varius at congue sodales, pretium aliquet neque. Donec luctus posuere neque.<br><br> Nulla facilisi. In non ligula id nibh aliquam rutrum pellentesque vitae purus. Integer odio nibh, ultrices nec tincidunt vel, tempor vitae leo. Proin in purus elit. Pellentesque tellus enim, consectetur quis ante eu, semper tincidunt tortor. Maecenas elementum dignissim lectus, eu scelerisque justo semper ac. Donec ullamcorper feugiat dolor non pretium. Etiam sed elit a erat egestas venenatis. Proin id euismod ligula. Fusce arcu libero, cursus ut velit ut, sagittis euismod magna. <br> </div> + <section id=content> + <?php + /* fetch associative array */ + $row = mysqli_fetch_array($result, MYSQLI_ASSOC); + print ' <article>'."\n"; + //print ' <a href="'.$row['permalink'].'"><h1>'.$row['title'].'</h1></a>'."\n"; + print ' <p>'.$row['content'].'</p>'."\n"; + print ' <div class="tags">'.$row['tags'].'</div>'."\n"; + print ' </article>'."\n"; + + mysqli_free_result($result); + mysqli_close($link); + ?> + </section> <?php include 'footer.php';?> </body> </html> diff --git a/line_qrcode.jpg b/line_qrcode.jpg Binary files differ. diff --git a/live.php b/live.php @@ -1,5 +1,5 @@ <?php - include 'lang/lang.php'; + require_once 'lang/lang.php'; ?> <!DOCTYPE html> <html> @@ -11,6 +11,5 @@ </head> <body> <iframe src="https://kiwiirc.com/client/the-delta.net/?theme=basic#live" style="border:0; width:350px; height:100%;"></iframe> - </div> </body> </html> diff --git a/rss.php b/rss.php @@ -1,36 +1,34 @@ <?xml version="1.0"?> <rss version="2.0"> <channel> - <title>Lanodan</title> + <title><?=baseTitle?></title> <description></description> <link>http://lanodan.the-delta.net/</link> <?php header('Content-Type: application/xml; charset=UTF-8'); $link = mysqli_connect('localhost', 'www_data', 'minepqss', 'www_data'); - $query = "SELECT * FROM lanodan"; + $query = "SELECT * FROM lanodan ORDER by id"; if (mysqli_connect_errno()) { print 'Connect failed: '.mysqli_connect_error(); exit(); } - function item() { - if ($result = mysqli_query($link, $query)) { - /* fetch associative array */ - while ($row = mysqli_fetch_assoc($result)) { - print '<item>'; - print '<description>'.$row['description'].'</description>'; - print '<link>'.$row['permalink'].'</link>'; - print '<guid>'.$row['permalink'].'</guid>'; - print '<pubDate>'.$row['pubDate'].'</pubDate'; - print '<category>'.$row['tags'].'</category>'; - print '</item>'; - } + $result = mysqli_query($link, $query); - // free result set - mysqli_free_result($result); - } + /* fetch associative array */ + $row = mysqli_fetch_array($result, MYSQLI_ASSOC); + print ' <item>'."\n"; + print ' <description>'.$row['description'].'</description>'."\n"; + print ' <link>'.$row['permalink'].'</link>'."\n"; + print ' <guid>'.$row['permalink'].'</guid>'."\n"; + print ' <pubDate>'.$row['pubDate'].'</pubDate>'."\n"; + print ' <category>'.$row['tags'].'</category>'."\n"; + print ' </item>'."\n"; + + // free result set + mysqli_free_result($result); // close connection mysqli_close($link);