Lots of people have asked, so here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft.
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
//Please note this does not currently work. | |
@each $section in council, household, business { | |
.#{$section} h2 { | |
//Step 1: I want this below varible to dynamically change to $council-light, $household-light, $business-light | |
color: $#{$section}-light; //this seems to be the problem of trying to append '-light' onto a varible name | |
//please note council-light, household-light, business-light are all predefined varibles with hex colours assigned. |
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 /* making sure we 'orderby' correctly */ | |
query_posts( $query_string . '&orderby=date&order=DEC' ); ?> | |
<?php if ( have_posts() ) : ?> | |
<?php | |
/* Setup */ | |
$display_year = ''; | |
$format = 'd/m/Y'; | |
$year_position = 2; |
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
//Simple comment up here to explain that accordion is a accordion with 3 parts blah blah blah | |
.accordion { | |
.js & { | |
display: none; | |
} | |
.js .open + & { | |
display: block; | |
} | |
//dont use & unless it changes the order here. | |
li { |
Lots of people have asked, so here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft.
-
Comments{{ cycle(['odd','even'], loop.index0 }}
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
# Ask for the administrator password upfront | |
sudo -v | |
# mkdir -p ~/Sites/Work/Clients | |
# mkdir -p ~/Sites/Work/Internal | |
# mkdir -p ~/Sites/Personal | |
# mkdir -p ~/Downloads/Torrents | |
mkdir -p /Volumes/Sites/Work/Clients | |
mkdir -p /Volumes/Sites/Work/Internal |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
module.exports = function (app) { | |
var _ = require('lodash'); | |
var User = app.models.User; | |
var Role = app.models.Role; | |
var RoleMapping = app.models.RoleMapping; | |
var ACL = app.models.ACL; | |
/* | |
* Configure ACL's | |
*/ |
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
// ---- | |
// libsass (v3.3.6) | |
// ---- | |
// ========================================================================= | |
// | |
// PRECISE CONTROL OVER RESPONSIVE TYPOGRAPHY FOR SASS | |
// --------------------------------------------------- | |
// Indrek Paas @indrekpaas | |
// |