模板:Tabs/收纳表/doc:修订间差异

跳到导航 跳到搜索
添加2,889字节 、​ 2023年11月18日 (星期六)
补充
(更新。→‎已知的BUG:​ 模块化后,已可正确处理tab编号不连续的情形而显示上的bug
(补充)
 
(未显示2个用户的10个中间版本)
第1行: 第1行:
==使用方式==
==使用方式==
将以下源代码插入页面:
将以下源代码插入页面:
<pre>{{Tabs/周年庆感言
<pre>{{Tabs/收纳表
|tab1=标题2名称
|tab1=标题2名称
|tab2=标题2名称
|tab2=标题2名称
第10行: 第10行:
}}</pre>
}}</pre>
*模板使用<nowiki><templatestyles src=":透明样式/styles.css" /></nowiki>
*模板使用<nowiki><templatestyles src=":透明样式/styles.css" /></nowiki>
 
===已知BUG===
== 参数 ==
*使用[[模板:Tabs/收纳表/styles.css]]的情况下,无法实现'''范例 - 侧边收纳表'''。
**EX:[[模板:文化代表人物/人物简介]]与'''范例 - 侧边收纳表'''要共同存在一个词条需多增设'''<nowiki>|收纳表=OFF</nowiki>'''。
**:'''<nowiki>|收纳表=OFF</nowiki>'''使用的情况下,宽度的偏移就补设定'''<nowiki>|width =auto|sitmwidth =80px</nowiki>'''。
== 参数 ==  
以下是可填入的参数以及其说明。参数输入的顺序皆不会影响模版的运行,可以随意地写。
以下是可填入的参数以及其说明。参数输入的顺序皆不会影响模版的运行,可以随意地写。
{|class="wikitable"
{|class="wikitable"
|+模版参数
|+模版参数
! 参数名 !! 默认值 !! 解释
! 参数名 !! 旧名/别名 !! 解释
|-
| <code>initialTab</code> || 无 || 键入content的数字会直接预览该content
|-
| <code>(style)</code> || 无 || 整体框架的 css style。也可以加入 class
|-
|-
| <code>selectHeight</code> || || 选择栏的最大高度,如100px。若有设置而内容太长挤不进去,则右方会多一个滚动条
| <code>stab(style)</code> || select(style) || 选择栏的 css style。也可以加入 class
|-
|-
| <code>textHeight  </code> || || 内容框的高度,如10em。同上。
| <code>ctab(style)</code> || text(style) || 内容框的 css style。也可以加入 class
|-
|-
| <code>selectWidth </code> || 无 || 选择栏的宽度,如50%。若有设置而内容太长挤不进去,则下方会多一个滚动条
| <code>sitm(style) </code> || 无 || 选择栏内个别物件的 css style。也可以加入 class
|-
|-
| <code>textWidth  </code> || 无 || 内容框的宽度,如75ch。同上。
| <code>citm(style) </code> || 无 || 内容框内个别物件的 css style。也可以加入 class
|-
|-
| <code>splitCount  </code> || || 每行共有几个物件
| <code>splitCount  </code> || || 预设5。选择栏每行共有几个物件
|-
|-
| <code>textDisplay </code> ||down
| <code>textDisplay </code> ||
|内容相对于选择栏的位置,可输入
|预设down。内容相对于选择栏的位置,可输入
* top(内容在选择栏上)
* top(内容在选择栏上)
* down(内容在选择栏下)
* down(内容在选择栏下)
第40行: 第47行:


==范例==
==范例==
===范例 1 - 基础===
 
 
 
===范例 - 基础、顺序不影响===
<pre>
<pre>
{{Tabs/周年庆感言
{{Tabs/收纳表
|tab1 = 选择1
|tab1 = 选择1
|tab2 = 选择2
|tab2 = 选择2
|tab10086 = 选择5
|tab3 = 选择3
|tab3 = 选择3
|tab1337 = 选择4
|content10086 = 内容5
|content1 = 内容1
|content1 = 内容1
|content2 = 内容2
|content2 = 内容2
|content1337 = 内容4
|content3 = 内容3
|content3 = 内容3
}}
}}
</pre>
</pre>
{{Tabs/周年庆感言
{{Tabs/收纳表
|tab1 = 选择1
|tab1 = 选择1
|tab2 = 选择2
|tab2 = 选择2
|tab10086 = 选择5
|tab3 = 选择3
|tab3 = 选择3
|tab1337 = 选择4
|content10086 = 内容5
|content1 = 内容1
|content1 = 内容1
|content2 = 内容2
|content2 = 内容2
|content1337 = 内容4
|content3 = 内容3
|content3 = 内容3
}}
}}
<hr>
<hr>
===范例 2 - 编号不必连续、参数顺序不影响显示===
 
 
 
===范例 - 侧边收纳表===
<pre>
<pre>
{{Tabs/周年庆感言
{{Tabs/收纳表
|tab0 = 第一个显示的选择
|textDisplay = right
|tab10086 = 第三个显示的选择
|splitCount=1
|tab1555 = 第二个显示的选择
|tab1=[[file:头像-織雪.png|30px|link=]][[織雪]]
|content10086 = 第三个显示的内容
|tab2=[[file:文学领主-月下的孤狼-头像.png|36px|link=]][[月下的孤狼|诺诺]]
|content0 = 第一个显示的内容
|tab3=[[file:头像-黑光.png|30px|link=]][https://sstm.moe/profile/360467-1 黑光]
|content1555 = 第二个显示的内容
|tab4=[[file:头像-lemon19.png|30px|link=]][https://sstm.moe/profile/285830-1 lemon19]
|tab5=[[file:头像-XdbX.png|30px|link=]][https://sstm.moe/profile/219814-1 xdbx]
|tab6=[[file:头像-amiami猫羽雫.png|30px|link=]][https://sstm.moe/profile/343682-1 amiami猫羽雫]
|tab7=[[file:头像-fdcrane.png|32px|link=]][https://sstm.moe/profile/1645-1 fdcrane]
...
 
|content1=
久疏问候。
 
转眼已经过去了两年,论坛也已经准备十周年了。<br>
各位在论坛上是否有什么特别的收获呢?<br>
新朋友?打发时间的好地方?一些小目标?如果能仔细说说就最好了。<br>
建议各位会员小可爱们尝试一下成为管理层哦~ 也许你们可以收获一些特别之物。<br>
...
}}
}}
</pre>
</pre>
{{Tabs/周年庆感言
{{Tabs/收纳表
|tab0 = 第一个显示的选择
|tab10086 = 第三个显示的选择
|tab1555 = 第二个显示的选择
|content10086 = 第三个显示的内容
|content0 = 第一个显示的内容
|content1555 = 第二个显示的内容
}}
<hr>
===范例 3 - 可拉动式收纳表===
{{Tabs/周年庆感言
|textDisplay = right
|textDisplay = right
|selectHeight = 200px
|splitCount=1
|splitCount=1
|tab1=[[file:头像-織雪.png|30px|link=]][[織雪]]
|tab1=[[file:头像-織雪.png|30px|link=]][[織雪]]
第92行: 第115行:
|tab6=[[file:头像-amiami猫羽雫.png|30px|link=]][https://sstm.moe/profile/343682-1 amiami猫羽雫]
|tab6=[[file:头像-amiami猫羽雫.png|30px|link=]][https://sstm.moe/profile/343682-1 amiami猫羽雫]
|tab7=[[file:头像-fdcrane.png|32px|link=]][https://sstm.moe/profile/1645-1 fdcrane]
|tab7=[[file:头像-fdcrane.png|32px|link=]][https://sstm.moe/profile/1645-1 fdcrane]
|tab8=Lorem
|tab9=ipsum
|tab10=dolor
|tab11=sit
|tab12=amet
|tab13=consectetur
|tab14=adipiscing
|tab15=elit
|content1=
|content1=
久疏问候。
久疏问候。
第144行: 第175行:
——最近正试图从鸦片战争中拯救大清的H君
——最近正试图从鸦片战争中拯救大清的H君


|content8=Nunc nec porttitor leo.
|content9=Nullam sit amet dui nulla.
|content10=Integer pulvinar diam quis lorem mattis convallis.
|content11=Suspendisse consequat interdum mi, id eleifend urna elementum nec.
|content12=Suspendisse vitae turpis quis velit vulputate consectetur eget et mauris.
|content13=Ut a mauris faucibus, aliquet ipsum in, maximus ligula.
|content14=Donec orci ipsum, aliquam quis venenatis nec, tristique vitae diam.
|content15=Maecenas ac mattis libero, ut suscipit nulla.
}}
<hr>
===范例 - CSS Styles===
<pre>
{{Tabs/收纳表
|background-color = darkgray
|border-radius = 3vmin
|width = min(800px, 95%)
|margin = 2%
|stabbackground-color = skyblue
|stabtext-align = center
|sitmcolor = darkorchid
|sitmfont-weight = 500
|sitmfont-size = clamp(16px, 3vmax, 24px)
|ctabbackground-color = #ffede0
|citmfont-size = clamp(16px, 3vmax, 24px)
|tab1 = 选择1
|tab2 = 选择2
|tab3 = 选择3
|tab4 = 选择4
|tab5 = 选择5
|content1 = 内容1
|content2 = 内容2
|content3 = 内容3
|content4 = 内容4
|content5 = 内容5
}}
}}
</pre>
{{Tabs/收纳表
|background-color = darkgray
|border-radius = 3vmin
|width = min(800px, 95%)
|margin = 2%
|stabbackground-color = skyblue
|stabtext-align = center
|sitmcolor = darkorchid
|sitmfont-weight = 500
|sitmfont-size = clamp(16px, 3vmax, 24px)
|ctabbackground-color = #ffede0
|citmfont-size = clamp(16px, 3vmax, 24px)


<noinclude>[[分类:功能模板]]</noinclude>
|tab1 = 选择1
|tab2 = 选择2
|tab3 = 选择3
|tab4 = 选择4
|tab5 = 选择5
|content1 = 内容1
|content2 = 内容2
|content3 = 内容3
|content4 = 内容4
|content5 = 内容5
}}
====现有CSS Styles====
*[[模板:Tabs/收纳表/styles.css]]
[[分类:功能模板]]
15,439

个编辑

导航菜单