Fixed up some styles for job profile page, and prevented long links from destroying things with poor wrapping.

This commit is contained in:
Nick Winter 2014-04-17 11:34:55 -07:00
parent 40367e701c
commit 46487f55a4
4 changed files with 119 additions and 89 deletions

View file

@ -51,10 +51,14 @@
.job-profile-row
height: 100%
display: table-row
$side-width: 250px
$side-padding: 5px
$middle-width: 524px
$middle-padding: 20px
.full-height-column
height: 100%
padding: 5px
padding: $side-padding
display: table-cell
vertical-align: top
@ -62,16 +66,20 @@
margin: 5px 0 5px 0
.left-column
width: 250px
padding: 5px
width: $side-width - 2 * $side-padding
padding: $side-padding
background-color: rgb(220, 220, 220)
.sub-column
width: $side-width - 2 * $side-padding
overflow-wrap: break-word
.profile-photo-container
position: relative
margin-bottom: 10px
img.profile-photo
width: 240px
width: $side-width - 2 * $side-padding
border-radius: 6px
.profile-caption
@ -100,15 +108,24 @@
font-size: 20px
.middle-column
width: 524px
width: $middle-width - 2 * $middle-padding
padding-left: $middle-padding
padding-right: $middle-padding
background-color: white
padding-left: 20px
padding-right: 20px
.sub-column
width: $middle-width - 2 * $middle-padding
overflow-wrap: break-word
&.double-column
width: 524px + 250px
padding-left: 30px
padding-right: 30px
width: $middle-width + $side-width + 2 * $side-padding - 2 * $middle-padding
$middle-padding-double: 30px
padding-left: $middle-padding-double
padding-right: $middle-padding-double
.sub-column
width: $middle-width + $side-width + 2 * $side-padding - 2 * $middle-padding - 2 * $middle-padding-double
overflow-wrap: break-word
code
background-color: rgb(220, 220, 220)
@ -131,27 +148,34 @@
width: 32px
height: 32px
.experience-entry
margin-bottom: 15px
.duration
margin-left: 10px
margin-bottom: 10px
#job-profile-notes
width: 100%
height: 100px
.right-column
width: 250px
width: $side-width
background-color: rgb(220, 220, 220)
> h3:first-child
background-color: white
padding: 5px 5px
margin: 5px 2px 5px 2px
.sub-column
width: $side-width - 2 * $side-padding
overflow-wrap: break-word
> h3:first-child
background-color: white
padding: 5px 5px
margin: 5px 2px 5px 2px
ul.projects
li
margin-bottom: 10px
padding: 5px 5px
padding: 5px 3px
border: 2px solid rgb(220, 220, 220)
transition: .5s ease-in-out
position: relative

View file

