Skip to content

Commit

Permalink
First Commit (what a message.)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme Mahuet committed Aug 26, 2011
1 parent cdc914e commit 49b8ae3
Show file tree
Hide file tree
Showing 43 changed files with 2,420 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 404.php
@@ -0,0 +1,6 @@
<?php get_header(); ?>
<section id="claim-404" class="sixteen columns">
<p>404</p>
</section>

<?php get_footer(); ?>
1 change: 1 addition & 0 deletions _/inc/meta.php
@@ -0,0 +1 @@
<cite class="entry-meta"><time datetime="<?php echo date(DATE_W3C); ?>" pubdate class="updated"><?php the_time('j F, Y') ?></time><?php the_category(', ') ?></cite>
3 changes: 3 additions & 0 deletions _/inc/nav.php
@@ -0,0 +1,3 @@
<nav class="light">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
</nav>
11 changes: 11 additions & 0 deletions _/inc/share.php
@@ -0,0 +1,11 @@
<hr>
<section role="meta" id="meta">
<div>URL raccourcie : <a title="<?php the_title(); ?>" href="<?php echo wp_get_shortlink(); ?>"><?php echo wp_get_shortlink(); ?></a></div>
<div>Tags : <?php the_tags('', ', ', ''); ?></div>
</section>
<br>
<footer class="share">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php echo urlencode(the_permalink()); ?>" data-text="<?php echo the_title(); ?>" data-count="horizontal" data-via="phollow" data-lang="fr">Tweet</a>
<g:plusone size="medium" href="<?php echo urlencode(the_permalink()); ?>" count="true"></g:plusone>
<span class="fb_like"><fb:like href="<?php the_permalink(); ?>" layout="button_count" show_faces="false"></fb:like></span>
</footer>
14 changes: 14 additions & 0 deletions about.php
@@ -0,0 +1,14 @@
<?php
/*
Template Name: About page
*/
?>
<?php get_header(); ?>
<section id="claim" class="sixteen columns">
<h2 class="pagetitle"><em>À propos de ce blog</em></h2>
<hr>
</section>
<div id="container" class="sixteen columns">

</div>
<?php get_footer(); ?>
62 changes: 62 additions & 0 deletions archive.php
@@ -0,0 +1,62 @@
<?php get_header(); ?>
<section id="claim" class="sixteen columns">
<?php if (have_posts()) : ?>

<?php $post = $posts[0]; // U MAD WORDPRESS ? Pour la fonction date. ?>

<?php if (is_category()) { ?>
<h2 class="pagetitle"><em>Archives de la catégorie <b>&#8216;<?php single_cat_title(); ?>&#8217;</b></em></h2>

<?php } elseif( is_tag() ) { ?>
<h2 class="pagetitle"><em>Articles taggués <b>&#8216;<?php single_tag_title(); ?>&#8217;</b></em></h2>

<?php } elseif (is_day()) { ?>
<h2 class="pagetitle">Archives de <?php the_time('F jS, Y'); ?></h2>

<?php } elseif (is_month()) { ?>
<h2 class="pagetitle">Archives de <?php the_time('F, Y'); ?></h2>

<?php } elseif (is_year()) { ?>
<h2 class="pagetitle">Archives de <?php the_time('Y'); ?></h2>

<?php } elseif (is_author()) { ?>
<h2 class="pagetitle">Archives de l'auteur</h2>

<?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class="pagetitle">Archives du blog</h2>

<?php } ?>
<hr>
</section>
<div id="container" class="twelve columns">
<?php while (have_posts()) : the_post(); ?>

<article <?php post_class() ?> id="post-<?php the_ID(); ?>">

<h2 class="entry-title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>

<?php include (TEMPLATEPATH . '/_/inc/meta.php' ); ?>

<div class="entry">
<?php echo improved_trim_excerpt(); ?>
</div>

