新增维基百科、百度百科外链卡片及简繁别名;独立编写中性文案与自适应样式,附参考来源和用法 |
百科链接卡片:用户指定图标、萌娘百科模板、修复模板页无效默认目标;中文文言加需🪜提示,六语言对应模板 |
||
| 第1行: | 第1行: | ||
<templatestyles src="Template:百科链接/样式.css" /><div class="tyzx-encyclopedia-link noprint">< | <includeonly><templatestyles src="Template:百科链接/样式.css" /><div class="tyzx-encyclopedia-link tyzx-encyclopedia-link--baidu noprint"><div class="tyzx-encyclopedia-link__image">[[File:Tyzx external Baidu baike logo.svg|130px|link=|alt=百度百科]]</div><div class="tyzx-encyclopedia-link__heading">百度百科</div><div>{{{text|相关内容:}}}<span class="tyzx-encyclopedia-link__target">[https://baike.baidu.com/item/{{urlencode:{{{name|{{{1|{{PAGENAME}}}}}}}}|WIKI}}{{#if:{{{id|}}}|/{{urlencode:{{{id}}}|WIKI}}}} {{{2|{{{name|{{{1|{{PAGENAME}}}}}}}}}}}]</span></div></div></includeonly><noinclude>== 用法 == | ||
== 用法 == | |||
<pre>{{接连百度百科|江苏省天一中学}} | <pre>{{接连百度百科|江苏省天一中学}} | ||
{{接连百度百科|江苏省天一中学 | {{接连百度百科|江苏省天一中学|显示文字}}</pre> | ||
模板页只展示明确填写目标的示例,不再链接模板自身名称。未填写参数时,正文中的调用仍默认使用当前词条名。请确认外站目标存在;模板不能自动检测外站红链。 | |||
== 参数 == | |||
* <code>1</code>: 目标词条名;<code>2</code> 为显示文字。 | |||
* <code>text</code>: 可选介绍。 | |||
* <code> | * <code>name</code>: 优先于第一个参数的目标名。<code>id</code>:可选数字消歧 ID,须与目标名同时使用。旧式仅填数字的参数不适用。 | ||
* <code>text</code> | |||
* | |||
== 示例 == | == 示例 == | ||
{{接连百度百科|江苏省天一中学}} | {{接连百度百科|江苏省天一中学}} | ||
<div style="clear:both"></div> | <div style="clear:both"></div> | ||
[https://uncyclopedia.tw/wiki/Template:接連百度百科 排版参考] · [[File:Tyzx external Baidu baike logo.svg|图标来源与权利说明]] | |||
[[lzh:Template:接连百度百科]] | |||
<templatedata>{"description":" | [[en:Template:接连百度百科]] | ||
</noinclude> | [[fr:Template:接连百度百科]] | ||
[[ja:Template:接连百度百科]] | |||
[[ko:Template:接连百度百科]] | |||
<templatedata>{"description": "百度百科 link card", "params": {"1": {"label": "Target / label", "type": "string"}, "2": {"label": "Label / target", "type": "string"}, "text": {"label": "Introduction", "type": "string"}, "name": {"label": "Target title", "type": "string"}, "id": {"label": "Disambiguation ID", "type": "string"}}, "format": "inline"}</templatedata></noinclude> | |||