Difference between revisions of "Template:Quote box"

From Eat Every Plant
Jump to navigation Jump to search
m (1 revision)
 
m (1 revision: Arctium)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="quotebox {{{class|}}}" style="
+
<div class="quotebox pullquote {{#switch: {{lc:{{{align|}}}}}  
    {{#switch: {{lc:{{{align|}}}}}  
+
         | center = centered
         | center = margin: auto;
+
         | left = floatleft
         | left = float: left; clear: left; margin: 0.5em 1.4em 0.8em 0;
 
 
         | none =  
 
         | none =  
         | float: right; clear: right; margin: 0.5em 0 0.8em 1.4em;
+
         | floatright
     }}  
+
     }} {{{class|}}}" style="
 
     {{#if:{{{width|}}} |width:{{{width}}};}}  
 
     {{#if:{{{width|}}} |width:{{{width}}};}}  
     padding: 10px;
+
     {{#ifeq:{{{border}}}|none|border:none;|{{#if:{{{border|}}}|border-width: {{{border}}}}};}}
    border: {{#if: {{{border|}}}|{{{border}}}|1px}} solid #aaa;  
+
     {{#if:{{{fontsize|}}}|font-size: {{{fontsize}}};}}  
     font-size: {{#if: {{{fontsize|}}}|{{{fontsize}}}|88%}};
+
     {{#if:{{{bgcolor|}}}|background-color: {{#ifeq:{{{bgcolor|}}}|none|transparent|{{{bgcolor}}}}};}}
     {{#if: {{{bgcolor|}}}|background-color: {{{bgcolor}}}|background-color: #F9F9F9}};  
+
     {{{style|}}}"><templatestyles src="Template:Quote_box/styles.css" />
     {{{style|}}}">
 
 
{{#if:{{{title|}}}
 
{{#if:{{{title|}}}
     |<div class="{{{tclass|}}}" style="
+
     |<div class="quotebox-title {{{tclass|}}}" style="
         {{#if: {{{title_bg|}}}|background-color: {{{title_bg}}}|{{#if: {{{bgcolor|}}}|background-color: {{{bgcolor}}}|background-color: #F9F9F9}}}};  
+
         {{#if:{{{title_bg|{{{bgcolor|}}}}}}|background-color: {{#ifeq:{{{title_bg|{{{bgcolor}}}}}}|none|transparent|{{{title_bg|{{{bgcolor}}}}}}}};}}
         {{#if: {{{title_fnt|}}}|color: {{{title_fnt}}}|color: black}};
+
         {{#if:{{{title_fnt|}}}|color: {{{title_fnt}}};}}
        text-align: center;
 
        font-size: larger;
 
        font-weight: bold;
 
 
         {{{tstyle|}}}">{{{title}}}</div>  
 
         {{{tstyle|}}}">{{{title}}}</div>  
 
}}
 
}}
<div class="{{{qclass|}}}" style="
+
<div class="quotebox-quote {{#if:{{{quoted|}}}|quoted}} {{#switch: {{lc:{{{qalign|{{{halign|left}}}}}}}}
    position: relative;
+
        |right = right-aligned
    text-align: {{#if: {{{qalign|}}}|{{{qalign}}}|{{#if: {{{halign|}}}|{{{halign|}}}|left}}}};
+
        |center = center-aligned
     {{{qstyle|}}}">
+
        |left-aligned
<div {{#if:{{{quoted|}}}|style="margin:0px 2em;"}}><!--
+
     }} {{{qclass|}}}" style="
 +
    {{{qstyle|}}}"><!--
 
-->{{{text|{{{content|{{{quotetext|{{{quote|{{{1|<includeonly>{{error|Error: No text given for quotation (or equals sign used in the actual argument to an unnamed parameter)}}</includeonly><noinclude>{{lorem ipsum}}</noinclude>}}}}}}}}}}}}}}}<!--
 
-->{{{text|{{{content|{{{quotetext|{{{quote|{{{1|<includeonly>{{error|Error: No text given for quotation (or equals sign used in the actual argument to an unnamed parameter)}}</includeonly><noinclude>{{lorem ipsum}}</noinclude>}}}}}}}}}}}}}}}<!--
 
--></div>
 
--></div>
{{#if:{{{quoted|}}}
+
{{#if:{{{author|{{{source|}}}}}}{{{2|}}}{{{3|}}}|<cite class="{{#switch: {{lc:{{{salign|{{{qalign|{{{halign|left}}} }}} }}} }}
    |<div style="
+
        |right = right-aligned
        position: absolute;
+
        |center = center-aligned
        left: 0px;  top: 0px;
+
        |left-aligned
        text-align: left;
+
    }}" style="{{{sstyle|}}}"><!--Manually inserted dashes will need to be removed from uses of the template first, I guess, then enable this:--><!--—&thinsp;-->{{{author|{{{2|}}}}}}{{#if:{{{author|}}}{{{2|}}}|{{#if:{{{source|}}}{{{3|}}}|<!--Display comma-space only if both cite parameters are present.-->,&#32;}}}}{{{source|{{{3|}}}}}}</cite>}}
        font-family:'Times New Roman',serif;
 
        font-weight:bold;
 
        font-size: large;
 
        color: gray;">“</div>
 
<div style="
 
        position: absolute;
 
        right: 0px; bottom: 0px;
 
        text-align: left;
 
        font-family:'Times New Roman',serif;
 
        font-weight:bold;
 
        font-size: large;
 
        color: gray;">”</div>
 
}}</div>{{#if:{{{author|{{{source|}}}}}}{{{2|}}}{{{3|}}}|
 
<cite style="
 
    display: block;
 
    text-align: {{ifempty|{{{salign|}}}|{{{qalign|}}}|{{{halign|}}}|left}};
 
    {{{sstyle|}}}"><!--Manually inserted dashes will need to be removed from uses of the template first, I guess, then enable this:--><!--—&thinsp;-->{{{author|{{{2|}}}}}}{{#if:{{{author|}}}{{{2|}}}|{{#if:{{{source|}}}{{{3|}}}|<!--Display comma-space only if both cite parameters are present.-->,&#32;}}}}{{{source|{{{3|}}}}}}</cite>}}
 
 
</div><noinclude>
 
</div><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 18:06, 20 August 2018

<templatestyles src="Template:Quote_box/styles.css" />
Template documentation[create]