<footer class="permalink-button">
<a href="<?php the_permalink(); ?>" class="button">Lire la suite &gt;</a>
</footer>

</article>

<?php endwhile; ?>

<?php include (TEMPLATEPATH . '/_/inc/nav.php' ); ?>

<?php else : ?>

<h2>Nothing found</h2>

<?php endif; ?>
</div>
<?php get_sidebar(); ?>

<?php get_footer(); ?>
68 changes: 68 additions & 0 deletions archives.php
@@ -0,0 +1,68 @@
<?php
/*
Template Name: Archives page
*/
?>
<?php get_header(); ?>

<?php
global $wp_query;
$count_posts = wp_count_posts();
$numposts = $count_posts->publish; // Nombre de billets publiés

// nombre de billets dans la première et deuxième colonne
$columnOneTwoPosts = round($numposts / 3);

// dans la troisième...
if(3 * $columnOneTwoPosts < $numposts) {
$columnThreePosts = $columnOneTwoPosts + 1;
} elseif(3 * $columnOneTwoPosts > $numposts) {
$columnThreePosts = $columnOneTwoPosts - 1;
} elseif(3 * $columnOneTwoPosts == $numposts) {
$columnThreePosts = $columnOneTwoPosts;
}

$columnOneOffset = 0;
$columnTwoOffset = $columnOneTwoPosts;
$columnThreeOffset = 2 * $columnOneTwoPosts;
?>
<section id="claim" class="sixteen columns">
<h2 class="pagetitle"><em>Archives - CTRL-F, ????, <b>PROFIT!</b></em></h2>
<hr>
</section>
<div id="container" class="sixteen columns">
<div class="one-third column alpha">
<ul class="archives-list">
<?php query_posts('showposts='.$columnOneTwoPosts.'&offset='.$columnOneOffset); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<li><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>

<?php endwhile; endif; ?>
</ul>
</div>
<div class="one-third column">
<ul class="archives-list">
<?php query_posts('showposts='.$columnOneTwoPosts.'&offset='.$columnTwoOffset); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<li><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>

<?php endwhile; endif; ?>
</ul>
</div>
<div class="one-third column omega">
<ul class="archives-list">
<?php query_posts('showposts='.$columnThreePosts.'&offset='.$columnThreeOffset); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<li><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>

<?php endwhile; endif; ?>
</ul>
</div>
</div>

<?php wp_reset_query(); ?>

<?php get_footer(); ?>
106 changes: 106 additions & 0 deletions comments.php
@@ -0,0 +1,106 @@
<?php

if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('I see wat u did motherfucker.');

if ( post_password_required() ) { ?>
This post is password protected. Enter the password to view comments.
<?php
return;
}
?>

<section id="commentaires" role="comments">

<h2><?php comments_number('Pas de commentaires', 'Un commentaire', '% commentaires' );?></h2>
<section role="contact-comments" id="contact-comments">
<a href="<?php comments_link(); ?>">Laisse un commentaire</a> ou contacte moi via Twitter <a title="Twitter Jérôme Mahuet" href="http://twitter.com/@phollow">@phollow</a>
</section>

<?php if ( have_comments() ) : ?>

<div class="navigation">
<div class="next-posts"><?php previous_comments_link() ?></div>
<div class="prev-posts"><?php next_comments_link() ?></div>
</div>

<ol class="commentlist">
<?php wp_list_comments(array('type' => 'comment', 'reply_text' => 'Répondre', 'avatar_size' => 30, 'max_depth' => 1)); ?>
</ol>

<div class="navigation">
<div class="next-posts"><?php previous_comments_link() ?></div>
<div class="prev-posts"><?php next_comments_link() ?></div>
</div>

<?php else : // pas de commentaires ?>

<?php if ( comments_open() ) : ?>

<?php else : // closed, u mad? ?>
<p>Commentaires fermés.</p>

<?php endif; ?>

<?php endif; ?>

