Skip to content

Instantly share code, notes, and snippets.

View davidmars's full-sized avatar
☠️
looking for the skateboard emoji.

david davidmars

☠️
looking for the skateboard emoji.
View GitHub Profile
@davidmars
davidmars / pov-display-writer.php
Created June 14, 2014 04:29
Affiche l'auteur d'une page
<?php
/**
* A post page
*/
/* @var $this View */
/* @var $vv VV_post */
/** @noinspection PhpUndefinedVariableInspection */
$vv = $_vars;
@davidmars
davidmars / pov-list-tags-template.php
Last active August 29, 2015 14:02
POV Liste les tags dans un template (sauf les tags structurels)
<?php
/* @var $this View */
/* @var $vv VV_post */
/** @noinspection PhpUndefinedVariableInspection */
$vv = $_vars;
?>
<?if($tags=$vv->getTags(true,true)):?>
<div class="container">
<div class="text-center">
<div>
@davidmars
davidmars / .row.auto-clearfix.js
Last active December 23, 2015 19:19
.row.auto-clearfix in javascript In Twitter Bootstrap fmk add .clearfix elements to automatically finish row. Usage: Put a .auto-clearfix css class on a .row element. Call this stuff after resize, on load, put it in a function, etc...
$(".row.auto-clearfix").each(function(){
$(this).find(".created-by-auto-clearfix").remove(); //start cleaning previous stuff
var prevPos=0;
$(this).find(">[class^='col-'],>[class^='span']").each(function(){
var thisPos=$(this).position().left;
if(thisPos!=0 && thisPos==prevPos){ //this element should be on a new line dude!
$(this).before($("<div class='clearfix created-by-auto-clearfix'>"));
}
prevPos=$(this).position().left;
})