small improvements and fixes

This commit is contained in:
Torsten Ruger 2016-11-25 23:49:47 +02:00
parent c4a4db119e
commit 0a36ba25e1
10 changed files with 79 additions and 81 deletions

View File

@ -18,7 +18,6 @@ $(document).ready ->
return
$(document).ready ->
### fading alerts ###
jQuery('.flash').delay(5000).fadeOut 'slow'
return
@ -28,12 +27,6 @@ $(document).ready ->
$(this).tooltip( title: content)
return
$(document).ready ->
_headerHeight = jQuery("#header").outerHeight()
_screenHeight = jQuery(window).height() - _headerHeight
jQuery('.fullheight').height _screenHeight
return
$(document).ready ->
allPanels = $('#faq_toggle > .toggle-content').hide()
$('#faq_toggle > label').click ->

View File

@ -1,27 +1,40 @@
@import "susy"
// NAVIGATION & answers
.nav-small
font-size: .7em
font-weight: 600
line-height: 320%
.navbar
background-color: rgb(247, 247, 249)
.nav-small
font-size: .7em
font-weight: 600
line-height: 320%
a.nav-link
color: #55595c
a.nav-link
color: #55595c
a.active.nav-link, a.nav-link hover
font-weight: bold
a.active.nav-link, a.nav-link hover
font-weight: bold
a.nav-link hover
font-weight: bold
a.nav-link hover
font-weight: bold
.nav
a
font-size: 1.3em !important
li
padding-top: 11px
padding-right: 11px
// BODY
body
font-family: "ProximaNova", Arial, Helvetica, sans-serif
-webkit-font-smoothing: antialiased
font-size: 16px
overflow-x: hidden
width: 100vw
padding-top: 80px
.main
padding-bottom: 60px
.alert
margin-bottom: 0px
sup
top: -0.2em
@ -42,6 +55,16 @@ sup
active label
font-weight: bold
.faq
.nav-item
font-size: 1.2rem
font-weight: bolder
.nav-link
color: #727577
.nav-link.active
color: #0275d8 !important
// FOOTER
footer

View File

@ -1,14 +1,3 @@
@import "susy"
.nav
a
font-size: 1.3em !important
li
padding-top: 11px
padding-right: 11px
.main
margin-top: 80px
.centered
text-align: center
@ -215,6 +204,7 @@ h4 , h5 , h6
height: 100% !important
.authform
margin-top: 60px
margin-left: 30%
margin-right: 30%
max-width: 40%

View File

@ -2,8 +2,6 @@ class AppliesController < ApplicationController
before_action :authenticate_user!
before_action :set_apply, only: [:show , :create , :cancel ]
# GET /applies/1
# GET /applies/1.json
def show
render @apply.new_record? ? :edit : :show
end
@ -24,7 +22,7 @@ class AppliesController < ApplicationController
def cancel
ApplyMailer.cancel( @apply , params[:reason]).deliver_later
@apply.delete
path = params[:reason].blank? ? edit_user_registration_path : resume_path
path = params[:reason].blank? ? edit_user_registration_path : application_path
redirect_to path , alert: 'Application was canceled.'
end

View File

