Showing
6 changed files
with
46 additions
and
8 deletions
| ... | @@ -11,6 +11,12 @@ | ... | @@ -11,6 +11,12 @@ |
| 11 | &:active { | 11 | &:active { |
| 12 | background-color: darken($backgroundColor, 8%); | 12 | background-color: darken($backgroundColor, 8%); |
| 13 | } | 13 | } |
| 14 | + &:focus { | ||
| 15 | + background-color: lighten($backgroundColor, 4%); | ||
| 16 | + box-shadow: $bs-light; | ||
| 17 | + text-decoration: none; | ||
| 18 | + color: $textColor; | ||
| 19 | + } | ||
| 14 | } | 20 | } |
| 15 | 21 | ||
| 16 | // Button Specific Variables | 22 | // Button Specific Variables | ... | ... |
| ... | @@ -30,6 +30,9 @@ label { | ... | @@ -30,6 +30,9 @@ label { |
| 30 | color: #666; | 30 | color: #666; |
| 31 | padding-bottom: 2px; | 31 | padding-bottom: 2px; |
| 32 | margin-bottom: 0.2em; | 32 | margin-bottom: 0.2em; |
| 33 | + &.inline { | ||
| 34 | + display: inline-block; | ||
| 35 | + } | ||
| 33 | } | 36 | } |
| 34 | 37 | ||
| 35 | label.radio, label.checkbox { | 38 | label.radio, label.checkbox { |
| ... | @@ -57,7 +60,8 @@ input[type="text"], input[type="number"], input[type="email"], input[type="searc | ... | @@ -57,7 +60,8 @@ input[type="text"], input[type="number"], input[type="email"], input[type="searc |
| 57 | transition: all ease-in-out 120ms; | 60 | transition: all ease-in-out 120ms; |
| 58 | cursor: pointer; | 61 | cursor: pointer; |
| 59 | user-select: none; | 62 | user-select: none; |
| 60 | - .switch-handle { | 63 | + &:after { |
| 64 | + content: ''; | ||
| 61 | display: block; | 65 | display: block; |
| 62 | position: relative; | 66 | position: relative; |
| 63 | left: 0; | 67 | left: 0; |
| ... | @@ -72,13 +76,24 @@ input[type="text"], input[type="number"], input[type="email"], input[type="searc | ... | @@ -72,13 +76,24 @@ input[type="text"], input[type="number"], input[type="email"], input[type="searc |
| 72 | } | 76 | } |
| 73 | &.active { | 77 | &.active { |
| 74 | background-color: rgba($positive, 0.4); | 78 | background-color: rgba($positive, 0.4); |
| 75 | - .switch-handle { | 79 | + &:after { |
| 76 | left: 16px; | 80 | left: 16px; |
| 77 | background-color: $positive; | 81 | background-color: $positive; |
| 78 | border: darken($positive, 20%); | 82 | border: darken($positive, 20%); |
| 79 | } | 83 | } |
| 80 | } | 84 | } |
| 81 | } | 85 | } |
| 86 | +.toggle-switch-checkbox { | ||
| 87 | + display: none; | ||
| 88 | +} | ||
| 89 | +input:checked + .toggle-switch { | ||
| 90 | + background-color: rgba($positive, 0.4); | ||
| 91 | + &:after { | ||
| 92 | + left: 16px; | ||
| 93 | + background-color: $positive; | ||
| 94 | + border: darken($positive, 20%); | ||
| 95 | + } | ||
| 96 | +} | ||
| 82 | 97 | ||
| 83 | .form-group { | 98 | .form-group { |
| 84 | margin-bottom: $-s; | 99 | margin-bottom: $-s; |
| ... | @@ -162,3 +177,10 @@ input[type="text"], input[type="number"], input[type="email"], input[type="searc | ... | @@ -162,3 +177,10 @@ input[type="text"], input[type="number"], input[type="email"], input[type="searc |
| 162 | max-width: 100%; | 177 | max-width: 100%; |
| 163 | } | 178 | } |
| 164 | } | 179 | } |
| 180 | + | ||
| 181 | +#login-form label[for="remember"] { | ||
| 182 | + margin: 0; | ||
| 183 | +} | ||
| 184 | +#login-form label.toggle-switch { | ||
| 185 | + margin-left: $-xl; | ||
| 186 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -12,22 +12,29 @@ | ... | @@ -12,22 +12,29 @@ |
| 12 | <div class="center-box"> | 12 | <div class="center-box"> |
| 13 | <h1>Log In</h1> | 13 | <h1>Log In</h1> |
| 14 | 14 | ||
| 15 | - <form action="/login" method="POST"> | 15 | + <form action="/login" method="POST" id="login-form"> |
| 16 | {!! csrf_field() !!} | 16 | {!! csrf_field() !!} |
| 17 | 17 | ||
| 18 | <div class="form-group"> | 18 | <div class="form-group"> |
| 19 | <label for="email">Email</label> | 19 | <label for="email">Email</label> |
| 20 | - @include('form/text', ['name' => 'email']) | 20 | + @include('form/text', ['name' => 'email', 'tabindex' => 1]) |
| 21 | </div> | 21 | </div> |
| 22 | 22 | ||
| 23 | <div class="form-group"> | 23 | <div class="form-group"> |
| 24 | <label for="password">Password</label> | 24 | <label for="password">Password</label> |
| 25 | - @include('form/password', ['name' => 'password']) | 25 | + @include('form/password', ['name' => 'password', 'tabindex' => 2]) |
| 26 | <span class="block small"><a href="/password/email">Forgot Password?</a></span> | 26 | <span class="block small"><a href="/password/email">Forgot Password?</a></span> |
| 27 | </div> | 27 | </div> |
| 28 | 28 | ||
| 29 | + <div class="form-group"> | ||
| 30 | + <label for="remember" class="inline">Remember Me</label> | ||
| 31 | + <input type="checkbox" id="remember" name="remember" class="toggle-switch-checkbox"> | ||
| 32 | + <label for="remember" class="toggle-switch"></label> | ||
| 33 | + </div> | ||
| 34 | + | ||
| 35 | + | ||
| 29 | <div class="from-group"> | 36 | <div class="from-group"> |
| 30 | - <button class="button block pos">Sign In</button> | 37 | + <button class="button block pos" tabindex="3">Sign In</button> |
| 31 | </div> | 38 | </div> |
| 32 | </form> | 39 | </form> |
| 33 | 40 | ... | ... |
| 1 | <input type="password" id="{{ $name }}" name="{{ $name }}" | 1 | <input type="password" id="{{ $name }}" name="{{ $name }}" |
| 2 | @if($errors->has($name)) class="neg" @endif | 2 | @if($errors->has($name)) class="neg" @endif |
| 3 | @if(isset($placeholder)) placeholder="{{$placeholder}}" @endif | 3 | @if(isset($placeholder)) placeholder="{{$placeholder}}" @endif |
| 4 | + @if(isset($tabindex)) tabindex="{{$tabindex}}" @endif | ||
| 4 | @if(old($name)) value="{{ old($name)}}" @endif> | 5 | @if(old($name)) value="{{ old($name)}}" @endif> |
| 5 | @if($errors->has($name)) | 6 | @if($errors->has($name)) |
| 6 | <div class="text-neg text-small">{{ $errors->first($name) }}</div> | 7 | <div class="text-neg text-small">{{ $errors->first($name) }}</div> | ... | ... |
| 1 | <input type="text" id="{{ $name }}" name="{{ $name }}" | 1 | <input type="text" id="{{ $name }}" name="{{ $name }}" |
| 2 | @if($errors->has($name)) class="neg" @endif | 2 | @if($errors->has($name)) class="neg" @endif |
| 3 | @if(isset($placeholder)) placeholder="{{$placeholder}}" @endif | 3 | @if(isset($placeholder)) placeholder="{{$placeholder}}" @endif |
| 4 | + @if(isset($tabindex)) tabindex="{{$tabindex}}" @endif | ||
| 4 | @if(isset($model) || old($name)) value="{{ old($name) ? old($name) : $model->$name}}" @endif> | 5 | @if(isset($model) || old($name)) value="{{ old($name) ? old($name) : $model->$name}}" @endif> |
| 5 | @if($errors->has($name)) | 6 | @if($errors->has($name)) |
| 6 | <div class="text-neg text-small">{{ $errors->first($name) }}</div> | 7 | <div class="text-neg text-small">{{ $errors->first($name) }}</div> | ... | ... |
| ... | @@ -3,14 +3,14 @@ | ... | @@ -3,14 +3,14 @@ |
| 3 | <head> | 3 | <head> |
| 4 | <title>BookStack</title> | 4 | <title>BookStack</title> |
| 5 | <meta name="viewport" content="width=device-width"> | 5 | <meta name="viewport" content="width=device-width"> |
| 6 | - <link rel="stylesheet" href="/css/styles.css"> | 6 | + <link rel="stylesheet" href="{{ elixir('css/styles.css') }}"> |
| 7 | <link href='//fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,300italic,100,300' rel='stylesheet' type='text/css'> | 7 | <link href='//fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,300italic,100,300' rel='stylesheet' type='text/css'> |
| 8 | <link rel="stylesheet" href="/bower/material-design-iconic-font/dist/css/material-design-iconic-font.min.css"> | 8 | <link rel="stylesheet" href="/bower/material-design-iconic-font/dist/css/material-design-iconic-font.min.css"> |
| 9 | 9 | ||
| 10 | <!-- Scripts --> | 10 | <!-- Scripts --> |
| 11 | <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> | 11 | <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> |
| 12 | </head> | 12 | </head> |
| 13 | -<body class="@yield('body-class')"> | 13 | +<body class="@yield('body-class')" id="app"> |
| 14 | 14 | ||
| 15 | @if(Session::has('success')) | 15 | @if(Session::has('success')) |
| 16 | <div class="notification anim pos"> | 16 | <div class="notification anim pos"> |
| ... | @@ -62,5 +62,6 @@ | ... | @@ -62,5 +62,6 @@ |
| 62 | @yield('content') | 62 | @yield('content') |
| 63 | </section> | 63 | </section> |
| 64 | 64 | ||
| 65 | +<script src="{{ elixir('js/common.js') }}"></script> | ||
| 65 | </body> | 66 | </body> |
| 66 | </html> | 67 | </html> | ... | ... |
-
Please register or sign in to post a comment