Template:HideInline/doc: Difference between revisions

From NeuroWiki
Jump to navigation Jump to search
m 1 revision imported
No edit summary
Line 1: Line 1:
{{Uses TemplateStyles}}
{{Uses TemplateStyles}}
除了width参数以外,{{tl|hide}}的其他参数均有效
All parameters of {{tl|hide}} are valid except for the `width` parameter.


{{HideInline|河蟹你懂的|测试|expandtext=真的要看吗?|collapsetext=其实什么也没有}}
{{HideInline|This is a placeholder|Test|expandtext=Do you really want to see?|collapsetext=Actually, there's nothing here}}


==参数==
== Parameters ==
本模板提供如下参数:
This template provides the following parameters:
#show
# show
#标题(或缺省第一项)
# title (or defaults to the first unnamed parameter)
#内容(或缺省第二项)
# content (or defaults to the second unnamed parameter)
#expandtext
# expandtext
#collapsetext
# collapsetext


=== show ===
The `show` parameter is a special parameter. It can and must only be used as the first parameter.<br>
When used, it automatically expands the hidden content.<br>
<code><nowiki>{{HideInline|show|Title|Content}}</nowiki></code><br>
or<br>
<code><nowiki>{{HideInline|show|title=Title|content=Content}}</nowiki></code><br>
will output:<br><br>
{{HideInline|show|Title|Content}}


===show===
=== Title ===
<code>show</code>是一个特别的参数。它能且只能被用在第一个参数位置上。<br>
<code><nowiki>{{HideInline|title=Title Test}}</nowiki></code><br/>
被使用时,它会默认展开隐藏的内容。<br>
and<br/>
<code><nowiki>{{HideInline|show|标题|内容}}</nowiki></code><br>
<code><nowiki>{{HideInline|Title Test}}</nowiki></code><br/>
<br>
will output the same result:<br/><br/>
<code><nowiki>{{HideInline|show|标题=标题|内容=内容}}</nowiki></code><br>
{{HideInline|Title Test}}
会输出:<br><br>
{{HideInline|show|标题|内容}}


===标题===
=== Content ===
<code><nowiki>{{HideInline|标题=标题测试}}</nowiki></code><br/>
<code><nowiki>{{HideInline|title=Title|content=Content Test}}</nowiki></code><br/>
<br/>
and<br/>
<code><nowiki>{{HideInline|标题测试}}</nowiki></code><br/>
<code><nowiki>{{HideInline|Title|Content Test}}</nowiki></code><br/>
均会输出一样的结果:<br/><br/>
will output the same result:<br/><br/>
{{HideInline|标题测试}}
{{HideInline|Title|Content Test}}


===内容===
=== expandtext ===
<code><nowiki>{{HideInline|标题=标题|内容=内容测试}}</nowiki></code><br/>
<code><nowiki>{{HideInline|Title|Content|expandtext=Expand Text Test}}</nowiki></code><br/>
<br/>
will output:<br/><br/>
<code><nowiki>{{HideInline|标题|内容测试}}</nowiki></code><br/>
{{HideInline|Title|Content|expandtext=Expand Text Test}}<br>
均会输出一样的结果:<br/><br/>
You can see that the text of the expand button has been changed.
{{HideInline|标题|内容测试}}


===expandtext===
=== collapsetext ===
<code><nowiki>{{HideInline|标题|内容|expandtext=expandtext测试}}</nowiki></code><br/>
<code><nowiki>{{HideInline|Title|Content|collapsetext=Collapse Text Test}}</nowiki></code><br/>
会输出:<br/><br/>
will output:<br/><br/>
{{HideInline|标题|内容|expandtext=expandtext测试}}<br>
{{HideInline|Title|Content|collapsetext=Collapse Text Test}}<br>
可以看到展开按钮的文字被改变了。
You can see that the text of the collapse button has been changed. <noinclude>[[zh:Template:HideInline/doc]][[Category:Template Documentation]]</noinclude>
 
===collapsetext===
<code><nowiki>{{HideInline|标题|内容|collapsetext=collapsetext测试}}</nowiki></code><br/>
会输出:<br/><br/>
{{HideInline|标题|内容|collapsetext=collapsetext测试}}<br>
可以看到折叠按钮的文字被改变了。<noinclude>[[Category:模板文档]]</noinclude>

Revision as of 23:37, 12 January 2025

This template uses template styles Template:HideInline/styles.css, this stylesheet(s) are written in CSS.
For more details, please see Help:TemplateStyles and Extension:TemplateStyles.

All parameters of {{hide}} are valid except for the `width` parameter.

This is a placeholderTest

Parameters

This template provides the following parameters:

  1. show
  2. title (or defaults to the first unnamed parameter)
  3. content (or defaults to the second unnamed parameter)
  4. expandtext
  5. collapsetext

show

The `show` parameter is a special parameter. It can and must only be used as the first parameter.
When used, it automatically expands the hidden content.
{{HideInline|show|Title|Content}}
or
{{HideInline|show|title=Title|content=Content}}
will output:

TitleContent

Title

{{HideInline|title=Title Test}}
and
{{HideInline|Title Test}}
will output the same result:

Title Test

Content

{{HideInline|title=Title|content=Content Test}}
and
{{HideInline|Title|Content Test}}
will output the same result:

TitleContent Test

expandtext

{{HideInline|Title|Content|expandtext=Expand Text Test}}
will output:

TitleContent
You can see that the text of the expand button has been changed.

collapsetext

{{HideInline|Title|Content|collapsetext=Collapse Text Test}}
will output:

TitleContent
You can see that the text of the collapse button has been changed.