<?php if ( comments_open() ) : ?>

<div id="respond">

<h2><?php comment_form_title( 'Répondre à ce billet', 'Répondre à %s' ); ?></h2>

<div class="cancel-comment-reply">
<?php cancel_comment_reply_link(); ?>
</div>

<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
<p>You must be <a href="<?php echo wp_login_url( get_permalink() ); ?>">logged in</a> to post a comment.</p>
<?php else : ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<a id="comments" name="comments"></a>
<a id="respond" name="respond"></a>
<?php if ( is_user_logged_in() ) : ?>

<p>Identifié en tant que <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Déconnexion">Déconnexion &raquo;</a></p>

<?php else : ?>
<div>
<label for="author">Nom <?php if ($req) echo "(*)"; ?></label>
<input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
</div>

<div>
<label for="email">Email <?php if ($req) echo "(*)"; ?></label>
<input type="email" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
</div>

<div>
<label for="url">Site web</label>
<input type="text" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="22" tabindex="3" />
</div>

<?php endif; ?>

<div>
<textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea>
</div>

<div>
<input name="submit" type="submit" id="submit" tabindex="5" value="Poster" />
<?php comment_id_fields(); ?>
</div>

<?php do_action('comment_form', $post->ID); ?>

<!--<p>Tags disponibles : <code><?php echo allowed_tags(); ?></code></p>-->

</form>

<?php endif; ?>

</div>

<?php endif; ?>
</section>
62 changes: 62 additions & 0 deletions footer.php
@@ -0,0 +1,62 @@
<footer id="footer" class="sixteen columns">
<form class="searchform" method="get" action="/">
<input name="s" size="30" type="search" placeholder="Rechercher sur le site" results="0">
</form>
<span class="copyright">Copyright © 2011 <a href="https://plus.google.com/113221045987282389062?rel=author" title="Google+ Jérôme Mahuet">Jérôme Mahuet+</a> All Rights Reserved. Hosted by <a href="http://www.rackspace.com/">Rackspace US, Inc.</a></span>
<a title="<?php bloginfo( 'name' ) ?>" class="footer-logo-link" href="<?php bloginfo( 'url' ) ?>"><img src="<?php bloginfo('template_directory'); ?>/images/phollow-logo-footer.png" alt="<?php bloginfo( 'name' ) ?>"></a>
</footer>
</div><!-- container -->
<div id="fb-root"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>window.jQuery || document.write("<script src='<?php bloginfo('template_directory'); ?>/javascripts/jquery-1.6.2.min.js'>\x3C/script>")</script>
<script src="<?php bloginfo('template_directory'); ?>/javascripts/plugins.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/javascripts/app.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/javascripts/fitText.js"></script>

<!--[if (lt IE 9) & (!IEMobile)]>
<script src="<?php bloginfo('template_directory'); ?>/javascripts/libs/DOMAssistantCompressed-2.8.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/javascripts/libs/selectivizr-1.0.1.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/javascripts/libs/respond.min.js"></script>
<![endif]-->

<!-- Change UA-XXXXX-X to be your site's ID -->
<script>
window._gaq = [['_setAccount','UA-XXXXX-X'],['_trackPageview'],['_trackPageLoadTime']];
Modernizr.load({
load: ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js'
});
</script>

<!-- Prompt IE 6 users to install Chrome Frame. Remove this if you want to support IE 6.
chromium.org/developers/how-tos/chrome-frame-getting-started -->
<!--[if lt IE 7 ]>
<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
<script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
<![endif]-->

<script>
window.fbAsyncInit = function() {
FB.init({appId: 'YOURAPPIDLOL', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/fr_FR/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
<script src="http://platform.twitter.com/widgets.js"></script>
<script>
window.___gcfg = {lang: 'fr'};

(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>

<?php wp_footer(); ?>
</body>
</html>

0 comments on commit 49b8ae3

Please sign in to comment.