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)
 
(added opional changes for border-top and border-bottom)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
<noinclude>
 
<!--------------------------------------------------------->  
 
<!--------------------------------------------------------->  
 
<!--  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 with a Border|border=2px solid}}</nowiki><br>{{ColoredBackground|text=simple example with a border|border=2px solid}}<br>
<onlyinclude><div style="
+
* <nowiki>{{ColoredBackground|text=simple example with a green border|border=3px solid|border-color=#207F4A}}</nowiki><br>{{ColoredBackground|text=simple example with a green border|border=3px solid|border-color=#207F4A}}<br>
background-color: {{#if: {{{background|}}} | {{{background}}} | yellow}}; <!---- 2013=#55DF8E | #default=#558EDF --->
+
* <nowiki>{{ColoredBackground|text=example with green background and green border|background-color=#55DF8E|border=3px solid|border-color=#207F4A}}</nowiki><br>{{ColoredBackground|text=example with green background and green border|background-color=#55DF8E|border=3px solid|border-color=#207F4A}}<br>
 +
* <nowiki>{{ColoredBackground|text=example with green background and green border and white big text|color=white|font-size=180%|background-color=#55DF8E|border=3px solid|border-color=#207F4A}}</nowiki><br>{{ColoredBackground|text=example with green background and green border and white big text|color=white|font-size=180%|background-color=#55DF8E|border=3px solid|border-color=#207F4A}}<br>
 +
* <nowiki>{{ColoredBackground|text=example with green background and green border at the bottom and white big text|color=white|font-size=180%|background-color=#55DF8E|border=3px solid|border-color=#207F4A|border-top=none}}</nowiki><br>{{ColoredBackground|text=example with green background and green border  at the bottom and white big text|color=white|font-size=180%|background-color=#55DF8E|border=3px solid|border-color=#207F4A|border-top=none}}<br>
 +
</noinclude><includeonly><div style="
 +
background-color: {{#if: {{{background-color|}}} | {{{background-color}}} | 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: {{{font-size|}}} | {{{font-size}}} | 100%}};  
padding:          {{#if: {{{padding|}}} | {{{padding}}} | 6px}};
+
padding:          {{#if: {{{padding|}}} | {{{padding}}} | none }};         <!---- Top10: 6px --->
padding-top:      {{#if: {{{top|}}} | {{{top}}} | 8px}};
+
padding-top:      {{#if: {{{padding-top|}}} | {{{padding-top}}} | none }}; <!---- Top10: 8px --->
font-weight:      {{#if: {{{font|}}} | {{{font}}} | bold}};
+
font-weight:      {{#if: {{{font-weight|}}} | {{{font-weight}}} | 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>
+
                  {{#if: {{{border-top|}}} | border-top: {{{border-top}}} }};          <!--- optional change --->
 +
                  {{#if: {{{border-bottom|}}} | border-bottom: {{{border-bottom}}} }}; <!--- optional change --->
 +
margin:          {{#if: {{{margin|}}} | {{{margin}}} | 0}};">{{#if: {{{text|}}} | {{{text}}} | {{#if {{{1|}}} | {{{1}}} | }} }}</div></includeonly>

Latest revision as of 16:13, 7 September 2017

Usage:

Examples

  • {{ColoredBackground|text=simple example}}
    simple example

  • {{ColoredBackground|text=simple example with a Border|border=2px solid}}
    simple example with a border

  • {{ColoredBackground|text=simple example with a green border|border=3px solid|border-color=#207F4A}}
    simple example with a green border

  • {{ColoredBackground|text=example with green background and green border|background-color=#55DF8E|border=3px solid|border-color=#207F4A}}
    example with green background and green border

  • {{ColoredBackground|text=example with green background and green border and white big text|color=white|font-size=180%|background-color=#55DF8E|border=3px solid|border-color=#207F4A}}
    example with green background and green border and white big text

  • {{ColoredBackground|text=example with green background and green border at the bottom and white big text|color=white|font-size=180%|background-color=#55DF8E|border=3px solid|border-color=#207F4A|border-top=none}}
    example with green background and green border at the bottom and white big text