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
(Default: no border) |
(added opional changes for border-top and border-bottom) |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| + | <noinclude> | ||
<!---------------------------------------------------------> | <!---------------------------------------------------------> | ||
<!-- Template:ColoredBackground --> | <!-- Template:ColoredBackground --> | ||
| Line 4: | Line 5: | ||
== '''Usage:''' == | == '''Usage:''' == | ||
=== Examples === | === Examples === | ||
| − | * <nowiki>{{ColoredBackground|text= | + | * <nowiki>{{ColoredBackground|text=simple example}}</nowiki><br>{{ColoredBackground|text=simple example}}<br> |
| − | * <nowiki>{{ColoredBackground|text= | + | * <nowiki>{{ColoredBackground|text=simple example with a Border|border=2px solid}}</nowiki><br>{{ColoredBackground|text=simple example with a border|border=2px solid}}<br> |
| − | * <nowiki>{{ColoredBackground|text= | + | * <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> |
| − | <includeonly><div style=" | + | * <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> |
| − | background-color: {{#if: {{{background|}}} | {{{background}}} | yellow}}; <!---- Top10:2013=#55DF8E, Top10:2010=#558EDF ---> | + | * <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}}} | | + | padding: {{#if: {{{padding|}}} | {{{padding}}} | none }}; <!---- Top10: 6px ---> |
| − | padding-top: {{#if: {{{top|}}} | {{{top}}} | | + | 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}}} | none }} {{#if: {{{border-color|}}} | {{{border-color}}} | black }}; <!--- Top10:2013=#207F4A, Top10:2010=#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}}; | ||
| + | {{#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> | 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