Template:Mbox/doc: Difference between revisions

From Destiny Wiki
Jump to navigation Jump to search
(added doccumentation for Mbox)
 
(added more relevant examples and now reflects additional parameter (with example))
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
A generic message box with an adjustable color, and (technically) should have a way to add an image inside of it. Any silly questions can be directed to [[User:Devonnn]].
A generic message box with an adjustable color, and (technically) should have a way to add an image inside of it. Any silly questions can be directed to [[User:Devonnn]].


:<code><nowiki>{{Mbox|1|2}}</nowiki></code>
:<code><nowiki>{{Mbox|1|2|3}}</nowiki></code>


:<code><nowiki>{{Mbox|color|text}}</nowiki></code>
:<code><nowiki>{{Mbox|stroke|color|text}}</nowiki></code>


== Parameters ==
== Parameters ==
Line 14: Line 14:
! Parameter || Description || Type|| Status
! Parameter || Description || Type|| Status
{{!}}-
{{!}}-
{{!}} 1 {{!!}} Desired '''side''' color, either a [https://www.w3schools.com/tags/ref_colornames.asp color name] or Hex code. Leaving blank will leave the color as the default text color (red). || content || optional
{{!}} 1 || The stroke type that the Mbox will use. By default uses <code>solid</code>, however other options would include <code>dotted</code>, <code>dashed</code> or other CSS borders. || content || optional
{{!}}-
{{!}}-
{{!}} 2 || The desired message to be but into the message box. Will automatically be italicized (like all other message boxes). || content || required
{{!}} 2 {{!!}} Desired '''side''' color, either a [https://www.w3schools.com/tags/ref_colornames.asp color name] or Hex code. Leaving blank will leave the color as the default text color (blue). || content || optional
{{!}}-
{{!}} 3 || The desired message to be but into the message box. Will automatically be italicized (like all other message boxes). || content || required
|}
|}


Line 22: Line 24:
Inputting the following:
Inputting the following:


:<code><nowiki>{{Mbox||You are a loser! You are a big stupid loser head!}}</nowiki></code>
:<code><nowiki>{{Mbox|||You are a loser! You are a big stupid loser head!}}</nowiki></code>


Will result in the following:
Will result in the following:


{{Mbox||You are a loser! You are a big stupid loser head!}}
{{Mbox|||You are a loser! You are a big stupid loser head!}}
----
----
Alternatively, a hex code for a non-html color can be used in order to specify a specific color. For example:
Alternatively, a hex code for a non-html color can be used in order to specify a specific color. For example:


:<code><nowiki>{{Mbox|#aaeeff|You are a loser! You are a big stupid loser head!}}</nowiki></code>
:<code><nowiki>{{Mbox||red|You are a loser! You are a big stupid loser head!}}</nowiki></code>


Will result in the following:
Will result in the following:


{{Mbox|#aaeeff|You are a loser! You are a big stupid loser head!}}
{{Mbox||red|You are a loser! You are a big stupid loser head!}}
----
----
Or, an html color can be used:
Or, a specific border size and type can be used:


:<code><nowiki>{{Mbox|yellow|You are a loser! You are a big stupid loser head!}}</nowiki></code>
:<code><nowiki>{{Mbox|yellow|You are a loser! You are a big stupid loser head!}}</nowiki></code>
Line 42: Line 44:
Will result in the following:
Will result in the following:


{{Mbox|yellow|You are a loser! You are a big stupid loser head!}}
{{Mbox|2px dashed|blue|You are a loser! You are a big stupid loser head!}}
 
Or you could do something like:
:<code><nowiki>{{Mbox|8px inset|green|You are a loser! You are a big stupid loser head!}}</nowiki></code>
 
Will result in the following:
 
{{Mbox|8px inset|green|You are a loser! You are a big stupid loser head!}}
 
However, it looks absolutely ugly.
----
----
Additionally, with some finagling, you can add an image like the other message boxes have without ''too'' much effort.
Additionally, with some finagling, you can add an image like the other message boxes have without ''too'' much effort. Be sure to add a double pipe using <code><nowiki>{{!!}}</nowiki></code> ([[:Template:!!]]) so that the succeeding text displays.


:<code><nowiki>{{Mbox|#aaeeff|You are a loser! You are a big stupid loser head!}}</nowiki></code>
:<code><nowiki>{{Mbox||#ff9900|[[File:ACKSHUALLYexclaim.png]] {{!!}} You are a loser! You are a big stupid loser head!}}</nowiki></code>


Will result in the following:
Will result in the following:


{{Mbox|#ff9900|[[File:ACKSHUALLYexclaim.png]]{{!!}}You are a loser! You are a big stupid loser head!}}
{{Mbox||#ff9900|[[File:ACKSHUALLYexclaim.png]] {{!!}} You are a loser! You are a big stupid loser head!}}
----
----
Last updated by [[User:Devonnn|Devonnn]] ([[User talk:Devonnn|talk]]) 05:17, 23 March 2024 (UTC)
Last updated by [[User:Devonnn|Devonnn]] ([[User talk:Devonnn|talk]]) 05:17, 23 March 2024 (UTC)

Latest revision as of 00:44, 10 April 2024

Documentation for Template:Mbox

Useage

A generic message box with an adjustable color, and (technically) should have a way to add an image inside of it. Any silly questions can be directed to User:Devonnn.

{{Mbox|1|2|3}}
{{Mbox|stroke|color|text}}

Parameters

Parameter Description Type Status
1 The stroke type that the Mbox will use. By default uses solid, however other options would include dotted, dashed or other CSS borders. content optional
2 Desired side color, either a color name or Hex code. Leaving blank will leave the color as the default text color (blue). content optional
3 The desired message to be but into the message box. Will automatically be italicized (like all other message boxes). content required

Examples

Inputting the following:

{{Mbox|||You are a loser! You are a big stupid loser head!}}

Will result in the following:


Alternatively, a hex code for a non-html color can be used in order to specify a specific color. For example:

{{Mbox||red|You are a loser! You are a big stupid loser head!}}

Will result in the following:


Or, a specific border size and type can be used:

{{Mbox|yellow|You are a loser! You are a big stupid loser head!}}

Will result in the following:

Or you could do something like:

{{Mbox|8px inset|green|You are a loser! You are a big stupid loser head!}}

Will result in the following:

However, it looks absolutely ugly.


Additionally, with some finagling, you can add an image like the other message boxes have without too much effort. Be sure to add a double pipe using {{!!}} (Template:!!) so that the succeeding text displays.

{{Mbox||#ff9900|[[File:ACKSHUALLYexclaim.png]] {{!!}} You are a loser! You are a big stupid loser head!}}

Will result in the following:


Last updated by Devonnn (talk) 05:17, 23 March 2024 (UTC)