home.blade.php
<div class="centered">
<a href="{{ route('greet')}}">Greet</a>
<a href="{{ route('hug')}}">Hug</a>
<a href="{{ route('kiss')}}">Kiss</a>
</div>
route.php
//recibe el parametro name donde name puede o no tener un valor
Route::get('/greet/{name?}', function ($name=null) {
return view('actions.greet', ['name'=>$name]);
})->name('greet');
Route::get('/hug', function () {
return view('actions.hug');
})->name('hug');
Route::get('/kiss', function () {
return view('actions.kiss');
})->name('kiss');
en greet.blade.php
@extends('layouts.master')
@section('content')
<h1>I greet {{ $name === null ? 'you' : $name }}!</h1>
@endsection
martes, 21 de junio de 2016
Ciclo For en Blade
@for($i = 0; $i < 10; $i++)
@if($i % 2 === 0)
<li>Interaction {{ $i + 1 }}</li>
@endif
@endfor
@if($i % 2 === 0)
<li>Interaction {{ $i + 1 }}</li>
@endif
@endfor
Crear Proyecto en Laravel
Via Composer Create-Project
Alternatively, you may also install Laravel by issuing the Composer
create-project command in your terminal:composer create-project --prefer-dist laravel/laravel blog
Instalar composer
curl -sS https://getcomposer.org/installer
sudo php -- --install-dir=/usr/local/bin --filename=composer
sudo php -- --install-dir=/usr/local/bin --filename=composer
lunes, 30 de mayo de 2016
Tipos de selectores
/* Selector universal */
* {
border: 1px solid red;
margin: 10px;
}
/*selector de etiqueta */
header {
background: blue;
}
section {
background: purple;
}
/*selector descendente */
article h3 {
color: green;
}
/*Selectores de clase */
.title-a {
background: yellow;
}
.title-b {
background: salmon;
}
/* Selector de id */
#header {
border: 3px solid black;
}
#portada {
border: 3px solid ORANGE;
}
#guitarras {
border: 3px solid BROWN;
}
* {
border: 1px solid red;
margin: 10px;
}
/*selector de etiqueta */
header {
background: blue;
}
section {
background: purple;
}
/*selector descendente */
article h3 {
color: green;
}
/*Selectores de clase */
.title-a {
background: yellow;
}
.title-b {
background: salmon;
}
/* Selector de id */
#header {
border: 3px solid black;
}
#portada {
border: 3px solid ORANGE;
}
#guitarras {
border: 3px solid BROWN;
}
viernes, 6 de mayo de 2016
Animacion con Jquery
<div class="square"></div>
.square{
width: 100px;
height: 100px;
background-color: blue;
top:50px;
position:relative;
}
$(".square").animate({
width: "500px",
top: "50px"
}, 1000, "easeInOutQuint");
/*
Se debe agregar jquery UI
swing
easeInOutQuint
easeOutElastic
easeOutBounce
*/
.square{
width: 100px;
height: 100px;
background-color: blue;
top:50px;
position:relative;
}
$(".square").animate({
width: "500px",
top: "50px"
}, 1000, "easeInOutQuint");
/*
Se debe agregar jquery UI
swing
easeInOutQuint
easeOutElastic
easeOutBounce
*/
Animación en un Botón
<button class="btn">Eses mi boton</button>
.btn{
background-color: #600;
color:white;
bordwer:none;
width: 200px;
height; 40px;
font-weight: bold;
border-radius: 4px;
font-size: 14px;
transition: all 1s; /*backgorind-color 1s*/
}
.btn:hover{
background-color: #a30;
font-size: 20px;
}
.btn{
background-color: #600;
color:white;
bordwer:none;
width: 200px;
height; 40px;
font-weight: bold;
border-radius: 4px;
font-size: 14px;
transition: all 1s; /*backgorind-color 1s*/
}
.btn:hover{
background-color: #a30;
font-size: 20px;
}
Suscribirse a:
Entradas (Atom)