Skip to content

Commit

Permalink
Everything is pretty, and there are no unmatched tags. Woo. Pony is i…
Browse files Browse the repository at this point in the history
…nstalled and so the contact form should work soon.
  • Loading branch information
chadoh committed Apr 19, 2010
1 parent 96b3f81 commit 3807b5b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 25 deletions.
6 changes: 1 addition & 5 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
make "current_tab_if" helper work with arrays

fix bad markup being created by markdown/textile (unmatched closing </p>s!)

make contact form functional (install pony successfully)
make contact form functional (configure mail function (pony? ssmtp?))

Use blogger data api to reproduce blogger content natively

Expand Down
23 changes: 12 additions & 11 deletions controls.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'sinatra'
require 'haml'
require 'sass'
#require 'pony'
require 'pony'

set :sass, { :style => :compact }
set :haml, { :ugly => true }
Expand All @@ -13,16 +13,19 @@
end

helpers do
#Helper function to add class="current" to the active tab
#Allows passing in either a simple string with the route name
#to flag on,
#or an array of strings if multiple states receive a flag
def current_tab_if(route)
flag = ""
#if route.length > 1
# for x in route
# flag = route.length
#flag = "current" if request.path_info == route[x]
# end
#else
if route.respond_to? :each
for x in route
flag = "current" if request.path_info == x
end
else
flag = "current" if request.path_info == route
#end
end
flag
end
end
Expand All @@ -44,10 +47,8 @@ def current_tab_if(route)
end

post "/contact" do
if false
Pony.mail :to => "chad.ostrowski@gmail.com",
:from => '"' + params[:name] + '" <' + params[:email] + '>',
:from => params[:email],
:subject => "Email submitted on Lisli.net",
:message => params[:message]
end
end
Binary file added public/images/books-737655.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions views/language_assistance.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
.post-body
%div
%div(style="clear:both;")
%a(href="/images/books-737655.JPG")
%img(style="cursor: pointer; width: 400px; height: 327px;" src="/images/books-737655.JPG" alt="Tools (books) of the trade")
%a(href="/images/books-737655.png")
%img(style="cursor: pointer; width: 400px; height: 327px;" src="/images/books-737655.png" alt="Tools (books) of the trade")
%br
%br
%p
:markdown
What is language assistance? Do you have trouble remembering when to use an apostrophe? Know the difference between an n-dash and m-dash? What about the difference between a colon and a semicolon? How are your spelling and consistency? Do you really have time to learn how to be a meticulous grammar snob? Probably not. That’s where language assistance comes in.
%p
With degrees in English and Spanish, an eye for detail, and a variety of writing, copy editing, proofreading, and translation (English-Spanish) experience, I would love to assist you in tailoring your language (on fliers, brochures, Web sites, newsletters, and the like) into tight, professionally written copy. Fret no longer about misplaced punctuation, misspellings, and poor word choice, because you have found someone to help!
9 changes: 4 additions & 5 deletions views/thoughts.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
%h2 Thoughts
%p
:markdown
So I want to [embed a wave](http://code.google.com/apis/wave/embed/guide.html) in this here page.
:markdown
So I want to [embed a wave](http://code.google.com/apis/wave/embed/guide.html) in this here page.

Doesn't seem very complicated, I agree. But! I need scripts on _this_ page that the other pages on the site don't have. These need to go in the &lt;head&gt;. But I insist that I shall only have one layout. And I don't want to clutter it up with logic.
Doesn't seem very complicated, I agree. But! I need scripts on _this_ page that the other pages on the site don't have. These need to go in the &lt;head&gt;. But I insist that I shall only have one layout. And I don't want to clutter it up with logic.

At this point I'm thinking the best way to do this would be with helper functions? I'll create separate branches for each approach.
At this point I'm thinking the best way to do this would be with helper functions? I'll create separate branches for each approach.

0 comments on commit 3807b5b

Please sign in to comment.