homepage redesign
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user