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
(($, window, undefined) => { | |
let pluginName = 'plugin_name', | |
document = window.document, | |
settings = { | |
} | |
class Plugin { | |
constructor(element, options) { |
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
<div id="root" class="container"> | |
<tabs> | |
<tab name="Services" :selected="true"> | |
<h1>What we do</h1> | |
</tab> | |
<tab name="Pricing"> | |
<h1>How much we do it for</h1> | |
</tab> | |
<tab name="About Us"> |
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
.modal-mask { | |
position: fixed; | |
z-index: 9998; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
background-color: rgba(0, 0, 0, .5); | |
display: table; | |
transition: opacity .3s ease; |
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
v-for="(event, index) in events" | |
... | |
<button ... @click="deleteEvent(index)" | |
deleteEvent: function(index) { | |
this.events.splice(index, 1); | |
} |
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
Vue.directive('click-outside', { | |
bind () { | |
this.event = event => this.vm.$emit(this.expression, event) | |
this.el.addEventListener('click', this.stopProp) | |
document.body.addEventListener('click', this.event) | |
}, | |
unbind() { | |
this.el.removeEventListener('click', this.stopProp) | |
document.body.removeEventListener('click', this.event) | |
}, |
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
$font: ("Bold": bold, "Regular": normal, "Medium": 500, "Thin": 100); | |
@each $style, $width in $font { | |
$url: $base-font-family + '-' + #{$style}; | |
$rel_url: '/fonts/' + $url + '/' + $url; | |
@font-face { | |
font-family: $base-font-family; | |
src: url($rel_url + '.eot'); | |
src: url($rel_url + '.eot?#iefix') format('embedded-opentype'), | |
url($rel_url + '.woff') format('woff'), |
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 rem($pixels, $context: $base-font-size) { | |
@if (unitless($pixels)) { | |
$pixels: $pixels * 1px; | |
} | |
@if (unitless($context)) { | |
$context: $context * 1px; | |
} | |
@return $pixels / $context * 1rem; |
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
let mix = require('laravel-mix'); | |
const path = require('path') | |
/* | |
|-------------------------------------------------------------------------- | |
| Mix Asset Management | |
|-------------------------------------------------------------------------- | |
| | |
| Mix provides a clean, fluent API for defining some Webpack build steps | |
| for your Laravel application. By default, we are compiling the Sass |
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
JS Placeholder | |
$.widget( 'app.selectmenu', $.ui.selectmenu, { | |
_drawButton: function() { | |
this._super(); | |
var selected = this.element | |
.find( '[selected]' ) | |
.length, | |
placeholder = this.options.placeholder; | |
if (!selected && placeholder) { |
OlderNewer