homepage redesign

This commit is contained in:
Lee Lawlor
2014-05-08 20:01:41 -04:00
parent e5570ec3af
commit ac83280b68
57 changed files with 569 additions and 328 deletions

View File

@ -6,7 +6,7 @@ module PagesHelper
# get the blog data
blog_url = "http://community.thingspeak.com"
doc = Nokogiri::HTML(open(blog_url, "User-Agent" => "Ruby/#{RUBY_VERSION}").read)
# parse out the html we need
doc.css("img").remove
doc.css("script").remove
@ -16,7 +16,7 @@ module PagesHelper
if (i < 3)
blog += d.css("h2").to_s
blog += d.css("div.entry").to_s
blog += "<br /><br />"
blog += "<hr>" if i != 2
end
end
end
@ -26,3 +26,4 @@ module PagesHelper
blog
end
end