This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disable routes | |
*/ | |
/** | |
* disable useless routes | |
* prevent user to call routes that you don't skin ;) | |
* comment the lines you skin // | |
*/ | |
function disable_useless_routes() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* check media queries | |
* @return {string} tablet | desktop | phone | |
* @author CAILLET Michael <https://mi-ca.ch> | |
*/ | |
function checkMQ(){ | |
if(window.matchMedia('(min-width: 40em) and (max-width: 64em)').matches){ | |
return "tablet"; | |
} | |
else if(window.matchMedia('(min-width: 64em)').matches){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FORCE https | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Analyse a string , grab Bandcamp links and replace them by embed player | |
* You may change the html code of the player in buildEmbed method | |
* | |
* @author Michael CAILLET <a href="https://mi-ca.ch">mi-ca.ch</a> | |
* @version 1.0 | |
* @uses $bc=new BandCampEmbed($string); | |
* echo $bc->getEmbededText(); | |
* // OR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Slugify a string | |
* @param {String} text | |
* @return {String} | |
*/ | |
export function slugify(text) { | |
return text.toString().toLowerCase() | |
.replace(/([å,ä])/g, 'a') // Replace å and ä with aa | |
.replace(/(ö)/g, 'o') // Replace ö with o | |
.replace(/\s+/g, '-') // Replace spaces with - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add and remove body_class() classes | |
*/ | |
function mica_body_class($classes) { | |
// Add post/page slug if not present | |
if (is_single() || is_page() && !is_front_page()) { | |
if (!in_array(basename(get_permalink()), $classes)) { | |
$classes[] = basename(get_permalink()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args = array( | |
'post_type'=>'events', | |
'posts_per_page'=>1 | |
); | |
$the_query = new WP_Query( $args ); | |
// The Loop | |
if ( $the_query->have_posts() ) : ?> | |
<ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instructions pour la mise à jour | |
des exercices css v3.0 | |
-- 12 jan. 2015 -- | |
********************************* | |
1° Fichier index.html | |
line ~36 | |
Ajouter un nouvel élément de menu jQuery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instructions pour la mise à jour | |
des exercices css v3.0 | |
-- 13 oct. 2014 -- | |
********************************* | |
1° Fichier: css/mi-ca.css | |
Ligne 8 changer la valeur du z-index de 1 à 10 | |
z-index:1; -> z-index:10; |