Changements sur site

[toc]

Ajout d’un lecteur de pdf

Téléchargement de Viewer.js :

http://viewerjs.org/instructions/

Renommer Viewer.js en viewer.js et donner les bons droits pour www-data.

Utilisation avec une balise href de ce type pour afficher un vignette cliquable.

<a href="http://bacabio.xilm.org/viewer.js/#../pdf/chemin/vers/fichier.pdf" target="_blank"><img alt="nom-fichier" src="http://bacabio.xilm.org/docs/chemin/vers/thumb.png" width="160" /></a>

Retour à la ligne dans les balises de code

Ajout dans le style.css au niveau de la section « pre » :

pre {
        background: #f4f4f4;
        font: 13px "Courier 10 Pitch", Courier, monospace;
        line-height: 1.5;
        margin-bottom: 2em;
        overflow: auto;
        padding: 0.75em 2em;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
}

Transformer le « suivant/précédent »

Pour rester dans la même catégorie d’articles ajouter TRUE dans les lignes suivantes du fichier single.php :

<nav id="nav-single">
  <h3><?php _e( 'Post navigation', 'catchbox' ); ?></h3>
     <span><?php previous_post_link( '%link', __( '<span>&larr;</span> Chapitre précédent', 'catchbox' ), TRUE ); ?></span>
     <span><?php next_post_link( '%link', __( 'Chapitre suivant <span>&rarr;</span>', 'catchbox' ), TRUE); ?></span>
</nav><!-- #nav-single -->

Changer le style du « suivant/precedent »

Dans le style.css, à la ligne 1848 se trouve le style de la navigation. Le changer et ajouter le focus, active et hover :

#content nav {
        clear: both;
        overflow: hidden;
        padding: 0 0 0.8em;
}
#content nav a {
        display: inline-block;
        font-size: 12px;
        font-weight: bold;
        line-height: 2.2em;
        padding:3px 4px 3px 4px;
        -moz-border-radius:2px;
        -webkit-border-radius:4px;
        border-radius:4px;
        color:#fff;
        background:#4D4D4D  
}
#content nav 
a:focus,
a:active,
a:hover {
        text-decoration: none;
        opacity: 0.7;
}

Mettre les articles en pleine page :

Modifier le fichier single.php dans le thème et mettre juste après le get_header(); ?> :

<?php
/**
 * The Template for displaying all single posts.
 *
 * @package Catch Themes
 * @subpackage Catch_Box
 * @since Catch Box 1.0
 */

get_header(); ?>

<style type="text/css">
.sidebar-content #content {
    margin: 0 3% 0 3%;
}
#content {
    width: auto;
}
</style>

Et virer l’affichage de la sidebar en commentant cette partie :

<!-- Mise en commentaire pour ne pas afficher "archives" et "meta" dans la sidebar

                <aside id="archives">
                    <h3><?php _e( 'Archives', 'catchbox' ); ?></h3>
                    <div>
                        <ul>
                            <?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
                        </ul>
                    </div>
                </aside>

                <aside id="meta">
                    <h3><?php _e( 'Meta', 'catchbox' ); ?></h3>
                    <div>
                        <ul>
                            <?php wp_register(); ?>
                            <li><?php wp_loginout(); ?></li>
                            <?php wp_meta(); ?>
                        </ul>
                      </div>
                </aside>
Fin de commentaire -->

Enlever le posté par… le… :

Commenter dans le fichier content-single.php du thème la ligne contenant <?php catchbox_posted_on(); ?> :

  <?php if ( 'post' == get_post_type() ) : ?>
            <div>
                <!-- <?php catchbox_posted_on(); ?> -->
                <?php if ( comments_open() && ! post_password_required() ) : ?>
                    <span> &mdash; </span>
                    <span>

Listes des articles dans les catégories

Installer le plugin « list category posts »

Ajouter dans style.css :

.lcp_catlist li:nth-child(odd) {
background: #eaeaea; /* Old browsers */
background: -moz-linear-gradient(top, #eaeaea 0%, #f9f9f9 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eaeaea), color-stop(100%,#f9f9f9)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #eaeaea 0%,#f9f9f9 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #eaeaea 0%,#f9f9f9 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #eaeaea 0%,#f9f9f9 100%); /* IE10+ */
background: linear-gradient(to bottom, #eaeaea 0%,#f9f9f9 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eaeaea', endColorstr='#f9f9f9',GradientType=0 ); /* IE6-9 */
}

.lcp_catlist {
list-style: none;
margin: 0;
border: solid 1px #CCC;
}

.lcp_catlist code{
font-family: arial, helvetica, sans-serif;
}

.lcp_catlist li {
border-bottom: solid 1px #CCC;
padding: 5px;
}

.lcp_catlist li:hover {
background: #cccccc; /* Old browsers */
background: -moz-linear-gradient(top, #cccccc 0%, #eeeeee 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cccccc), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #cccccc 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #cccccc 0%,#eeeeee 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #cccccc 0%,#eeeeee 100%); /* IE10+ */
background: linear-gradient(to bottom, #cccccc 0%,#eeeeee 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */
}

.lcp_catlist a {
color: #095197;
}

Ajout d’une table des matières

Plugin Table of content de SedLex