Last active
November 3, 2015 15:51
-
-
Save crusadergo/a8b9baf9b71fcf5d5132 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modulejs.define 'lib/profile', -> | |
init: -> | |
if ($('.dashboard').length > 0) | |
if $(window).width() < 980 | |
$('#footer').css 'padding-left', '50px' | |
else | |
$('#footer').css 'padding-left', '205px' | |
else | |
$('#footer').css('padding-left', '0px') | |
$('.profile-arrow').on 'click', -> | |
if $('.dashboard-text').hasClass 'collapsed' | |
$('.dashboard-text').removeClass('collapsed').addClass 'expanded' #uncollapsed | |
$('a[class="fa fa-angle-right"]').removeClass('fa-angle-right').addClass('fa-angle-left').css left: '102.5px' | |
$('.profile-arrow').css width: '205px' | |
else | |
$('.dashboard-text').removeClass('expanded').addClass 'collapsed' | |
$('a[class="fa fa-angle-left"]').removeClass('fa-angle-left').addClass('fa-angle-right').css left: '22.5px' | |
$('.profile-arrow').css width:'50px' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import bourbon | |
@import neat | |
#right-part | |
margin: 0 | |
+right-part | |
#container | |
font-family: 'Georgia', serif | |
#background | |
background: $background-color | |
position: fixed | |
width: 100% | |
height: 100% | |
z-index: $background-z-index | |
#content | |
+span-columns(12) | |
display: block | |
max-width: $content-max-width | |
background: $content-background-color | |
padding: $mobile-content-padding | |
min-height: 100% | |
+media($desktop-menu) | |
#right-part | |
margin: $right-part-desktop-margin | |
padding-top: 0 !important | |
width: $right-part-desktop-width | |
#content | |
padding: $content-padding | |
form | |
position: relative | |
&.sending-message | |
color: rgba(black, 0.3) | |
input, textarea, button | |
opacity: 0.3 | |
.field | |
display: block | |
img | |
max-width: 100% | |
.ajax-msg-handler.error | |
input, textarea | |
background-color: rgba(226, 122, 122, 0.32) | |
.waiting-message | |
position: absolute | |
top: 30% | |
left: 0 | |
width: 100% | |
font-size: 30px | |
text-align: center | |
color: rgba(black, 0.6) | |
+media($desktop-menu) | |
top: 50% | |
+transform(translateY(-50%)) | |
font-size: 70px |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def feedback | |
@feedback = Feedback.new(feedback_params) | |
respond_to do |format| | |
if @feedback.valid? | |
if @feedback.need_copy? | |
FeedbackMailer.send_copy(@feedback, @feedback.email).deliver_now | |
end | |
FeedbackMailer.new_feedback_email(@feedback).deliver_now | |
notice = 'Сообщение отправлено' | |
format.html { render action: :contacts, notice: notice } | |
format.js { render json: {status: :ok, message: notice} } | |
else | |
format.html { render action: :contacts } | |
format.js { render json: {status: :error, errors: @feedback.errors} } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment