Skip to content

Instantly share code, notes, and snippets.

View wesleysaraujo's full-sized avatar

Wesley Serafim de Araújo wesleysaraujo

View GitHub Profile
@wesleysaraujo
wesleysaraujo / app.scss
Created September 14, 2017 17:23
Ajuste no app.scss
html {
position: relative;
min-height: 100%;
body {
/* Margin bottom by footer height */
padding-top: 60px;
> .container {
padding: 60px 15px 0;
@wesleysaraujo
wesleysaraujo / MainFooter.vue
Last active September 14, 2017 17:06
Componente MainFooter
<template>
<footer class="footer">
<div class="container">
<span class="text-muted">&copy; SocialC - Nossa rede social com VueJs 2</span>
</div>
</footer>
</template>
<script>
export default {}
</script>
@wesleysaraujo
wesleysaraujo / NavRight.vue
Last active September 14, 2017 07:15
Componente NavRight.vue
<template>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#">Contato</a>
</li>
<li>
<a href="#">Login</a>
</li>
</ul>
</template>
@wesleysaraujo
wesleysaraujo / NavLeft.vue
Last active September 14, 2017 07:10
Componente NavLeft.vue
<template>
<ul class="nav navbar-nav">
<li>
<a href="#">Amigos</a>
</li>
<li>
<a href="/">Publicações</a>
</li>
</ul>
</template>
@wesleysaraujo
wesleysaraujo / NavBrand.vue
Last active September 14, 2017 07:03
Componente NavBrand.vue
<template>
<div class="navbar-header">
<a href="/" class="navbar-brand">SocialC</a>
<button
class="navbar-toggle"
type="button"
data-toggle="collapse"
data-target="#navbar-main">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
@wesleysaraujo
wesleysaraujo / Componente.vue
Created September 14, 2017 06:35
Sintaxe basica de componentes .Vue
<template>
<div>
<h1>Essa div é obrigatória</h1>
<p>{{ msg }}</p>
</div>
</template>
<script>
export default {
name: "component-name", #nem sempre obrigatório
data () {
@wesleysaraujo
wesleysaraujo / Main.vue
Last active September 14, 2017 06:45
Componente header/Main.vue com o nav do bootstrap
<template>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<!-- Aqui ficará nosso componente nav-brand !-->
<div class="navbar-collapse collapse" id="navbar-main">
<!-- Aqui ficará nav-left e nav-right !-->
</div>
</div>
</nav>
</template>
@wesleysaraujo
wesleysaraujo / CopyToClipBoard
Last active March 2, 2017 17:52
JS copy to clipboard
// Copy to clipboard
copyToClipboard: function() {
var element = this;
var content = $(element).data('copy');
// creating new textarea element and giveing it id 't'
var t = document.createElement('textarea');
t.id = 't';
// Optional step to make less noise in the page, if any!
@wesleysaraujo
wesleysaraujo / estados.php
Created January 12, 2017 14:11 — forked from ricardobarantini/estados.php
Array com nome e siglas de estados Brasileiros para select do Codeigniter
$estadosBrasileiros = [
'AC'=>'Acre',
'AL'=>'Alagoas',
'AP'=>'Amapá',
'AM'=>'Amazonas',
'BA'=>'Bahia',
'CE'=>'Ceará',
'DF'=>'Distrito Federal',
'ES'=>'Espírito Santo',
'GO'=>'Goiás',
@wesleysaraujo
wesleysaraujo / product.json
Created August 25, 2016 05:37
Listagem de produtos de exemplo
[
{
"id" : 1,
"name" : "Calça Jeans Masculina",
"description" : "Calça jeans rajada, sizes P M G GG",
"price" : 89.90,
"amount_off" : 24,
"price_off" : 39.99,
"image" : "calca-jeans.jpg",
"stock" : 100