Template:CatWeight/doc: Difference between revisions

From AniDB
Jump to navigation Jump to search
(Documentation for CatWeight v1.)
(No difference)

Revision as of 15:56, 1 May 2009

The information on this page is incomplete and may not be of much use.
If you can, please help by adding to it.

Documentation for this template

This template creates an eye-catcher bar that can be indented up to 6 times via parameter value, letting the user better customize his "Note"s. The code is backwards compatible, letting the user keep on using the old 2 parameter version as well.

New Subtle one-pixel border added, padding improved, <info> is not word-wrapped.
Light Note There is another "lighter" version of the catWeighter-bar available by using the catWeightLight template shown here in this "Light Note" box.

Alternative names

  • {{catWeight|<info>|<text>}}
  • {{CatWeight|<info>|<text>}} - alternate spelling of template
  • {{catWeight|<#>|<info>|<text>}}
  • {{CatWeight|<#>|<info>|<text>}} - alternate spelling of template


Syntax

The template can have 2 or 3 parameters:

  1. {{catWeight|<info>|<text>}} - Default mode, no indentation.
  2. {{catWeight|<#>|<info>|<text>}} - Define indentation via <#> parameter.
       <#> =  Number 0 (min) to 6 (max), defines indentation level.
    <info> =  The info to highlight (not word-wrapped), i.e. Note or Important.
    <text> =  The descriptive text for the info.
Category Weight     Only the <#> values 1 to 6 are actually checked, any other values (e.g. 0 or abc) yield no indentation at all, and are treated the same as {{catWeight|info|text}}!
Category Weight     The <info> parameter is intended for short message headers. To improve readability the word-wrapping is turned off!


Examples

{{catWeight|0|Note|'''No''' indentation, just like the normal <tt>catWeight</tt>.}} 
{{catWeight|abc|Note|'''No''' indentation, just like the normal <tt>catWeight</tt>.}} 
{{catWeight||Note|'''No''' indentation, just like the normal <tt>catWeight</tt>.}} 
Category Weight     No indentation, just like the normal catWeight.
{{catWeight|1|Another note|'''One''' indentation, just like <tt>catWeight2</tt>.}} 
Category Weight     One indentation, just like catWeight2.
{{catWeight|2|Important|Level '''two''' indentation!}} 
Category Weight     Level two indentation!
{{catWeight|6|Very important|Maximum indentation level of '''six'''! "Very important" is ...}} 
Category Weight     Maximum indentation level of six! "Very important" is not word-wrapped.