打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

模板:Info:修订间差异

来自电棍ottowiki
Subpages:
第1行: 第1行:
<includeonly><div class="infoTop {{{class|}}}" style="{{#ifeq:{{{type|}}}|middle|display:flow-root;}}{{#switch:{{{type|none}}}|middle|none={{#if:{{{width|}}}|width:{{{width}}};}}}}max-width:100%;border-left: 10px solid {{{color|var(--background-color-progressive--focus)}}};"><div class="infoTopContent" {{#if:{{{backgroundColor|}}}|style="border-color:{{{backgroundColor|var(--color-surface-0);}}};background-color:{{{backgroundColor|var(--color-surface-2);}}};"}}>
<includeonly><div class="infoTop {{{class|}}}" style="{{#ifeq:{{{type|}}}|middle|display:flow-root;}}{{#switch:{{{type|none}}}|middle|none={{#if:{{{width|}}}|width:{{{width}}};}}}}max-width:100%;border-left: 10px solid {{{color|var(--background-color-progressive--focus)}}};"><div class="infoTopContent" {{#if:{{{backgroundColor|}}}|style="border-color:{{{backgroundColor|var(--color-surface-0);}}};background-color:{{{backgroundColor|var(--color-surface-2);}}};"}}>
{{#if:{{{title|}}}|<div class="infoTopTitle" style="{{{title-style|}}}">{{{标题|{{{title}}}}}}</div>}}<div class="infoTopIcon" style="{{{icon-style|}}}">{{#if:{{{图片|{{{leftimage|}}}}}}|[[image:{{{图片|{{{leftimage}}}}}}|{{#if:{{{smallimage|}}}|25px|50px}}|link={{{link|}}}]]|[[image:Icon-info.png|25px|link=]]}}</div><div class="infoTopText" style="{{{text-style|}}}{{{content-style|}}}">{{{内容|{{{text|{{{content|{{{1|'''警告!你还没有添加任何内容'''}}}}}}}}}}}}</div>{{#if:{{{below|}}}|<div class="infoTopBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
{{#if:{{{标题|{{{title|}}}}}}|<div class="infoTopTitle" style="{{{title-style|}}}">{{{标题|{{{title}}}}}}</div>}}<div class="infoTopIcon" style="{{{icon-style|}}}">{{#if:{{{图片|{{{leftimage|}}}}}}|[[image:{{{图片|{{{leftimage}}}}}}|{{#if:{{{smallimage|}}}|25px|50px}}|link={{{link|}}}]]|[[image:Icon-info.png|25px|link=]]}}</div><div class="infoTopText" style="{{{text-style|}}}{{{content-style|}}}">{{{内容|{{{text|{{{content|{{{1|'''警告!你还没有添加任何内容'''}}}}}}}}}}}}</div>{{#if:{{{below|}}}|<div class="infoTopBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
</div></div></includeonly><noinclude>{{Documentation}}[[分类:元模板]]</noinclude>
</div></div></includeonly><noinclude>{{Documentation}}[[分类:元模板]]</noinclude>

2025年6月12日 (四) 15:51的版本

文档

   📎 此文档通过 嵌入方式 引用自子页面 模板:Info/doc
   == 效果预览 ==

不填写任何参数时,效果如下。

警告!你还没有添加任何内容

简要说明

  • 参数text为必填,其他参数均为选填。
    • 也可以直接使用参数1。例如{{Info|内容}}{{Info|text=内容}}是等价的。
  • 可以使用参数title来增加一个标题,也可以用参数below增加一个脚注。
  • 在使用该模板制作其他模板时,可以使用参数type填写分类。top(默认)为【页顶提示模板】,middle为【页中提示模板】,none为没有分类。

完整参数

{{info
|width=
|color=
|backgroundColor=
|leftimage=
|icon-style=
|smallimage=
|title=
|title-style=
|text=
|text-style=
|below=
|below-style=
|class=
|type=
}}

参数解析

{{info
|width           = <!-- 模板宽度,默认为80% -->

|color           = <!-- 左侧竖条颜色,默认为 #1e90ff -->
|backgroundColor = <!-- 背景颜色,默认为 #fbfbfb -->

|leftimage       = <!-- 左侧图标,默认为 [[image:Icon-info.png|50px|link=]],会覆盖参数{{{smallimage}}}-->
|icon-style      = <!-- 图标样式 -->
|smallimage      = <!-- 图标大小。参数值不为空时,图标大小为25px,否则为50px -->

|title           = <!-- 标题内容 -->
|title-style     = <!-- 标题样式,格式为行内样式(inline style),如 color: red; font-style: italic; -->

|text            = <!-- 文本内容,等效于{{{content}}}和{{{1}}} -->
|text-style      = <!-- 文本样式,等效于{{{content-style}}} -->

|below           = <!-- 底部内容 -->
|below-style     = <!-- 底部样式 -->

|class           = <!-- 模板额外class -->
|type            = <!-- 模板类型,仅供模板页使用:top为【页顶提示模板】,middle为【页中提示模板】,none为没有分类;在模板页中默认为页顶提示模板,非模板页中默认为没有分类 -->
}}
   [查看]
        · [编辑]
        · [历史]
     · [刷新]