Skip to content

Commit

Permalink
added login animation, cleaned up shitty code, rearranged variables f…
Browse files Browse the repository at this point in the history
…ile, added some ie compaitability
  • Loading branch information
sebmck committed Jun 18, 2012
1 parent ae690b9 commit 64a64d2
Show file tree
Hide file tree
Showing 23 changed files with 319 additions and 73 deletions.
16 changes: 16 additions & 0 deletions rails/app/assets/images/icons/arrow-big-right.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions rails/app/assets/images/icons/arrow-down.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions rails/app/assets/images/icons/download.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions rails/app/assets/images/icons/home.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions rails/app/assets/images/icons/lock.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions rails/app/assets/images/icons/pencil.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions rails/app/assets/images/icons/ratio.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions rails/app/assets/images/icons/search-active.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions rails/app/assets/images/icons/search-hover.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions rails/app/assets/images/icons/search.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions rails/app/assets/images/icons/showcase.html
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>Icon test</title>
</head>
<body style="background: #1a1a1a">
<img src="arrow-big-right.svg">
<img src="arrow-down.svg">
<img src="download.svg">
<img src="home.svg">
<img src="lock.svg">
<img src="pencil.svg">
<img src="ratio.svg">
<img src="search-active.svg">
<img src="search-hover.svg">
<img src="search-normal.svg">
<img src="upload.svg">
<img src="user.svg">

</body>
</html>
24 changes: 24 additions & 0 deletions rails/app/assets/images/icons/upload.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions rails/app/assets/images/icons/user.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion rails/app/assets/javascripts/sessions.js.coffee
@@ -1,9 +1,16 @@
return false if not do $('section.sessions').size

flash = (elem, opacity=0.5, times=1, time=200) ->
next = ->
elem.animate opacity: opacity, time, ->
elem.animate opacity: 1, time, ->
do next if --times isnt 0
do next

$('form.new').bind 'ajax:before', ->
$('input[type=submit]').attr 'disabled', true
do $('.icon.loading').show
$(".error").slideUp 100, ->
$('.error').slideUp 250, ->
do $(this).remove

$('form.new').bind 'ajax:success', (ev, response) ->
Expand All @@ -18,4 +25,5 @@ $('form.new').bind 'ajax:success', (ev, response) ->
</div>
"""
$(error).hide().insertAfter('strong').slideDown 250
flash $ 'section.sessions'
do $('form.new div.input:first input').focus
1 change: 0 additions & 1 deletion rails/app/assets/stylesheets/animate.css

This file was deleted.

10 changes: 5 additions & 5 deletions rails/app/assets/stylesheets/forms.css.scss
Expand Up @@ -3,6 +3,7 @@

button, .button, input, textarea {
font-family: inherit;
-webkit-appearance: none;
}

form {
Expand Down Expand Up @@ -60,7 +61,8 @@ button, .button, input[type=submit] {
box-shadow: $button-blue-active-box-shadow;
border: $button-blue-active-border;
}
&[disabled] {
&[disabled], &:disabled {
border-radius: inherit;
background: $button-blue-disabled-back;
box-shadow: none;
text-shadow: none;
Expand All @@ -83,10 +85,8 @@ input[type=text], input[type=password], textarea {
outline: none;
box-shadow: $input-text-focus-box-shadow;
}
&.error {
&:focus {
box-shadow: $input-text-focus-error-box-shadow;
}
&.error &:focus {
box-shadow: $input-text-focus-error-box-shadow;
}
}

Expand Down
22 changes: 14 additions & 8 deletions rails/app/assets/stylesheets/global.css.scss
Expand Up @@ -16,15 +16,21 @@ html, body {
}

.icon {
background-image: url($icon-path);
@include box($icon-size);
&.dropdown-arrow { @include sprite(1, 4); }
&.download { @include sprite(1, 5); }
&.upload { @include sprite(1, 6); }
&.current_ratio { @include sprite(1, 7); }
&.required_ratio { @include sprite(1, 8); }
&.user { @include sprite(1, 10); }
&.lock { @include sprite(1, 11); }
&.arrow-big-right { background-image: url($icon-arrow-big-right-path); }
&.arrow-down { background-image: url($icon-arrow-down-path); }
&.download { background-image: url($icon-download-path); }
&.home { background-image: url($icon-home-path); }
&.lock { background-image: url($icon-lock-path); }
&.pencil { background-image: url($icon-pencil-path); }
&.ratio { background-image: url($icon-ratio-path); }
&.search {
background-image: url($icon-search-path);
&:hover { background-image: url($icon-search-hover-path); }
&:active { background-image: url($icon-search-active-path); }
}
&.upload { background-image: url($icon-upload-path); }
&.user { background-image: url($icon-user-path); }
}

a, input, textarea {
Expand Down
2 changes: 1 addition & 1 deletion rails/app/assets/stylesheets/helpers.css.scss
Expand Up @@ -100,4 +100,4 @@
display: block;
clear: both;
}
}
}
8 changes: 1 addition & 7 deletions rails/app/assets/stylesheets/layout.css.scss
Expand Up @@ -92,12 +92,6 @@ header {
.good {
color: $header-user-ratio-good-color;
}
.current_ratio {

}
.required_ratio {

}
}
}
}
Expand All @@ -112,4 +106,4 @@ body > nav {

footer {
text-align: center;
}
}

0 comments on commit 64a64d2

Please sign in to comment.