diff options
author | B Strand <jet.strand@gmail.com> | 2011-10-12 11:14:07 -0700 |
---|---|---|
committer | B Strand <jet.strand@gmail.com> | 2011-10-12 11:14:07 -0700 |
commit | cae964e87513a5afc9763a83c21bbe59159d4acb (patch) | |
tree | bdba6310c34b22be66a59ec1a47718e1055bba7b /plugins | |
parent | ce6604a15e61c1bf931b2d094c5cf30804414fa6 (diff) | |
download | my_new_personal_website-cae964e87513a5afc9763a83c21bbe59159d4acb.tar.xz my_new_personal_website-cae964e87513a5afc9763a83c21bbe59159d4acb.zip |
Updated pullquote.rb to use a vernacular similar to the image tag.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/pullquote.rb | 7 |
1 files changed, 4 insertions, 3 deletions
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 @@ # </span> # </p> # -# 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 - "<span class='has-pullquote#{@align}' data-pullquote='#{@quote}'>#{output.join.gsub(/\{"\s*|\s*"\}/, '')}</span>" # TODO Determine how to makethis span have a left or right flag. + "<span class='pullquote-#{@align}' data-pullquote='#{@quote}'>#{output.join.gsub(/\{"\s*|\s*"\}/, '')}</span>" # TODO Determine how to makethis span have a left or right flag. else return "Surround your pullquote like this {\" text to be quoted \"}" end |