Template:Wn/si/Xambox
{{{text-mobile}}} |
භාවිතය
editThis template creates an explicit ambox; that is, an article message box that always actually presents its message to the user, even in mobile view. Use it when the reader should see the actual message. (Wikipedia, for which {{Wn/si/ambox}} is apparently maintained, is primarily concerned with delivering content regardless of quality, while explaining what needs improvement as a follow-up concern; though consistent with Wikipedia's workflow, this is not always appropriate, and on some projects may even be usually inappropriate depending on their workflow. Currently, {{Wn/si/ambox}} on mobile view shows a discreet message "Page Issues" which can be clicked on to see what the issues are.)
This template generates two boxes, one for the desktop view and a second for the mobile view; one or the other should be hidden via css.
The desktop box draws its primary content from parameter text
if available, otherwise parameter Template:Nowrap if available. The mobile box looks for Template:Nowrap first, otherwise text
.
Parameter type
if provided determines the color of the border and bar on the left side of the box, and may determine the left image. Parameter type
if omitted or blank defaults to notice
. As of this writing, the types with associated colors are
notice
,serious
,content
,style
,merge
,
while those with associated images are
serious
,content
,maintenance
,notice
,blank
.
The desktop box takes optional parameters image
and imageright
to specify images (or other content) to the left and to the right of the text. If image
is omitted, the left image defaults to some image based on type
; if image
is blank, space is left as if there were an image (allowing multiple messages to align); imageTemplate:==none
omits the left image. The right image is omitted unless explicitly specified.
The mobile box uses instead optional parameters Template:Nowrap and Template:Nowrap. If Template:Nowrap is unspecified it defaults to none, if blank it defaults to an image based on type
.
If parameter noprint
is non-blank, the boxes also have class noprint
.
අභ්යන්තර ක්රියාකාරීත්වය
editThe desktop box is wrapped in a div element of class desktop-only, the mobile box in a div element of class mobile-only; there should be a rule in Mediawiki:Common.css hiding elements of class mobile-only, and in Mediawiki:Mobile.css hiding elements of class desktop-only.
ඉහත දැක්වෙන උපදෙස්, Template:Wn/si/Xambox/උපදෙස් වෙතින් ගෙනැවිත් ඇත. (සංස්කරණය | ඉතිහාසය) සංස්කාරක වරුන් හට මෙම සැකිල්ලේ වැලිපිල්ල (නිර්මාණය | mirror) සහ testcases (නිර්මාණය) පිටු තුළ අත්හදා බැලීම් සිදු කළ හැකිය. කරුණාකර /උපදෙස් උප පිටුව තුළට ප්රවර්ග එක් කරන්න. මෙම සැකිල්ලේ උප පිටු. |