Leehan020816 (토론 | 기여) 편집 요약 없음 |
Minejango2 (토론 | 기여) 잔글 (Minejango2님이 틀:Message Box 문서를 틀:Message box 문서로 이동했습니다) |
||
(사용자 2명의 중간 판 3개는 보이지 않습니다) | |||
4번째 줄: | 4번째 줄: | ||
| style="vertical-align: middle; border: none" | {{#if: {{{icon|}}} | <div style="margin: 0 {{#if: {{{mini|}}} | 2 | 4 }}px 0 3px;{{{imagecss|}}}"> }}{{#if: {{{image|}}}{{{imagetextbefore|}}}{{{imagetextafter|}}} | <div style="margin: 0 {{#if: {{{mini|}}} | 2 | 4 }}px 0 3px;{{{imagecss|}}}"> }}<!-- |
| style="vertical-align: middle; border: none" | {{#if: {{{icon|}}} | <div style="margin: 0 {{#if: {{{mini|}}} | 2 | 4 }}px 0 3px;{{{imagecss|}}}"> }}{{#if: {{{image|}}}{{{imagetextbefore|}}}{{{imagetextafter|}}} | <div style="margin: 0 {{#if: {{{mini|}}} | 2 | 4 }}px 0 3px;{{{imagecss|}}}"> }}<!-- |
||
-->{{{imagetextbefore|}}}{{#if: {{{icon|}}} | {{CommentSprite | {{{icon|}}} }} }}{{#if: {{{image|}}} | [[File:{{{image}}}|{{#if: {{{imagesize|}}} | {{{imagesize}}} | {{#if: {{{mini|}}} | 16px | 32px }} }}|text-top]] }}{{{imagetextafter|}}}</div> |
-->{{{imagetextbefore|}}}{{#if: {{{icon|}}} | {{CommentSprite | {{{icon|}}} }} }}{{#if: {{{image|}}} | [[File:{{{image}}}|{{#if: {{{imagesize|}}} | {{{imagesize}}} | {{#if: {{{mini|}}} | 16px | 32px }} }}|text-top]] }}{{{imagetextafter|}}}</div> |
||
− | | style="border: none" | {{#if: {{{title|}}} | '''{{{title}}}''' {{#if: {{{discuss|}}}{{{discussPage|}}}{{{discussAnchor|}}} | <sup>[[{{#if: {{{discussPage|}}} | {{{discussPage}}} | {{TALKPAGENAME}} }}{{#if:{{{discussAnchor|}}} | #{{{discussAnchor}}} }}| |
+ | | style="border: none" | {{#if: {{{title|}}} | '''{{{title}}}''' {{#if: {{{discuss|}}}{{{discussPage|}}}{{{discussAnchor|}}} | <sup>[[{{#if: {{{discussPage|}}} | {{{discussPage}}} | {{TALKPAGENAME}} }}{{#if:{{{discussAnchor|}}} | #{{{discussAnchor}}} }}|토론]]</sup> }} }}<!-- |
-->{{#if: {{{text|}}} | {{#if: {{{title|}}} | <div>{{{text}}}</div> | {{{text}}} }} }} |
-->{{#if: {{{text|}}} | {{#if: {{{title|}}} | <div>{{{text}}}</div> | {{{text}}} }} }} |
||
− | |}{{#if: {{{nocat|}}} || {{#ifeq: {{NAMESPACE}} | |
+ | |}{{#if: {{{nocat|}}} || {{#ifeq: {{NAMESPACE}} | 틀 | [[분류:알림 틀]] }} }}</includeonly><noinclude> |
− | {{ |
+ | {{설명문서}}</noinclude> |
2020년 5월 15일 (금) 01:50 판
This template is used to add consistent styling to message boxes.
Usage
{{Message box | mini = Mini mode | small = Mini mode | class = Classes for the template | type = Notice type | bgcol = Custom background color | linecol = Custom line color | width = Custom width | float = Custom alignment | icon = Icon from Template:CommentSprite | imagecss = Custom image CSS | image = Extra image | imagetextbefore = Text before the image | imagetextafter = Text after the image | imagesize = Image size | title = Template title | discuss = Discuss button | discussPage = Talk page link | discussAnchor = Talk page section specification | linkshere = Links button to Special:WhatLinksHere | text = Template text | css = Custom CSS }}
Parameters
Message boxes are used to create most templates present on the wiki. The following table shows a description of the parameter usage of this template.
변수 | 설명 | 형식 | 상태 | |
---|---|---|---|---|
Mini mode | mini small | Changes the message box size to one that is more suited to an article section. | 부울식 | 선택 사항 |
Type | type | Message box notice category. See [[#Types]].
| 문자열 | 선택 사항 |
Class | class | Adds class to the template. | 문자열 | 제안 |
Background color | bgcol | Changes the background color.
| 문자열 | 선택 사항 |
Line color | linecol | Changes the line color. | 문자열 | 선택 사항 |
Width | width | Changes the template width.
| 문자열 | 선택 사항 |
Alignment | float | Changes the template position. | 문자열 | 선택 사항 |
Icon | icon | Adds an icon from Template:CommentSprite. Incompatible with the {{{image}}} parameter and its derivatives. | 문자열 | 선택 사항 |
Image CSS customization | imagecss | Further customization of an image on the message box with CSS. | 문자열 | 선택 사항 |
Image | image | Adds an image icon to the template. Incompatible with the {{{icon}}} parameter. | 파일 | 선택 사항 |
Additional text | imagetextbefore | Adds a text before/above the image. | 문자열 | 선택 사항 |
Additional text | imagetextafter | Adds a text after/below the image. | 문자열 | 선택 사항 |
Image size | imagesize | Changes the image size if the {{{image}}} parameter is set.
| 문자열 | 선택 사항 |
Title | title | Adds a title to the template. | 문자열 | 제안 |
Discuss button? | discuss | Adds a button named [Discuss] that links to the talk page of the page where the message box is used. | 부울식 | 선택 사항 |
Talk page link customization | discussPage | Changes the [Discuss] button to link to a custom talk page. | 문서 이름 | 선택 사항 |
Talk page section specification | discussAnchor | Makes the [Discuss] button to link to a specific section of the talk page. | 문자열 | 선택 사항 |
Links button? | linkshere | Adds a button named [Links] that links to Special:WhatLinksHere which lists the page usage of the current page. | 부울식 | 선택 사항 |
Text | text | Adds text to the template. | 내용 | 제안 |
CSS customization | css | Further customization of the message box with CSS. | 문자열 | 선택 사항 |
Types
Colors are used to indicate the type of message box:
Criteria | Type | Color displayed | ||
---|---|---|---|---|
Unclassified templates (default) |
| |||
Warning for disclaimer/deletion of a page | type = delete
|
| ||
Suggesting a page to be moved/split/merged | type = move
|
| ||
Notice for content issues of a page | type = content
|
| ||
Notice for style issues of a page | type = style
|
| ||
Information regarding the status of a page | type = notice
|
| ||
Details about editions and/or versions | type = edition
|
| ||
Unused/custom purposes | type = other
|
|
Examples
Code | Result | ||
---|---|---|---|
Basic usage:
{{msgbox | title = This is a normal message box | text = With helpful and descriptive subtext }} |
| ||
Mini usage:
{{msgbox | mini = 1 | icon = 8 | text = This has an information icon using [[Template:CommentSprite]] }} |
| ||
Advanced usage:
{{msgbox | bgcol = rgba(203, 203, 249, 0.2) | linecol = rgba(107, 107, 253, 0.2) | title = This is a blue message box | text = It has a discuss link, some custom CSS and a custom image | discuss = 1 | image = Bot.png | css = box-shadow: 10px 10px 2px #787878; }} |
| ||
Advanced mini usage:
{{msgbox | mini = 1 | image = Bot.png | bgcol = rgba(147, 122, 85, 0.2) | linecol = rgba(187, 116, 13, 0.2) | css = box-shadow: 0px 0px 6px #787878; | text = This is using similar settings as the advanced example above. }} |
|
틀:Experiment