This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A function to turn the first letter of the main article of your blog into a styled dropcap. | |
See example here: http://jamesabbottdd.com/articles | |
Change the id of the first article to reflect your markup: | |
var main_entry = document.getElementById("main-entry"); | |
...and you're good to go. | |
*/ | |
function addDropCap() { | |
//separate the drop cap | |
var main_entry = document.getElementById("main-entry"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Nesta | |
class App | |
post '/contact' do | |
configure_options | |
Pony.mail( | |
:from => params[:name] + "<" + params[:email] + ">", | |
:to => '[email protected]', | |
:subject => params[:name] + " has contacted you", | |
:body => params[:message] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template: template_index | |
%section | |
%h1 Recent articles | |
%ol.recent-articles | |
- latest_articles(5).each do |article| | |
%li.group | |
%div.half | |
= haml :page_date, :layout => false, :locals => { :page => article } | |
%h1.article-heading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'docverter' | |
Docverter.base_url = 'http://c.docverter.com' | |
File.open("out.pdf", "w+") do |f| | |
f.write(Docverter::Conversion.run do |c| | |
c.from = "markdown" | |
c.to = "pdf" | |
c.add_input_file("input.md") | |
# c.stylesheet = "stylesheet.css" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
This is a heavily modified version of Wilson Miner's Timeline Charts example from | |
A List Apart #256 (http://alistapart.com/article/accessibledatavisualization). Accomodates | |
a list of stacked subvalues within a single bar segment. | |
--> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
This is a heavily modified version of Wilson Miner's Timeline Charts example from | |
A List Apart #256 (http://alistapart.com/article/accessibledatavisualization). Accomodates | |
a list of stacked subvalues within a single bar segment. | |
--> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> |
OlderNewer