Difference between revisions of "Template:Info"

From What's Up With Your MCU? - A72's ECE Hobby Blog
Jump to navigation Jump to search
(Created page with "<div class="infoBox {{{class|}}}" style="width:{{{width|80%}}};border-left: 10px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};...")
 
 
Line 1: Line 1:
 
<div class="infoBox {{{class|}}}" style="width:{{{width|80%}}};border-left: 10px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="infoBoxContent" {{#if:{{{backgroundColor|}}}|style="border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
 
<div class="infoBox {{{class|}}}" style="width:{{{width|80%}}};border-left: 10px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="infoBoxContent" {{#if:{{{backgroundColor|}}}|style="border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
{{#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|{{#if:{{{smallimage|}}}|25px|50px}}|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}{{{content-style|}}}">{{{text|{{{content|{{{1|'''警告!你还没有添加任何内容'''}}}}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
+
{{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}">{{{leftimage|[[image:Ambox notice.svg|{{#if:{{{smallimage|}}}|25px|50px}}|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}{{{content-style|}}}">{{{text|{{{content|{{{1|'''警告!你还没有添加任何内容'''}}}}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
 
</div></div>{{#ifeq:{{NAMESPACENUMBER}}|10|{{#switch:{{{type|}}}
 
</div></div>{{#ifeq:{{NAMESPACENUMBER}}|10|{{#switch:{{{type|}}}
 
| top = [[Category:页顶提示模板]]
 
| top = [[Category:页顶提示模板]]

Latest revision as of 03:55, 16 January 2020

Ambox notice.svg
警告!你还没有添加任何内容
Template-info.svg 模板文档  [查看] [编辑] [历史] [刷新]

Template:High-risk 这是效果预览

Ambox notice.svg
警告!你还没有添加任何内容

举例说明:

除了|text= 以外都可以留空或者删去,不写任何东西的效果见上面的【效果预览】
|text=可以用参数【1】代替
可以使用参数title来增加一个标题!也可以用参数below增加一个页脚!
type= ,分類填寫,默認為【頁頂提醒模板】,top為【頁頂提醒模板】;middle為【頁中提醒模板】;none為沒有分類。
{{info
|width=50% <!-- 模板宽度,选填,默认为80% -->
|title=感谢萌娘百科提供这个模板! <!-- 文本标题,选填 -->
|text= 欢迎使用info模板框,这个模板是所有模板的父模板 <!-- 文本内容,必填!!!(可省去参数名) -->
|text-style= color: red; font-weight: bold; font-style: italic; <!-- 文本样式,选填,格式为行内样式(inline style) -->
|leftimage= [[image:Icon-info.png|50px|link=]] <!-- 左侧图标,选填,格式为图片插入语法,默认为[[image:Icon-info.png|50px|link=]] -->
|color= red <!-- 左边框颜色,选填,格式为HTML颜色语法,默认为#1e90ff -->
|backgroundColor= <!-- 背景颜色,选填,格式为HTML颜色语法,默认为#fbfbfb -->
|below=萌娘百科,万物皆可萌! <!-- 底部内容,选填-->
|class= <!-- 模板额外class,选填,格式为class语法-->
|type= <!--模板类型,仅供模板页使用:在模板页中默认为【页顶提醒模板】,top为【页顶提醒模板】,middle为【页中提醒模板】,none为没有分类;在非模板页中默认为没有分类-->
|smallimage= <!--图标大小,选填。参数值填写任意内容时,图标大小为25px(即一行文字的高度),否则为50px(默认高度)-->
}}