Template:Subject box/doc
Appearance
This is a documentation subpage for Template:Subject box It may contain usage information, categories and other content that is not part of the original template page. |
This template is used to produce a link in a box to a subject.
Parameters
[edit source]{{Subject box|Name|image=Image|size=Size|left=yes|margin=Margin}}
Name
- The name of the subject.
The following additional parameters are available. They are all optional; the default values are chosen to give a good look and feel across the project.
|image=Image
- The image to use for the subject's icon. This defaults to an image that is specified in Template:Subject box/Images/SubjectName for the subject or a generic image. There is a list of all such images.
|size=Size
- The width of the icon, as an integer. This is in units of pixels. The default is 32. The icon is also constrained to be at most 28 pixels high.
|left=yes
- Float the box to the left instead of to the right.
|margin=Margin
- The margin around the box. By default, the box is surrounded by a margin of width 0.5em, but this can be customized using
|margin=top right bottom left
(e.g.,|margin=0.25em 0 0.25em 0.25em
) or removed using|margin=0
(zero).
Examples
[edit source]Code |
Result |
---|---|
{{Subject box|Books by subject}}
|
|
{{Subject box|Science}}
|
|
{{Subject box|Science|Conical flask stylised.svg}}
|
|
{{Subject box|Science|size=15}}
|
|
{{Subject box|Science|left=yes}}
|