Skip to content

Instantly share code, notes, and snippets.

View acacha's full-sized avatar

Sergi Tur Badenas acacha

View GitHub Profile
@acacha
acacha / box.vue
Created June 24, 2017 12:22
AdminLTE box vue component
<template>
<div v-if="removed" class="box" :class="[{'box-solid' : isSolid}, {'collapsed-box' : isCollapsed }, 'box-' + color]">
<div class="box-header" :class="{'with-border' : borderOnHeader}">
<div class="box-title" v-if="!noTitle">
<slot name="title">Put your title here using slot with name title</slot>
</div>
<div class="box-tools pull-right" v-if="!noTitle">
<slot name="box-tools">
<button v-if="isCollapsable" type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa" :class="collapseIcon"></i></button>
<button v-if="isRemovable" type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
@acacha
acacha / box_template_part.vue
Created June 24, 2017 12:31
Box template part vue
<template>
<div v-if="removed" class="box" :class="[{'box-solid' : isSolid}, {'collapsed-box' : isCollapsed }, 'box-' + color]">
<div class="box-header" :class="{'with-border' : borderOnHeader}">
<div class="box-title" v-if="!noTitle">
<slot name="title">Put your title here using slot with name title</slot>
</div>
<div class="box-tools pull-right" v-if="!noTitle">
<slot name="box-tools">
<button v-if="isCollapsable" type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa" :class="collapseIcon"></i></button>
<button v-if="isRemovable" type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
<div class="box-body">
<slot>Put your content here using default slot</slot>
</div>
<adminlte-vue-box id="default_box_with_custom_box_tools">
<template slot="box-tools">
<button type="button" class="btn btn-box-tool" ><i class="fa fa-cog"></i></button>
<button type="button" class="btn btn-box-tool" ><i class="fa fa-user"></i></button>
</template>
<span slot="title">Custom tool box!</span>
Custom tool box
</adminlte-vue-box>
@acacha
acacha / test.spec.js
Created November 13, 2017 18:42
Template new test Mocha Vue
import { mount } from 'vue-test-utils'
import expect from 'expect'
import #[[$Component$]]# from '../../resources/assets/js/components/#[[$Component$]]#.vue'
describe('#[[$Component$]]#', () => {
let component
beforeEach(() => {
component = mount(#[[$Component$]]#)
})
@acacha
acacha / example.vue
Created November 13, 2017 18:43
Vue component template
<template>
<div>
{{#[[$data$]]#}}
</div>
</template>
<style>
</style>
@acacha
acacha / gist:93d676daf953a589a704ed1827138083
Created November 14, 2017 15:39
PHPSTORM Laravel Blade Adminlte template
@extends('adminlte::layouts.app')
@section('htmlheader_title')
#[[$HEADER_TITLE$]]#
@endsection
@section('main-content')
#[[$CONTENT$]]#
@endsection
@acacha
acacha / wait.js
Created November 15, 2017 17:57 — forked from ericelliott/wait.js
Wait -- an ES6 promise example
const wait = time => new Promise((resolve) => setTimeout(resolve, time));
wait(3000).then(() => console.log('Hello!')); // 'Hello!'
04c170c4be84786b77a51717a7627ad50df3f4f13eff18dbf987783d733c42f64b0a3277cc3abacad19138a18cdc6943267d621941798afd55a8b1298c06170797
@acacha
acacha / welcome.blade.php
Created April 16, 2018 15:33
Example welcome Page with laravel blade and Vuetify
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<title>{{ config('app.name') }}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="{{ csrf_token() }}">
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet">
<link href="https://unpkg.com/vuetify/dist/vuetify.min.css" rel="stylesheet">
<style>