Template:Box top: Difference between revisions
m (fixes) |
m (+margin-bottom:5px) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<div style="background-color: {{#if: {{{body background color|}}} | {{{body background color}}} | #f0f0f0}}; border:1px solid {{#if: {{{border color|}}} | {{{border color}}} | #b0b0b0}}; border-radius: 13px; clear: both; color: #000; padding: 9px 10px 2px;"> | <div style="background-color: {{#if: {{{body background color|}}} | {{{body background color}}} | #f0f0f0}}; border:1px solid {{#if: {{{border color|}}} | {{{border color}}} | #b0b0b0}}; border-radius: 13px; clear: both; color: #000; margin-bottom: 5px; padding: 9px 10px 2px;"> | ||
<div style="{{#if: {{{title background color|}}} | background-color: {{{title background color}}} | border-bottom: 1px dotted #c0c0c0}}; border-top-left-radius: 10px; border-top-right-radius: 10px; color: {{#if: {{{title color|}}} | {{{title color}}} | #000000}}; font-weight: bold; margin: -6px -7px 0px -7px; padding: 4px 6px;">{{{title}}}<!-- | <div style="{{#if: {{{title background color|}}} | background-color: {{{title background color}}} | border-bottom: 1px dotted #c0c0c0}}; border-top-left-radius: 10px; border-top-right-radius: 10px; color: {{#if: {{{title color|}}} | {{{title color}}} | #000000}}; font-weight: bold; margin: -6px -7px 0px -7px; padding: 4px 6px;">{{{title}}}<!-- | ||
--><div class="plainlinks" <!-- EDIT AND VIEW LINKS START | --><div class="plainlinks" <!-- EDIT AND VIEW LINKS START | ||
Line 6: | Line 6: | ||
-->font-size: 80%;<!-- | -->font-size: 80%;<!-- | ||
--> color: {{{title color}}}">{{#if: {{{page to edit|}}} | [{{fullurl:{{{page to edit|/}}}|action=edit{{#if: {{{section number|}}} |§ion={{{section number}}}}}}} <span style="color: {{{title color|#000}}}">edit</span>] }}{{#if: {{{page to edit|}}} |'''·''' [[:{{{page to edit}}}|<span style="color: {{{title color|#000}}}">view</span>]] }}</div><!-- EDIT AND VIEW LINKS END | --> color: {{{title color}}}">{{#if: {{{page to edit|}}} | [{{fullurl:{{{page to edit|/}}}|action=edit{{#if: {{{section number|}}} |§ion={{{section number}}}}}}} <span style="color: {{{title color|#000}}}">edit</span>] }}{{#if: {{{page to edit|}}} |'''·''' [[:{{{page to edit}}}|<span style="color: {{{title color|#000}}}">view</span>]] }}</div><!-- EDIT AND VIEW LINKS END | ||
--> | --> | ||
</div> | </div> | ||
<noinclude></div> | <noinclude></div> | ||
== How to use == | == How to use == | ||
This template is to be used in conjunction with [[:Template:Box bottom]]. The text you want to encapsulate in this box should be sandwiched between the two templates, like so: | This template is to be used in conjunction with [[:Template:Box bottom]]. The text you want to encapsulate in this box should be sandwiched between the two templates, like so: | ||
; Copy code shown below and paste it into your article. | |||
<pre>{{ box top | <pre>{{ box top | ||
| page to edit = | | page to edit = | ||
Line 20: | Line 22: | ||
| border color = | | border color = | ||
}} | }} | ||
<!-- Insert your text here. --> | |||
{{ box bottom }}</pre> | |||
; EXAMPLE | |||
<pre>{{ box top | |||
| page to edit = Represent The People#The_Abuser.2C_The_Abused.2C_And_You | |||
| section number =9 | |||
| title = You're no good. | |||
| title color = #000000 | |||
| title background color = #c0c0c0 | |||
| body background color = #f0f0f0 | |||
| border color = #b0b0b0 | |||
}} | |||
[[Represent The People#The_Abuser.2C_The_Abused.2C_And_You|The Abuser, The Abused, And You]] | |||
{{ box bottom }}</pre> | {{ box bottom }}</pre> | ||
=== page to edit === | === page to edit === | ||
The title of the current page. | The title of the current page. | ||
:Example, if | :Example, if you want this template is refer to the [[Represent The People#The_Abuser.2C_The_Abused.2C_And_You|The Abuser, The Abused, And You]] section of an article called [[Represent The People]], format your link like this: | ||
:''' | :'''Represent The People#The_Abuser.2C_The_Abused.2C_And_You''' | ||
:: '''NOTE''': Everything to the right of the hashtag (#) -- ''including the hashtag itself'' -- must be written in the ''exact'' format of that portion of the article's URL. | |||
=== section number === | === section number === | ||
This refers to the section of the article you want the "edit" link on this template to refer to. You must use the section number shown in the URL of the article / section's edit field. | |||
:Example, for the URL <nowiki>http://www.portlandwiki.org/index.php?title=Represent_The_People&action=edit§ion= | :Example, for the URL <nowiki>http://www.portlandwiki.org/index.php?title=Represent_The_People&action=edit§ion=9</nowiki>: | ||
:''' | :'''9''' | ||
:: '''NOTE''': Confusingly, the section number is NOT the number that appears to the left of the section title in the table of contents, but the literal position in the sequence of sections / sub sections that appear in the article. | |||
=== title === | === title === | ||
The text that goes at the top of the box. | The text that goes at the top of the box. | ||
:Example: | :Example: | ||
:''' | :'''You're no good.''' | ||
=== title color === | === title color === | ||
Line 57: | Line 74: | ||
:Example: | :Example: | ||
:'''#b0b0b0''' | :'''#b0b0b0''' | ||
=== results === | |||
{{ box top | |||
| page to edit = Represent The People#The_Abuser.2C_The_Abused.2C_And_You | |||
| section number =9 | |||
| title = You're no good. | |||
| title color = #000000 | |||
| title background color = #c0c0c0 | |||
| body background color = #f0f0f0 | |||
| border color = #b0b0b0 | |||
}} | |||
[[Represent The People#The_Abuser.2C_The_Abused.2C_And_You|The Abuser, The Abused, And You]] | |||
{{ box bottom }} | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 18:27, 13 April 2012
How to use
This template is to be used in conjunction with Template:Box bottom. The text you want to encapsulate in this box should be sandwiched between the two templates, like so:
- Copy code shown below and paste it into your article.
{{ box top | page to edit = | section number = | title = | title color = | title background color = | body background color = | border color = }} <!-- Insert your text here. --> {{ box bottom }}
- EXAMPLE
{{ box top | page to edit = Represent The People#The_Abuser.2C_The_Abused.2C_And_You | section number =9 | title = You're no good. | title color = #000000 | title background color = #c0c0c0 | body background color = #f0f0f0 | border color = #b0b0b0 }} [[Represent The People#The_Abuser.2C_The_Abused.2C_And_You|The Abuser, The Abused, And You]] {{ box bottom }}
page to edit
The title of the current page.
- Example, if you want this template is refer to the The Abuser, The Abused, And You section of an article called Represent The People, format your link like this:
- Represent The People#The_Abuser.2C_The_Abused.2C_And_You
- NOTE: Everything to the right of the hashtag (#) -- including the hashtag itself -- must be written in the exact format of that portion of the article's URL.
section number
This refers to the section of the article you want the "edit" link on this template to refer to. You must use the section number shown in the URL of the article / section's edit field.
- Example, for the URL http://www.portlandwiki.org/index.php?title=Represent_The_People&action=edit§ion=9:
- 9
- NOTE: Confusingly, the section number is NOT the number that appears to the left of the section title in the table of contents, but the literal position in the sequence of sections / sub sections that appear in the article.
title
The text that goes at the top of the box.
- Example:
- You're no good.
title color
The color of the title text, in hexadecimal (#808080) or X11 color name (Gray).
- Example:
- #000000
title background color
The color of the background for the title bar. If none is specified, the title bar will have the same background color as the rest of the box, and will have a faint gray dotted line separating it from the body.
- Example:
- #c0c0c0
body background color
The color of the background for the rest of the box (where most of the content goes). The text in the body will always be the standard black, so a light color is best for the background.
- Example:
- #f0f0f0
border color
The color of the border for the entire box. Generally, a darker shade of the body or title background color tends to work well.
- Example:
- #b0b0b0