「User:Selune/沙盒」與「Template:Info」:頁面間的差異

出自H萌娘
< User:Selune(頁面間的差異)
跳至導覽 跳至搜尋
無編輯摘要
 
(( ̄▽ ̄))
 
第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}}};"}}>
<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}}};"}}>
{{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}">{{{leftimage|[[File:Information_icon4.svg|50px|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}">{{{text|{{{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|[[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>}}
</div></div>
</div></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 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}}};"}}>
{{#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>}}
{{#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>}}
</div></div>
</div></div>
<noinclude>{{doc}}
----
<center><templatedata>
{
"params": {
"1": {
"description": "提示的内容",
"suggested": true,
"type": "content",
"autovalue": "",
"default": "警告!你还没有添加任何内容"
},
"color": {
"description": "左边缘竖线颜色",
"default": "#1e90ff"
},
"fontcolor": {
"description": "文字颜色",
"default": "#E6B800"
},
"size": {
"description": "图片大小",
"type": "number",
"default": "50px"
},
"title": {
"description": "标题",
"type": "content"
},
"title-style": {
"description": "标题样式"
},
"icon-style": {
"description": "图片样式"
},
"text-style": {
"description": "内容样式"
},
"text": {
"description": "提示的内容",
"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>

於 2022年12月29日 (四) 20:16 的最新修訂

Icon-info.png
警告!你還沒有添加任何內容
警告!你還沒有添加任何內容
Template-info.svg 模板文檔  [查看] [編輯] [歷史] [刷新]

結構[編輯原始碼]

{{Info
|class=
|width= 默认值是80%
|color= 默认值是#1e90ff
|title-style=
|title=
|icon-style=
|leftimage= 默认值是[[File:Icon-info.png|50px|link=]]
|text-style=
|text= 默认值是'''警告!你还没有添加任何内容'''
|below-style=
|below=
}}
{{Info
|class=
|width=
|color=
|title-style=
|title=
|icon-style=
|leftimage=
|text-style=
|text=
|below-style=
|below=
}}

 所有參數都可以留空或者刪去,但是會使模板失去作用,不寫任何東西的效果見上面的【效果預覽】。  除了|text= 以外的所有參數留空或者刪去是合理的用法。  |text=可以用參數【1】代替  可以使用參數title來增加一個標題
可以使用參數below來增加一個頁腳

舉例說明[編輯原始碼]

{{info
|width=50% 
|title=欢迎来到H萌娘!
|text= 欢迎使用info模板框,这个模板是所有模板的父模板
|class= infoBoxRed
|text-style= color: red; font-weight: bold; font-style: italic;
|leftimage= [[image:Icon-info.png|50px|link=]]
|color= red
|below=H萌娘,万物皆可H!
|class=
}}



頁頂提示框模板

模板參數

參數描述類型狀態
11

提示的內容

預設
警告!你還沒有添加任何內容
自動值
內容建議
colorcolor

左邊緣豎線顏色

預設
#1e90ff
不明選填
backgroundColorbackgroundColor

背景顏色

預設
rgba(255,255,245)
不明選填
leftimageleftimage

選用的圖片

預設
[[image:Icon-info.png|50px|link=]]
檔案選填
fontcolorfontcolor

文字顏色

預設
#E6B800
不明選填
sizesize

圖片大小

預設
50px
數值選填
titletitle

標題

內容選填
title-styletitle-style

標題樣式

不明選填
icon-styleicon-style

圖片樣式

不明選填
text-styletext-style

內容樣式

不明選填
texttext

提示的內容

內容選填
widthwidth

沒有描述

數值選填
classclass

沒有描述

不明選填
belowbelow

沒有描述

不明選填
below-stylebelow-style

沒有描述

不明選填