5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-26 15:06:08 +00:00

login lindo

This commit is contained in:
f 2017-09-26 12:43:31 -03:00
parent c5b56f0f50
commit 7121f84ec5
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
10 changed files with 55 additions and 9 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
.bundle/
vendor/
node_modules/

View file

@ -17,6 +17,9 @@ module Sutty
enable :logging
enable :auth_use_referrer
set :auth_error_message, 'Hubo un error al ingresar'
set :auth_success_message, '¡Bienvenida!'
# Configura Warden para usar la estrategia IMAP y obtener la cuenta
# de usuaria a partir de la cookie.
use Warden::Manager do |config|
@ -30,5 +33,9 @@ module Sutty
end
set :root, File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
before do
@has_cover = true
end
end
end

5
package.json Normal file
View file

@ -0,0 +1,5 @@
{
"dependencies": {
"bootstrap": "4.0"
}
}

1
public/assets/css/bootstrap.min.css vendored Symbolic link
View file

@ -0,0 +1 @@
../../../node_modules/bootstrap/dist/css/bootstrap.min.css

View file

@ -0,0 +1 @@
../../../node_modules/bootstrap/dist/css/bootstrap.min.css.map

View file

@ -0,0 +1,11 @@
.background-cover {
background: url(/assets/img/background.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.full-height {
height: 100vh;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

10
views/layout.haml Normal file
View file

@ -0,0 +1,10 @@
!!!
%html
%head
%meta{content: "text/html; charset=UTF-8", 'http-equiv': "Content-Type"}/
%title Sutty
%link{rel: 'stylesheet', type: 'text/css', href: '/assets/css/bootstrap.min.css'}
%link{rel: 'stylesheet', type: 'text/css', href: '/assets/css/sutty.css'}
%body{class: @has_cover ? 'background-cover' : ''}
.container
= yield

View file

@ -1,11 +1,14 @@
%h1 Hola!
.row.align-items-center.justify-content-center.full-height
.col-md-6.align-self-center
- if flash[:error]
.alert.alert-danger{role: 'alert'}
= flash[:error]
- if flash[:error]
.alert.alert-danger{role: 'alert'}
= flash[:error]
%form{method: 'post', action: '/login'}
.form-group
%input{type: 'email', name: 'username', class: 'form-control', placeholder: 'Correo'}
.form-group
%input{type: 'password', name: 'password', class: 'form-control', placeholder: 'Contraseña'}
%form{method: 'post', action: '/login'}
%input{type: 'email', name: 'username', placeholder: 'Correo'}
%input{type: 'password', name: 'password', placeholder: 'Contraseña'}
%input{type: 'submit', value: 'Ingresar'}
.form-group
%input{type: 'submit', value: 'Ingresar', class: 'btn btn-lg btn-primary btn-block'}

7
yarn.lock Normal file
View file

@ -0,0 +1,7 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
bootstrap@4.0:
version "4.0.0-beta"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.0.0-beta.tgz#dc5928175d2e71310bc668cf9e05a907211b72a6"