This file contains hidden or 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 = class LazyLoad | |
| constructor: (@el, @callback) -> | |
| if @is_loaded() then @after() else @listen() | |
| listen: -> | |
| @el.on 'load', (e) => @after() | |
| is_loaded: -> | |
| @loaded = @el.get(0).complete |
This file contains hidden or 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 function try_snippet($try, $data = [], $return = false) { | |
| $snippets = kirby::instance()->roots()->snippets(); | |
| foreach ( $try as $snippet ) { | |
| $file = $snippets . DS . $snippet . '.php'; | |
| if ( f::exists($file) ) { | |
| return tpl::load($file, $data, $return); | |
| } else { | |
| continue; | |
| } | |
| } |
This file contains hidden or 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
| {% set entriesWithDateInRange = craft.entries({ | |
| section: 'section', | |
| type: 'type', | |
| order: 'customDate asc', | |
| customDate: ['and', '>= ' ~ now, '<= ' ~ (now.year + 1)] | |
| }) %} |
This file contains hidden or 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
| var gulp = require('gulp'), | |
| gutil = require('gulp-util'), | |
| coffee = require('gulp-coffee'), | |
| coffeeify = require('gulp-coffeeify'), | |
| concat = require('gulp-concat'), | |
| uglify = require('gulp-uglify'), | |
| sass = require('gulp-sass'), | |
| test = require('gulp-if'), | |
| del = require('del'), | |
| rename = require('gulp-rename'), |
This file contains hidden or 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
| <? email::$services['mailgun-html'] = function($email) { | |
| if(empty($email->options['key'])) throw new Error('Missing Mailgun API key'); | |
| if(empty($email->options['domain'])) throw new Error('Missing Mailgun API domain'); | |
| $url = 'https://api.mailgun.net/v2/' . $email->options['domain'] . '/messages'; | |
| $auth = base64_encode('api:' . $email->options['key']); | |
| $headers = array( | |
| 'Accept: application/json', |
This file contains hidden or 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
| getClass = (el) -> | |
| if el.hasAttribute 'class' | |
| el.getAttribute('class').split ' ' | |
| else | |
| [] | |
| hasClass = (el, className) -> | |
| -1 < getClass(el).indexOf className | |
| addClass = (el, className) -> |
This file contains hidden or 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
| <? namespace Craft; | |
| # craft/plugins/helpers/HelpersPlugin.php | |
| class HelpersPlugin extends BasePlugin | |
| { | |
| public function getName() | |
| { | |
| return Craft::t('Helpers'); | |
| } |
This file contains hidden or 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
| <? namespace Craft; | |
| class HelpersPlugin extends BasePlugin | |
| { | |
| public function getName() | |
| { | |
| return Craft::t('Helpers'); | |
| } | |
| public function getVersion() |
This file contains hidden or 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
| <? namespace Craft; | |
| class SfscPlugin extends BasePlugin | |
| { | |
| public function getName() | |
| { | |
| return Craft::t('Event Attendance'); | |
| } | |
| public function getVersion() |