mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-11-15 13:45:00 -05:00
Merge branch 'master' of https://github.com/strand/octopress into strand/octopress
This commit is contained in:
commit
2dedad6176
@ -115,7 +115,7 @@ blockquote {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.has-pullquote:before {
|
.pullquote-right:before, .pullquote-left:before {
|
||||||
/* Reset metrics. */
|
/* Reset metrics. */
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
@ -134,6 +134,15 @@ blockquote {
|
|||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
line-height: 1.45em;
|
line-height: 1.45em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pullquote-left:before {
|
||||||
|
|
||||||
|
/* Make left pullquotes align properly. */
|
||||||
|
float: left;
|
||||||
|
margin: .5em 1.5em 1em 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* @extend this to force long lines of continuous text to wrap */
|
/* @extend this to force long lines of continuous text to wrap */
|
||||||
.force-wrap {
|
.force-wrap {
|
||||||
white-space: -moz-pre-wrap;
|
white-space: -moz-pre-wrap;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Author: Brandon Mathis
|
# 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:
|
# Outputs a span with a data-pullquote attribute set from the marked pullquote. Example:
|
||||||
#
|
#
|
||||||
@ -17,11 +17,14 @@
|
|||||||
# </span>
|
# </span>
|
||||||
# </p>
|
# </p>
|
||||||
#
|
#
|
||||||
|
# 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
|
module Jekyll
|
||||||
|
|
||||||
class PullquoteTag < Liquid::Block
|
class PullquoteTag < Liquid::Block
|
||||||
def initialize(tag_name, markup, tokens)
|
def initialize(tag_name, markup, tokens)
|
||||||
|
markup =~ /left/i ? @align = "left" : @align = "right"
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -29,7 +32,7 @@ module Jekyll
|
|||||||
output = super
|
output = super
|
||||||
if output.join =~ /\{"\s*(.+)\s*"\}/
|
if output.join =~ /\{"\s*(.+)\s*"\}/
|
||||||
@quote = $1
|
@quote = $1
|
||||||
"<span class='has-pullquote' data-pullquote='#{@quote}'>#{output.join.gsub(/\{"\s*|\s*"\}/, '')}</span>"
|
"<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
|
else
|
||||||
return "Surround your pullquote like this {\" text to be quoted \"}"
|
return "Surround your pullquote like this {\" text to be quoted \"}"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user