@ -1,6 +1,6 @@
class ResumesController < ApplicationController
before_action :authenticate_user!
before_action :set_resume, only: [:show, :edit, :update , :progress ]
before_action :set_resume, only: [:show, :update , :progress ]
def show
end
@ -9,7 +9,6 @@ class ResumesController < ApplicationController
render layout: false
end
# PATCH/PUT /resumes/1.json
def update
respond_to do |format|
if @resume.update(resume_params)
@ -30,7 +29,7 @@ class ResumesController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def resume_params
params.require(:resume).permit(:street, :city, :country, :user_id ,
params.require(:resume).permit(:street, :city, :country, :user_id , :finance ,
:school, :uni, :internship, :work, :tech_skills,
:soft_skills, :projects, :other, :interests, :motivation)
end

View File

@ -6,7 +6,7 @@ module ResumesHelper
def percent
fields = [:school, :uni, :internship, :work, :projects, :tech_skills, :soft_skills,
:interests, :motivation, :finance, :other, :street, :city, :country]
total = fields.length - 1
total = fields.length
filled = fields.collect{|f| @resume.send(f).blank? ? 0 : 1 }.sum * 100
"#{filled/total}%"
end

View File

@ -1,23 +1,21 @@
.section
.container
.spacer-big
.authform.margin-bottom-30
= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :role => 'form'}) do |f|
%h3 Sign in
= devise_error_messages!
.form-group
= f.label :email
- if devise_mapping.registerable?
(
= link_to 'Sign up', new_registration_path(resource_name), class: 'right'
if you haven't yet )
= f.email_field :email, :autofocus => true, class: 'form-control'
.form-group
= f.label :password
- if devise_mapping.recoverable?
(
= link_to "Forgot password?", new_password_path(resource_name), class: 'right'
)
= f.password_field :password, class: 'form-control'
= f.submit 'Sign in', :class => 'btn btn-success'
= link_to 'Resend confirmation', new_user_confirmation_path
.container
.authform.margin-bottom-30
= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :role => 'form'}) do |f|
%h3 Sign in
= devise_error_messages!
.form-group
= f.label :email
- if devise_mapping.registerable?
(
= link_to 'Sign up', new_registration_path(resource_name), class: 'right'
if you haven't yet )
= f.email_field :email, :autofocus => true, class: 'form-control'
.form-group
= f.label :password
- if devise_mapping.recoverable?
(
= link_to "Forgot password?", new_password_path(resource_name), class: 'right'
)
= f.password_field :password, class: 'form-control'
= f.submit 'Sign in', :class => 'btn btn-success'
= link_to 'Resend confirmation', new_user_confirmation_path

View File

@ -1,6 +1,4 @@
-# Rails flash messages styled for Bootstrap 3.0
- flash.each do |name, msg|
- if msg.is_a?(String)
%div{:class => "flash alert alert-#{name.to_s == 'notice' ? 'success' : 'danger'}"}
%button.close{"aria-hidden" => "true", "data-dismiss" => "alert", :type => "button"} &times;
= content_tag :div, msg, :id => "flash_#{name}"
%div{:class => "flash alert alert-#{name.to_s == 'notice' ? 'success' : 'danger'}"}
%button.close{"aria-hidden" => "true", "data-dismiss" => "alert", :type => "button"} &times;
.message{id: "flash_#{name}"}= msg

View File

@ -17,7 +17,7 @@
.topic
%h3 Languages
%ul.list-unstyled
%li.icon-angle-right Ruby, Javascript
%li.icon-angle-right Ruby, JavaScript
%li.icon-angle-right Html, Haml
%li.icon-angle-right Css, Sass
.topic

View File

@ -1,13 +1,13 @@
- if percent == "100%"
- if current_user.application
.callout.alert.alert-default.margin-top-50.margin-bottom-50
.row
.col-md-8.col-sm-8
%br
%p
%h4
Your Application has been submitted, see it
= link_to "here" , application_path
- else
.callout.alert.alert-default.margin-top-60.margin-bottom-60
.callout.alert.alert-default.margin-top-50.margin-bottom-50
.row
.col-md-8.col-sm-8
%h4
@ -15,14 +15,13 @@
.col-md-4.col-sm-4.text-right
= link_to "APPLY" , application_path , class: "btn btn-primary"
- else
.row
.col-md-8.col-sm-8
%br
Tell us about yourself and why you want to become a developer.
%br
Click on the fields to edit.
While editing, clicking outside the box cancels.
%br
.progress
.progress-bar.progress-bar-primary{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "60", :role => "progressbar", :style => "width: #{percent}; min-width: 2em;"}
=percent
%h4.margin-top-50
Tell us about yourself and why you want to become a developer.
%p
Click on the fields to edit.
While editing, clicking outside the box cancels.
.progress
.progress-bar.progress-bar-primary{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "60", :role => "progressbar", :style => "width: #{percent}; min-width: 2em;"}
=percent