25.06.2018 Views

Full-Stack Vue.js 2 and Laravel 5

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

$ touch<br />

resources/assets/components/LoginPage.vue<br />

We'll begin by defining the template markup, which includes a form<br />

with fields for email <strong>and</strong> password, <strong>and</strong> a submit button. The form<br />

uses the HTTP POST method <strong>and</strong> is sent to the /login path. I've<br />

wrapped the form elements in a div with the .form-controller class<br />

to help with styling.<br />

resources/assets/components/LoginPage.vue: <br />

Log in <br />

<br />

We don't need any JavaScript functionality just yet, so let's add our<br />

CSS rules now.<br />

resources/assets/components/LoginPage.vue: ...<br />

#login form { padding-top: 40px; } @media<br />

(min-width: 744px) { #login form { padding-top: 80px; } } #login<br />

.form-control { margin-bottom: 1em; } #login input[type=email],<br />

#login input[type=password], #login button, #login label { width:<br />

100%; font-size: 19px !important; line-height: 24px; color: #484848;<br />

font-weight: 300; } #login input { background-color: transparent;<br />

padding: 11px; border: 1px solid #dbdbdb; border-radius: 2px; boxsizing:border-box<br />

} #login button { background-color: #4fc08d; color:<br />

#ffffff; cursor: pointer; border: #4fc08d; border-radius: 4px; padding-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!