Skip to content

Instantly share code, notes, and snippets.

View lucadegasperi's full-sized avatar

Luca Degasperi lucadegasperi

View GitHub Profile
@lucadegasperi
lucadegasperi / checklist.md
Last active August 29, 2015 14:03
CMS Checklist

What are the features a modern CMS should have?

  • Multilingual but Localized
  • Shouldn't mess with HTML / CSS / JS
  • Built on modern foundations
  • Allow for different post types
  • Versioning of content
@lucadegasperi
lucadegasperi / SassMeister-input.scss
Created April 26, 2015 17:24
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
// per ogni tema dichiaro la palette
$themes: (
theme1: (
base-color: red
),
@lucadegasperi
lucadegasperi / SassMeister-input.scss
Created April 26, 2015 17:33
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
// per ogni tema dichiaro la palette
$themes: (
theme1: (
base-color: red
),
@lucadegasperi
lucadegasperi / MetaCollection
Last active August 29, 2015 14:28
Meta collection in laravel
class MetaCollection extends Collection
{
public function __get($name)
{
return $this->getValue($name);
}
public function getValue($name, $default = null)
{
$m = $this->filter(function ($meta) use ($name) {
@lucadegasperi
lucadegasperi / gist:1154022
Created August 18, 2011 13:04
Example view.php for Tiles
<section class="social">
<?php if($title) : ?>
<h1><?php echo $title; ?></h1>
<?php endif; ?>
<?php if($description) : ?>
<p><?php echo $description; ?></p>
<?php endif; ?>
<ul>
<?php foreach($social_networks as $sn) : ?>
<li>
@lucadegasperi
lucadegasperi / bad-slideshow.html
Created September 28, 2011 10:21
Bad Slideshow Markup
<div class="slideshow">
<a href="#" class="prev" title="Show Previous Image">Previous</a>
<ul>
<li>
<img src="image-1.jpg" alt="Image 1"/>
</li>
<li>
<img src="image-2.jpg" alt="Image 2"/>
</li>
<li>
@lucadegasperi
lucadegasperi / good-slideshow.html
Created September 28, 2011 10:29
Good Slideshow Markup
<div class="slideshow">
<ul>
<li>
<img src="image-1.jpg" alt="Image 1"/>
</li>
<li>
<img src="image-2.jpg" alt="Image 2"/>
</li>
<li>
<img src="image-3.jpg" alt="Image 3"/>
@lucadegasperi
lucadegasperi / even-better-slideshow.html
Created September 28, 2011 11:16
Even Better Slideshow Markup
<div class="slideshow">
<ul>
<li>
<img src="image-1.jpg" alt="Image 1"/>
</li>
</ul>
</div>
@lucadegasperi
lucadegasperi / declaration-after-context.css
Created August 19, 2012 22:49
Context Based CSS Examples
.titlebar
{
/* titlebar css rules go here */
}
.titlebar .button
{
/* button's titlebar context modified rules go here */
}
@lucadegasperi
lucadegasperi / helloworld.txt
Created January 24, 2013 14:33
hello world
Hello World To You!