Skip to content

Instantly share code, notes, and snippets.

@rainbowstudio
rainbowstudio / .htaccess
Created March 18, 2014 21:48
htaccess de base CMSMS
# ------------------------------------------------------------------------------
# | CONFIG DE BASE CMSMS |
# ------------------------------------------------------------------------------
# A désactiver sur les hébergements Celeonet
php_value upload_max_filesize "8M"
#php_value session_save_path "tmp/cache"
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off
@rainbowstudio
rainbowstudio / addSizes.js
Created March 18, 2014 21:59
Affichage du type et de la taille des documents pdf
function hdrDetails(index, elm, length, type) {
// divide the length into its largest unit
var units = [
[1024 * 1024 * 1024, 'Go'],
[1024 * 1024, 'Mo'],
[1024, 'Ko'],
[1, 'bytes']
];
for(var i = 0; i < units.length; i++){
@rainbowstudio
rainbowstudio / equalHeights.js
Created March 18, 2014 22:06
Bloc de hauteurs égales par ligne. Utiles pour les présentations en grille
/* Thanks to CSS Tricks for pointing out this bit of jQuery
http://css-tricks.com/equal-height-blocks-in-rows/
It's been modified into a function called at page load and then each time the page is resized. One large modification was to remove the set height before each new calculation.
USAGE :
$(window).load(function() {
$('.block').equalHeights();
});
$(window).resize(function(){
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
options: {
includePaths: [
'bower_components/foundation/scss',
require('node-bourbon').includePaths
]
@rainbowstudio
rainbowstudio / extra_config.js
Created March 18, 2014 23:45
Personnalisation de l'éditeur Tinymce de CMS. A coller dans le champ Extra configuration dans les paramètres de Tinymce.
style_formats : [
{title : 'Intro', block : 'div', wrapper : true, classes : 'intro'},
{title : 'Texte en orange', inline : 'span', classes : 'primary-color'},
],
formats: {
alignleft : [
{selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table', styles : {textAlign : 'left'}, attributes : {"align" : ''}},
{selector : 'img', classes : 'alignleft'},
],
aligncenter : [
@rainbowstudio
rainbowstudio / accessibility.html
Last active August 29, 2015 13:57
Template CMSMS/foundation
{*<!-- accessibility links, jump to nav or content -->*}
<ul class="visuallyhidden">
<li>{anchor anchor='primary-nav' title='Aller directement à la navigation' accesskey='n' text='Aller directement à la navigation'}</li>
<li>{anchor anchor='main' title='Aller directement au contenu' accesskey='s' text='Aller directement au contenu'}</li>
</ul>
{*<!-- accessibility //-->*}