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
$(document).bind("WithHistory.urlDidChange", function() { | |
$.ajax(window.withHistory.url(), { | |
dataType: "html", | |
success: function(response) { | |
var body = response.match(/<body.*?>([\s\S]+?)<\/body>/)[1]; | |
var tmp = $("<div />"); | |
tmp.html(body); | |
var newContent = tmp.find("#pagecontent").html(); | |
$("#pagecontent").animate({ opacity: 0 }, 250); |
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 | |
class FacebookLike extends WireData implements Module { | |
public static function getModuleInfo() { | |
return array( | |
'title' => 'Facebook Like Button', | |
'version' => 101, | |
'summary' => 'Display Facebook like buttons on your Processwire site.', |
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 | |
class Analytics extends WireData implements Module { | |
public static function getModuleInfo() { | |
return array( | |
'title' => 'Google Analytics', | |
'version' => 101, | |
'summary' => 'Adds some quick hooks for the Google Analytics Service', |
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
{% extends 'default.html' %} | |
{% block main %} | |
<h1>{{page.title}}</h1> | |
{{ page.body | markdown }} | |
{% endblock %} |
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
template : post | |
title: Home | |
posts : | |
- title: This is my first post | |
body: Testing out Caret cms :) | |
- title: This is my second post | |
body: Lorem ipsum dolor ist... |
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
<article> | |
{% for post in page.posts %} | |
<h2>{{ post.title }}</h2> | |
{{ post.body }} | |
{% endfor %} | |
</article> |
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
def next | |
project.images.first(:conditions => ["position > ?", position], :order => "position asc") | |
end | |
def prev | |
project.images.last(:conditions => ["position < ?", position], :order => "position desc") | |
end |
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
@mixin background-image-retina($file, $type, $width, $height) { | |
background-image: url($file + '.' + $type); | |
@media (-webkit-min-device-pixel-ratio: 2), (-moz-min-device-pixel-ratio: 2) { | |
& { | |
background-image: url($file + '@2x.' + $type); | |
-webkit-background-size: $width $height; | |
} | |
} | |
} |
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
<area title=" Outgoings"> | |
<feature type="Lease"> | |
<heading>Lease</heading> | |
<description>94 years remaining</description> | |
</feature> | |
<feature type="Ground Rent/Maintenance"> | |
<heading>Ground Rent/Maintenance</heading> | |
<description>£721.30 per annum.</description> | |
</feature> | |
<feature type="NB"> |
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
(function(i) { | |
'use strict'; | |
console.log(i); // undefined | |
console.log(bar); // function | |
console.log(animals); // undefined | |
console.log('-------------------------'); | |
var i = 2; |
OlderNewer