From ac113b582f3c0f97fd8e266f42bc0de28b15855f Mon Sep 17 00:00:00 2001 From: Peter Szel Date: Sat, 29 Mar 2014 02:02:23 +0100 Subject: [PATCH] Added fancy fade-in effect and autofocus to the login pages (signin, signup, forgotten, reset). - Added CSS to implement the fade in effect. - Added 'autofocus' to the attribute bindings of the TextField so they accept it. --- ghost/admin/app.js | 1 + ghost/admin/assets/css/ember-hacks.css | 39 ++++++++++++++++++++++++++ ghost/admin/templates/forgotten.hbs | 4 +-- ghost/admin/templates/reset.hbs | 4 +-- ghost/admin/templates/signin.hbs | 4 +-- ghost/admin/templates/signup.hbs | 4 +-- ghost/admin/utils/text-field.js | 3 ++ 7 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 ghost/admin/utils/text-field.js diff --git a/ghost/admin/app.js b/ghost/admin/app.js index ecee1b0e4f..b7160f4698 100755 --- a/ghost/admin/app.js +++ b/ghost/admin/app.js @@ -2,6 +2,7 @@ import Resolver from 'ember/resolver'; import initFixtures from 'ghost/fixtures/init'; import {currentUser, injectCurrentUser} from 'ghost/initializers/current-user'; import 'ghost/utils/link-view'; +import 'ghost/utils/text-field'; var App = Ember.Application.extend({ /** diff --git a/ghost/admin/assets/css/ember-hacks.css b/ghost/admin/assets/css/ember-hacks.css index c51698f1c1..ecd98ecffa 100644 --- a/ghost/admin/assets/css/ember-hacks.css +++ b/ghost/admin/assets/css/ember-hacks.css @@ -17,4 +17,43 @@ -webkit-transition: none; -moz-transition: none; transition: none; +} + +.fade-in { + animation: fadein 0.5s; + -moz-animation: fadein 0.5s; /* Firefox */ + -webkit-animation: fadein 0.5s; /* Safari and Chrome */ + -o-animation: fadein 0.5s; /* Opera */ +} +@keyframes fadein { + from { + opacity:0; + } + to { + opacity:1; + } +} +@-moz-keyframes fadein { /* Firefox */ + from { + opacity:0; + } + to { + opacity:1; + } +} +@-webkit-keyframes fadein { /* Safari and Chrome */ + from { + opacity:0; + } + to { + opacity:1; + } +} +@-o-keyframes fadein { /* Opera */ + from { + opacity:0; + } + to { + opacity: 1; + } } \ No newline at end of file diff --git a/ghost/admin/templates/forgotten.hbs b/ghost/admin/templates/forgotten.hbs index 833db5f620..4fde70da52 100644 --- a/ghost/admin/templates/forgotten.hbs +++ b/ghost/admin/templates/forgotten.hbs @@ -1,7 +1,7 @@ -
+
diff --git a/ghost/admin/templates/reset.hbs b/ghost/admin/templates/reset.hbs index b41c1bdbfb..a255a11fe3 100644 --- a/ghost/admin/templates/reset.hbs +++ b/ghost/admin/templates/reset.hbs @@ -1,7 +1,7 @@ -
+
- {{input value=passwords.newPassword class="password" type="password" placeholder="Password" name="newpassword" }} + {{input value=passwords.newPassword class="password" type="password" placeholder="Password" name="newpassword" autofocus="autofocus" }}
{{input value=passwords.ne2Password class="password" type="password" placeholder="Confirm Password" name="ne2password" }} diff --git a/ghost/admin/templates/signin.hbs b/ghost/admin/templates/signin.hbs index 67835bccf8..13813a0dfb 100644 --- a/ghost/admin/templates/signin.hbs +++ b/ghost/admin/templates/signin.hbs @@ -1,7 +1,7 @@ -