From 8897083cf7b90c0f8e08d0b0932eed2c3baf9684 Mon Sep 17 00:00:00 2001 From: strand Date: Tue, 11 Oct 2011 15:59:25 -0700 Subject: Implemented pullquoteleft functionality --- plugins/pullquote.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/pullquote.rb b/plugins/pullquote.rb index 03e307a7..6d175e83 100644 --- a/plugins/pullquote.rb +++ b/plugins/pullquote.rb @@ -1,10 +1,10 @@ # # Author: Brandon Mathis -# Based on the sematic pullquote technique by Maykel Loomans at http://miekd.com/articles/pull-quotes-with-html5-and-css/ +# Based on the semantic pullquote technique by Maykel Loomans at http://miekd.com/articles/pull-quotes-with-html5-and-css/ # # Outputs a span with a data-pullquote attribute set from the marked pullquote. Example: # -# {% pullquote %} +# {% pullquote %} # When writing longform posts, I find it helpful to include pullquotes, which help those scanning a post discern whether or not a post is helpful. # It is important to note, {" pullquotes are merely visual in presentation and should not appear twice in the text. "} That is why it is prefered # to use a CSS only technique for styling pullquotes. @@ -17,11 +17,13 @@ # #

# +# Strand's modification adds the ability to call this plugin with {% pullquote align:left %} which duplicates the current behavior of the pullquote plugin, with a left float and appropriate margins. module Jekyll class PullquoteTag < Liquid::Block def initialize(tag_name, markup, tokens) + markup =~ /align:left/i ? @align = "left" : @align = "" super end @@ -29,7 +31,7 @@ module Jekyll output = super if output.join =~ /\{"\s*(.+)\s*"\}/ @quote = $1 - "#{output.join.gsub(/\{"\s*|\s*"\}/, '')}" + "#{output.join.gsub(/\{"\s*|\s*"\}/, '')}" # TODO Determine how to makethis span have a left or right flag. else return "Surround your pullquote like this {\" text to be quoted \"}" end -- cgit v1.2.1 From cae964e87513a5afc9763a83c21bbe59159d4acb Mon Sep 17 00:00:00 2001 From: B Strand Date: Wed, 12 Oct 2011 11:14:07 -0700 Subject: Updated pullquote.rb to use a vernacular similar to the image tag. --- plugins/pullquote.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/pullquote.rb b/plugins/pullquote.rb index 6d175e83..5dd6a553 100644 --- a/plugins/pullquote.rb +++ b/plugins/pullquote.rb @@ -17,13 +17,14 @@ # #

# -# Strand's modification adds the ability to call this plugin with {% pullquote align:left %} which duplicates the current behavior of the pullquote plugin, with a left float and appropriate margins. +# Strand's modification adds the ability to call this plugin with {% pullquote left %} which duplicates the current behavior of the pullquote plugin, with a left float and appropriate margins. +# Note: this version of the plugin now creates pullquotes with the class of pullquote-right by default module Jekyll class PullquoteTag < Liquid::Block def initialize(tag_name, markup, tokens) - markup =~ /align:left/i ? @align = "left" : @align = "" + markup =~ /left/i ? @align = "left" : @align = "right" super end @@ -31,7 +32,7 @@ module Jekyll output = super if output.join =~ /\{"\s*(.+)\s*"\}/ @quote = $1 - "#{output.join.gsub(/\{"\s*|\s*"\}/, '')}" # TODO Determine how to makethis span have a left or right flag. + "#{output.join.gsub(/\{"\s*|\s*"\}/, '')}" # TODO Determine how to makethis span have a left or right flag. else return "Surround your pullquote like this {\" text to be quoted \"}" end -- cgit v1.2.1 From f6fb11a37571b48844c488bc351dd78747ee99bd Mon Sep 17 00:00:00 2001 From: B Strand Date: Wed, 12 Oct 2011 13:25:51 -0700 Subject: Added class='citation' to blockquotes generated by the blockquote plugin to differentiate their style from the style of an html or markdown blockquote. --- plugins/blockquote.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/blockquote.rb b/plugins/blockquote.rb index a0bf12cc..f4f57da3 100644 --- a/plugins/blockquote.rb +++ b/plugins/blockquote.rb @@ -71,7 +71,7 @@ module Jekyll else "#{quote}
#{author}
" end - "
#{blockquote}
" + "
#{blockquote}
" end def paragraphize(input) -- cgit v1.2.1 From d983e3eb31cc80406a28ab566f78e52b90c56e93 Mon Sep 17 00:00:00 2001 From: B Strand Date: Thu, 13 Oct 2011 11:30:25 -0700 Subject: Reverted previous commit to separate that change to a different pull request. --- plugins/blockquote.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/blockquote.rb b/plugins/blockquote.rb index f4f57da3..a0bf12cc 100644 --- a/plugins/blockquote.rb +++ b/plugins/blockquote.rb @@ -71,7 +71,7 @@ module Jekyll else "#{quote}
#{author}
" end - "
#{blockquote}
" + "
#{blockquote}
" end def paragraphize(input) -- cgit v1.2.1