Refactor contact page

This commit is contained in:
Christine Dodrill 2015-02-03 10:27:15 -08:00
parent e02b084da9
commit c2b5f980d9
4 changed files with 30 additions and 16 deletions

View File

@ -7,7 +7,7 @@ import respond_to from require "lapis.application"
import assert_valid from require "lapis.validate"
class Hire extends lapis.Application
[hire: "/hire"]: respond_to {
[hire: "/contact/email"]: respond_to {
GET: =>
@csrf_token = csrf.generate_token @
return render: true
@ -30,7 +30,7 @@ class Hire extends lapis.Application
body: {
from: "#{@params.name} <siteusernoreply@mailgun.xeserv.us>",
to: "xena@yolo-swag.com",
subject: "I want to hire you!",
subject: "Contact on https://christine.website",
text: "Email from #{@params.name}:\n\n#{@params.message}\n\nPlease reply to #{@params.email}."
}
}

View File

@ -49,9 +49,6 @@ class Layout extends Widget
li ->
a href: "/static/resume/index.html", "Resume"
li ->
a href: "/hire", "Hire Me"
ul class: "nav navbar-nav navbar-right", ->
li ->
a href: "/contact", "Contact"

View File

@ -2,7 +2,7 @@ import Widget from require "lapis.html"
class Index extends Widget
content: =>
link = (imgl, url, name) ->
socialLink = (imgl, url, name) ->
div class: "col-md-4", ->
img src: "/static/img/contact/" .. imgl, height: 250, width: 250
a class: "lead", href: url, name
@ -11,19 +11,38 @@ class Index extends Widget
center ->
h1 "Contact Info"
p class: "lead", ->
text "IRC"
div class: "row", ->
div class: "col-md-6", ->
p class: "lead", "Email"
p "I am on many IRC networks. On Freenode I am using the nick Xe but elsewhere I will use the nick Xena."
div class: "email", ->
text "xena@yolo-swag.com"
p ->
text "My GPG fingerprint is "
code ->
text "2E5C BE74 C16D ED81 6351 E7CE B58E EB12 46DF 6D21"
text ". If you get an email that appears to be from me and the signature does not match that fingerprint, it is not from me."
p ->
text "To email me quickly, please fill out "
a href: "/contact/email", "this form"
text "."
div class: "col-md-6", ->
p class: "lead", ->
text "IRC"
p "I am on many IRC networks. On Freenode I am using the nick Xe but elsewhere I will use the nick Xena."
p class: "lead", ->
text "Social Media"
div class: "row", ->
link "github.png", "http://github.com/Xe", "GitHub"
link "twitter.png", "http://twitter.com/theprincessxena", "Twitter"
link "medium.jpg", "http://medium.com/@theprincessxena", "Medium"
socialLink "github.png", "http://github.com/Xe", "GitHub"
socialLink "twitter.png", "http://twitter.com/theprincessxena", "Twitter"
socialLink "medium.jpg", "http://medium.com/@theprincessxena", "Medium"
div class: "row", ->
link "youtube.png", "http://youtube.com/shadowh511", "YouTube"
link "reddit.png", "http://reddit.com/user/shadowh511", "Reddit"
socialLink "youtube.png", "http://youtube.com/shadowh511", "YouTube"
socialLink "reddit.png", "http://reddit.com/user/shadowh511", "Reddit"

View File

@ -6,8 +6,6 @@ class Hire extends Widget
h1 "Leave Me A Message"
p "This form will send an email to my personal email listing your interest in recruiting me for a job."
div class: "ccd-login-form", ->
form class: "form-signin", method: "POST", action: "/hire", ->
input type: "hidden", name: "csrf_token", value: @csrf_token