DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:customquoting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tips:customquoting [2009-04-10 02:53] 70.113.8.19tips:customquoting [2011-03-18 06:17] (current) 207.65.119.239
Line 1: Line 1:
 +====== Colored or indented quoting ======
  
 +[[:DokuWiki]] can mark some text by preceding it with one or more ''>'' characters. By default DokuWiki just adds blue bars in front of the quoted text:
 +
 +> This is some quoted text
 +>> here is some more
 +
 +You can change how the quoting looks by changing the stylesheet ''style.css''. Find the following block:
 +
 +<code css>
 +.quote {
 +  border-left: 2px solid #8cacbb;
 +  padding-left: 3px;
 +}
 +</code>
 +
 +
 +Replace it with something you may prefer. E.g. indenting every quote and format the first level red, the second one green and the following ones blue:
 +
 +<code css>
 +.quote {
 +  padding-left: 1em;
 +}
 +div.quote {
 +  color: #cf0000;
 +}
 +div.quote div.quote {
 +  color: #00cf00;
 +}
 +div.quote div.quote div.quote {
 +  color: #0000cf;
 +}
 +</code>
 +
 +===== Updated for new DokuWiki releases =====
 +
 +This does not work in the current (2005-07-13) version. ".quote" has become "blockquote", and as far as I can tell no divs are involved anymore. A quick test shows that this works:
 +
 +<code css>
 +blockquote {
 +  padding-left: 1em;
 +  color: #cf0000;
 +}
 +blockquote blockquote {
 +  color: #00cf00;
 +}
 +blockquote blockquote blockquote {
 +  color: #0000cf;
 +}
 +</code>
 +or, in patch form (Odesign.css -> design.css)
 +<code diff>
 +--- Odesign.css 2005-12-04 18:28:17.359375000 +0200
 ++++ design.css  2005-12-04 18:28:56.265625000 +0200
 +@@ -381,11 +381,19 @@
 + }
 +
 + blockquote {
 +-  border-left: 2px solid #8cacbb;
 +-  padding-left: 3px;
 ++  padding-left: 1em;
 ++  color: #cf0000;
 +   margin-left: 0;
 + }
 +
 ++blockquote blockquote {
 ++  color: #00cf00;
 ++}
 ++
 ++blockquote blockquote blockquote {
 ++  color: #0000cf;
 ++}
 ++
 + /* code blocks by indention */
 + pre.pre {
 +   font-size: 120%;
 +
 +</code>
 +
 +--- //[[robert.meerman@gmail.com|Robert Meerman]] 2005/07/21 16:30//
 +
 +===== Another hack =====
 +
 +The following hack works with the latest (2005-05-07) version of DokuWiki. This change will create the kind of quoting often seen on Internet discussion boards.
 +
 +Find the following section in /tpl/default/design.css
 +
 +<code>
 +blockquote {
 +  border-left: 2px solid #8cacbb;
 +  padding-left: 3px;
 +  margin-left: 0;
 +}
 +</code>
 +
 +I have replaced it with
 +
 +<code>
 +blockquote {
 +  border: 1px dotted #8cacbb;
 +  margin-left: 3em;
 +  margin-right: 3em;
 +  padding: 3px;
 +}
 +</code>
 +---//ta' Lajzar//
 +
 +===== Discussion =====
 +Any chance of some syntax rule being added to DokuWiki, to handle this colored quote? If not, what would be the best steps to take to add a custom syntax rule to a DokuWiki installation? Thanks. -- //[[jose.monteiro@dowedo-it.com | straider]] 31.01.2005 20:14//.
 +
 +I want to have discussion indent like on Wikipedia - every new post is more indent to left. I tried to add margin-left and padding-left to blockquote and nothing worked... thanks for help. And sorry my English:) PhaX

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki