]> oss.titaniummirror.com Git - oss-web.git/commitdiff
Add pull quote macro
authorR. Steve McKown <rsmckown@gmail.com>
Mon, 13 Aug 2012 03:43:26 +0000 (21:43 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Tue, 28 Aug 2012 17:25:01 +0000 (11:25 -0600)
To use:

[[!pquote text="This is the text of the pull quote"]]

in/style/default.css
in/style/pquote.gif [new file with mode: 0644]
in/webber.conf
plugins/pquote.py [new file with mode: 0644]

index a1434292292c43ed03dc3c7b64d83062e9ec585c..204210ad1cce1c73e82f569da19832cc4e983895 100644 (file)
@@ -670,3 +670,24 @@ hr {
        font-style: normal;\r
        font-weight: bold;\r
 }\r
+\r
+/* =============================================\r
+  Pull Quotes (pquote)\r
+================================================ */\r
+\r
+.pquote {\r
+       float: right;\r
+       width: 8em;\r
+       background: url(pquote.gif) top left no-repeat;\r
+       color: #030;\r
+       font-size: 2em;\r
+       line-height: 0.9;\r
+       font-style: italic;\r
+       padding: 0.5em;\r
+       margin: 0;\r
+}\r
+\r
+.pquote p:first-letter {\r
+       font-size: 1.5em;\r
+       font-weight: bold;\r
+}\r
diff --git a/in/style/pquote.gif b/in/style/pquote.gif
new file mode 100644 (file)
index 0000000..1a573e5
Binary files /dev/null and b/in/style/pquote.gif differ
index c0eba32457d04204a0200b4b254e5d3089c696db..d02eaf20b25ec94a1135c7044343b823db6530fb 100644 (file)
@@ -5,6 +5,7 @@ date_format: "%Y-%m-%d %H:%M:%S"
 input_encoding: "iso-8859-1"
 output_encoding: "iso-8859-1"
 plugins: [
+       "pquote",
        "skeleton",
        "hierarchy",
        "link",
diff --git a/plugins/pquote.py b/plugins/pquote.py
new file mode 100644 (file)
index 0000000..ffbf978
--- /dev/null
@@ -0,0 +1,8 @@
+# -*- coding: iso-8859-1 -*-
+from webber import *
+
+@set_macro("pquote")
+def pquote_macro(params):
+       if cfg.test_verbose:
+               print "in macro skeleton.pull_quote_macro, params:", params
+       return "<blockquote class=\"pquote\"><p>" + params['text'] + "</p></blockquote>"