最后版本 |
您的文本 |
第1行: |
第1行: |
| <div class="nomobile infoBox infoBoxx" style="width:{{{width|}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="{{{class|infoBoxContent new}}}" style="border-left: 9.7px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}> | | <noinclude>这是效果预览 |
| {{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}">{{{leftimage|[[File:Icon-info.png|50px|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}">{{{text|{{{1|'''警告!你还没有添加任何内容'''}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}} | | </noinclude><div class="infoBoxContent" {{#if:{{{backgroundColor|}}}|style="width:{{{width|80%}}};border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}> |
| </div></div> | | {{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}">{{{leftimage|[[image:Icon-info.png|50px|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}">{{{text|{{{1|'''警告!你还没有添加任何内容'''}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}} |
| <div class="mobileonly" style="width:100%;{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="{{{class|infoBoxOrange}}}" style="border-left: 10px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
| | </div></div>{{#switch:{{{type|}}} |
| {{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}"></div><div class="infoBoxText" style="{{{text-style|}}}">{{{text|{{{1|'''警告!你还没有添加任何内容'''}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
| | | top = [[Category: 页顶提示模板]] |
| </div></div>
| | | middle = [[Category: 页中提示模板]] |
| <noinclude>{{doc}} | | | none = |
| | | #default = }}<noinclude> |
|
| |
|
| | == 結構 == |
| | <pre> |
| | {{Info |
| | |class= |
| | |width= 默認值是80% |
| | |color= 默認值是#1e90ff |
| | |backgroundColor= |
| | |title-style= |
| | |title= |
| | |icon-style= |
| | |leftimage= 默認值是[[image:Icon-info.png|50px|link=]] |
| | |text-style= |
| | |text= 默認值是'''警告!你还没有添加任何内容''' |
| | |below-style= |
| | |below= |
| | }} |
| | </pre> |
|
| |
|
| ----
| | <pre> |
| <center><templatedata>
| | {{Info |
| { | | |class= |
| "params": {
| | |width= |
| "1": {
| | |color= |
| "description": "提示的内容",
| | |backgroundColor= |
| "suggested": true,
| | |title-style= |
| "type": "content",
| | |title= |
| "autovalue": "",
| | |icon-style= |
| "default": "警告!你还没有添加任何内容"
| | |leftimage= |
| },
| | |text-style= |
| "color": {
| | |text= |
| "description": "左边缘竖线颜色",
| | |below-style= |
| "default": "#1e90ff"
| | |below= |
| },
| | }} |
| "fontcolor": {
| | </pre> |
| "description": "文字颜色",
| | |
| "default": "#E6B800"
| | 所有參數都可以留空或者删去,但是會使模板失去作用,不写任何东西的效果见上面的【效果预览】。 |
| },
| | 除了|text= 以外的所有參數留空或者删去是合理 的 用法。 |
| "size": {
| | |text=可以用参数【1】代替 |
| "description": "图片大小",
| | {{Color|red|可以使用参数title来增加一个标题<br />可以使用参数below来增加一个页脚}} |
| "type": "number",
| | |
| "default": "50px"
| | == 举例说明 == |
| },
| | |
| "title": {
| | <pre> |
| "description": "标题",
| | {{info |
| "type": "content"
| | |width=50% |
| },
| | |title=欢迎来到H萌娘! |
| "title-style": {
| | |text= 欢迎使用info模板框,这个模板是所有模板 的 父模板 |
| "description": "标题样式"
| | |text-style= color: red; font-weight: bold; font-style: italic; |
| },
| | |leftimage= [[image:Icon-info.png|50px|link=]] |
| "icon-style": {
| | |color= red |
| "description": "图片样式"
| | |backgroundColor= |
| },
| | |below=H萌娘,万物皆可萌! |
| "text-style": {
| | |class= |
| "description": "内容样式"
| | }} |
| },
| | </pre> |
| "text": {
| | |
| "description": "提示 的 内容",
| | [[Category:提示模板 ]]</noinclude> |
| "type": "content"
| |
| },
| |
| "backgroundColor": {
| |
| "description": "背景颜色",
| |
| "default": "rgba(255,255,245)"
| |
| },
| |
| "leftimage": {
| |
| "description": "选用 的 图片",
| |
| "type": "wiki-file-name",
| |
| "default": "[[image:Icon-info.png|50px|link=]]"
| |
| },
| |
| "width": {
| |
| "type": "number"
| |
| },
| |
| "class": {},
| |
| "below": {},
| |
| "below-style": {}
| |
| },
| |
| "description": "页顶 提示 框 模板",
| |
| "paramOrder": [
| |
| "1",
| |
| "color",
| |
| "backgroundColor",
| |
| "leftimage",
| |
| "fontcolor",
| |
| "size",
| |
| "title",
| |
| "title-style",
| |
| "icon-style",
| |
| "text-style",
| |
| "text",
| |
| "width",
| |
| "class",
| |
| "below",
| |
| "below-style"
| |
| ]
| |
| }
| |
| </templatedata></center></noinclude>
| |