Instantly share code, notes, and snippets.

View Storage.php
<?php
namespace Model;
use Nette;
class DemandStorage extends Nette\Object
{
protected $session;
public function __construct(Nette\Http\Session $session)
View mixins.scss
// Ensure CSS grid works with IE 11 spec.
// https://css-tricks.com/browser-compatibility-css-grid-layouts-simple-sass-mixins/
// sass-lint:disable no-vendor-prefixes, no-duplicate-properties
@mixin display-grid {
display: -ms-grid;
display: grid;
}
// $columns values should be delimited by a space
@mixin grid-template-columns($columns...) {
View slider.js
/**
* Easy slider plug-in pro jQuery
*
* (c) 2012 Drahomír Hanák
*/
(function( $ ) {
var inited = false;
View netteext.js
$.nette.ext('load_nette_after_snippets', {
init: function() {
this.ext('snippets').after(function() {
$.nette.load();
});
}
});
$.nette.init();
View tokenjs.js
/*
* jQuery Plugin: Tokenizing Autocomplete Text Entry
* Version 1.6.2
*
* Copyright (c) 2009 James Smith (http://loopj.com)
* Licensed jointly under the GPL and MIT licenses,
* choose which one suits your project best!
*
*/
;(function ($) {
View boxy.html
<div>text</div>
<div>text</div>
<div>text</div>
View menu.html
<select></select>
<nav>
<ul>
<li><a href="">A</a></li>
<li><a href="">B</a>
<ul>
<li><a href="">A</a></li>
<li><a href="">B</a></li>
View nested.js
$(document).ready(function() {
function getChildren($row) {
var children = [], level = $row.attr('data-level');
while($row.next().attr('data-level') > level) {
children.push($row.next());
$row = $row.next();
}
return children;
}
View someinit.js
/* Optional script description */
$().ready(function() {
appFront.init();
});
// Popup youtube video
$(document).ready(function () {
$('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
disableOn: 700,
View select.css
/*-------------------------------
* Default dropdown styles
--------------------------------*/
.tzSelect{
/* This is the container of the new select element */
height:34px;
display:inline-block;