@ -20,80 +20,86 @@ block content
.job-profile-container
.job-profile-row
.left-column.full-height-column
.profile-photo-container
img.profile-photo(src=user.getPhotoURL(240, true))
.profile-caption= profile.jobTitle || 'Software Developer'
if profileLinks.length
ul.links
each link in profileLinks
li(title=profile.name + " on " + link.name, class=link.icon ? "has-icon" : "")
a(href=link.link)
if link.icon
img(src=link.icon.url, alt=link.icon.name)
else
button.btn.btn-large.btn-inverse.flat-button= link.name
div= profile.city + ', ' + profile.country
div= profile.visa
div
span(data-i18n="account_profile.looking_for") Looking for:
| #{profile.lookingFor}
div
span(data-i18n="account_profile.last_updated") Last updated:
| #{moment(profile.updated).fromNow()}
button#contact-candidate.btn.btn-large.btn-inverse.flat-button
span(data-i18n="account_profile.contact") Contact
| #{profile.name.split(' ')[0]}
.sub-column
.profile-photo-container
img.profile-photo(src=user.getPhotoURL(240, true))
.profile-caption= profile.jobTitle || 'Software Developer'
if profileLinks.length
ul.links
each link in profileLinks
li(title=profile.name + " on " + link.name, class=link.icon ? "has-icon" : "")
a(href=link.link)
if link.icon
img(src=link.icon.url, alt=link.icon.name)
else
button.btn.btn-large.btn-inverse.flat-button= link.name
div= profile.city + ', ' + profile.country
div= profile.visa
div
span(data-i18n="account_profile.looking_for") Looking for:
| #{profile.lookingFor}
div
span(data-i18n="account_profile.last_updated") Last updated:
| #{moment(profile.updated).fromNow()}
button#contact-candidate.btn.btn-large.btn-inverse.flat-button
span(data-i18n="account_profile.contact") Contact
| #{profile.name.split(' ')[0]}
.middle-column.full-height-column
h3= profile.name
p= profile.shortDescription
each skill in profile.skills
code= skill
span
div.long-description!= marked(profile.longDescription)
if profile.work.length
h3.experience-header
img.header-icon(src="/images/pages/account/profile/work.png", alt="")
span(data-i18n="account_profile.work_experience") Work Experience
each job in profile.work
div.duration.pull-right= job.duration
| #{job.role} at #{job.employer}
.clearfix
if job.description
div!= marked(job.description)
if profile.education.length
h3.experience-header
img.header-icon(src="/images/pages/account/profile/education.png", alt="")
span(data-i18n="account_profile.education") Education
each school in profile.education
div.duration.pull-right= school.duration
| #{school.degree} at #{school.school}
.clearfix
if user.get('jobProfileNotes') || me.isAdmin()
h3.experience-header(data-i18n="account_profile.our_notes") Our Notes
- var notes = user.get('jobProfileNotes') || '';
if me.isAdmin()
textarea#job-profile-notes!= notes
else
div!= marked(notes)
.sub-column
h3= profile.name
p= profile.shortDescription
each skill in profile.skills
code= skill
span
div.long-description!= marked(profile.longDescription)
if profile.work.length
h3.experience-header
img.header-icon(src="/images/pages/account/profile/work.png", alt="")
span(data-i18n="account_profile.work_experience") Work Experience
each job in profile.work
div.experience-entry
div.duration.pull-right= job.duration
| #{job.role} at #{job.employer}
.clearfix
if job.description
div!= marked(job.description)
if profile.education.length
h3.experience-header
img.header-icon(src="/images/pages/account/profile/education.png", alt="")
span(data-i18n="account_profile.education") Education
each school in profile.education
div.experience-entry
div.duration.pull-right= school.duration
| #{school.degree} at #{school.school}
.clearfix
if user.get('jobProfileNotes') || me.isAdmin()
h3.experience-header(data-i18n="account_profile.our_notes") Our Notes
- var notes = user.get('jobProfileNotes') || '';
if me.isAdmin()
textarea#job-profile-notes!= notes
else
div!= marked(notes)
.right-column.full-height-column
if profile.projects.length
h3(data-i18n="account_profile.projects") Projects
ul.projects
each project in profile.projects
li
a(href=project.link)
.project-image(style="background-image: url(/file/" + project.picture + ")")
p= project.name
div!= marked(project.description)
.sub-column
if profile.projects.length
h3(data-i18n="account_profile.projects") Projects
ul.projects
each project in profile.projects
li
a(href=project.link)
if project.picture
.project-image(style="background-image: url(/file/" + project.picture + ")")
p= project.name
div!= marked(project.description)
else
.public-profile-container

View file

@ -36,7 +36,7 @@ ThangListView = require './thang_list_view'
SpellPaletteView = require './spell_palette_view'
CastButtonView = require './cast_button_view'
window.SHIM_WORKER_PATH = '/javascripts/workers/catiline_worker_shim.coffee'
window.SHIM_WORKER_PATH = '/javascripts/workers/catiline_worker_shim.js'
module.exports = class TomeView extends View
id: 'tome-view'

View file

@ -22,7 +22,7 @@ productionLogging = (tokens, req, res) ->
else if status >= 300 then color = 36
elapsed = (new Date()) - req._startTime
elapsedColor = if elapsed < 500 then 90 else 31
if (status isnt 200 and status isnt 304) or elapsed > 500
if (status isnt 200 and status isnt 304 and status isnt 302) or elapsed > 500
return "\x1b[90m#{req.method} #{req.originalUrl} \x1b[#{color}m#{res.statusCode} \x1b[#{elapsedColor}m#{elapsed}ms\x1b[0m"
null