Template:Box top: Difference between revisions

From PortlandWiki
Jump to navigation Jump to search
(first attempt at edit and view links)
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; 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>
<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
  -->style="float:right;<!--
        -->margin-bottom: .1em;<!--
        -->font-size: 80%;<!--
        --> color: {{{title color}}}">{{
#if: {{{noedit|}}} || [{{fullurl:{{{page to edit|/}}}|action=edit{{#if: {{{section number|}}} |&section={{{section number}}}}}}} <span style="color: {{{title color|#000}}}">edit</span>]&nbsp;}}{{#if: {{{page to edit|}}} |'''·'''&nbsp;[[:{{{page to edit}}}|<span style="color: {{{title color|#000}}}">view</span>]]&nbsp;}}</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:
<pre>{{ box top  
<pre>{{ box top  
| page to edit =
| section number =
| title =  
| title =  
| title color =  
| title color =  
Line 13: Line 24:
Example text. Today I woke up, brushed my teeth, and got dressed. then I went to work. Then I edited PortlandWiki at work all day until the boss caught me and now I'm out of a job. Thanks, PortlandWiki!
Example text. Today I woke up, brushed my teeth, and got dressed. then I went to work. Then I edited PortlandWiki at work all day until the boss caught me and now I'm out of a job. Thanks, PortlandWiki!
{{ box bottom }}</pre>
{{ box bottom }}</pre>
=== page to edit ===
The title of the current page.
:Example, if the template is placed on [[PortlandWiki]]:
:'''PortlandWiki'''
=== section number ===
If applicable, the number of the section this box relates to. You must use the section number shown in the document URL.
:Example, for the URL <nowiki>http://www.portlandwiki.org/index.php?title=Represent_The_People&action=edit&section=1</nowiki>:
:'''1'''


=== title ===
=== title ===

Revision as of 21:36, 3 April 2012

{{{title}}}}}}}

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:

{{ box top 
| page to edit = 
| section number =
| title = 
| title color = 
| title background color = 
| body background color =
| border color = 
}}
Example text. Today I woke up, brushed my teeth, and got dressed. then I went to work. Then I edited PortlandWiki at work all day until the boss caught me and now I'm out of a job. Thanks, PortlandWiki!
{{ box bottom }}

page to edit

The title of the current page.

Example, if the template is placed on PortlandWiki:
PortlandWiki

section number

If applicable, the number of the section this box relates to. You must use the section number shown in the document URL.

Example, for the URL http://www.portlandwiki.org/index.php?title=Represent_The_People&action=edit&section=1:
1

title

The text that goes at the top of the box.

Example:
Things I did today

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