This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Difference between revisions of "Template:ColoredBackground"

From OWASP
Jump to: navigation, search
(Initial Version)
 
(Default: no border)
Line 2: Line 2:
 
<!--  Template:ColoredBackground                        -->
 
<!--  Template:ColoredBackground                        -->
 
<!--------------------------------------------------------->
 
<!--------------------------------------------------------->
=== '''Usage:''' ===
+
== '''Usage:''' ==
# Examples  
+
=== Examples ===
#* <nowiki>{{ColoredBackground|text=Simple Example}}</nowiki><br>{{ColoredBackground|text=Simple Example}}
+
* <nowiki>{{ColoredBackground|text=Simple Example}}</nowiki><br>{{ColoredBackground|text=Simple Example}}<br>
 
+
* <nowiki>{{ColoredBackground|text=Simple Example|border=3px solid}}</nowiki><br>{{ColoredBackground|text=Simple Example with a Border|border=3px solid}}<br>
<onlyinclude><div style="
+
* <nowiki>{{ColoredBackground|text=Simple Example|border=3px solid|border-color=#207F4A}}</nowiki><br>{{ColoredBackground|text=Simple Example with a green Border|border=3px solid|border-color=#207F4A}}
background-color: {{#if: {{{background|}}} | {{{background}}} | yellow}}; <!---- 2013=#55DF8E | #default=#558EDF --->
+
<includeonly><div style="
 +
background-color: {{#if: {{{background|}}} | {{{background}}} | yellow}}; <!---- Top10:2013=#55DF8E, Top10:2010=#558EDF --->
 
color:            {{#if: {{{color|}}} | {{{color}}} | black}};  
 
color:            {{#if: {{{color|}}} | {{{color}}} | black}};  
 
font-size:        {{#if: {{{size|}}} | {{{size}}} | 100%}};  
 
font-size:        {{#if: {{{size|}}} | {{{size}}} | 100%}};  
Line 13: Line 14:
 
padding-top:      {{#if: {{{top|}}} | {{{top}}} | 8px}};
 
padding-top:      {{#if: {{{top|}}} | {{{top}}} | 8px}};
 
font-weight:      {{#if: {{{font|}}} | {{{font}}} | bold}};
 
font-weight:      {{#if: {{{font|}}} | {{{font}}} | bold}};
border:          {{#if: {{{border|}}} | {{{border}}} | 3px solid}} {{#if: {{{border_color|}}} | {{{border_color}}} | #207F4A}}; <!--- 2013=#207F4A | #default=#204A7F --->
+
border:          {{#if: {{{border|}}} | {{{border}}} | none }} {{#if: {{{border-color|}}} | {{{border-color}}} | black }}; <!--- Top10:2013=#207F4A, Top10:2010=#204A7F --->
border-right:    {{#if: {{{border_right|}}} | {{{border_right}}} | none}};
+
border-right:    {{#if: {{{border-right|}}} | {{{border-right}}} | none}};
border-left:      {{#if: {{{border_left|}}} | {{{border_left}}} | none}};
+
border-left:      {{#if: {{{border-left|}}} | {{{border-left}}} | none}};
margin:          {{#if: {{{margin|}}} | {{{margin}}} | 0}};">{{#if: {{{text|}}} | {{{text}}} | {{#if {{{1|}}} | {{{1}}} | }} }}</div></onlyinclude>
+
margin:          {{#if: {{{margin|}}} | {{{margin}}} | 0}};">{{#if: {{{text|}}} | {{{text}}} | {{#if {{{1|}}} | {{{1}}} | }} }}</div></includeonly>

Revision as of 15:36, 7 September 2017

Usage:

Examples

  • {{ColoredBackground|text=Simple Example}}
    Simple Example

  • {{ColoredBackground|text=Simple Example|border=3px solid}}
    Simple Example with a Border

  • {{ColoredBackground|text=Simple Example|border=3px solid|border-color=#207F4A}}
    Simple Example with a green Border