Difference between revisions of "Template:External image/doc"

From Moegirlpedia
Jump to: navigation, search
m (Parameters)
(Examples)
Line 28: Line 28:
  
 
==Examples==
 
==Examples==
*1 Basic usage本例子用來說明基礎用法
+
*1 Basic usage
*<nowiki>{{Outer image|add=https://i.imgur.com/BrLU94q.png}}</nowiki>
+
*<nowiki>{{External image|add=https://i.imgur.com/BrLU94q.png}}</nowiki>
{{Outer image|add=https://i.imgur.com/BrLU94q.png}}{{-}}
+
{{External image|add=https://i.imgur.com/BrLU94q.png}}{{-}}
*2 本例子用來說明拉伸
+
*2 Stretching
*<nowiki>{{Outer image|地址=https://i.imgur.com/BrLU94q.png|注释=喵喵喵喵|宽度=30px|高度=150px}}</nowiki>
+
*<nowiki>{{External image|add=https://i.imgur.com/BrLU94q.png|cap=喵喵喵喵|w=30px|h=150px}}</nowiki>
{{Outer image|地址=https://i.imgur.com/BrLU94q.png|注释=喵喵喵喵|宽度=30px|高度=150px}}{{-}}
+
{{External image|add=https://i.imgur.com/BrLU94q.png|cap=喵喵喵喵|w=30px|h=150px}}{{-}}
*例3<nowiki>{{Outer image|地址=https://i.imgur.com/BrLU94q.png|注释=喵喵喵喵|对齐=left|宽度=30px}}</nowiki>
+
*3<nowiki>{{External image|add=https://i.imgur.com/BrLU94q.png|cap=喵喵喵喵|align=left|w=30px}}</nowiki>
{{Outer image|地址=https://i.imgur.com/BrLU94q.png|注释=喵喵喵喵|对齐=left|宽度=30px}}{{-}}
+
{{External image|add=https://i.imgur.com/BrLU94q.png|cap=喵喵喵喵|align=left|w=30px}}{{-}}
*例4<nowiki>{{Outer image|地址=https://i.imgur.com/BrLU94q.png|注释=喵喵喵喵|对齐=left|高度=33px}}</nowiki>
+
*4<nowiki>{{External image|add=https://i.imgur.com/BrLU94q.png|cap=喵喵喵喵|align=left|h=33px}}</nowiki>
{{Outer image|地址=https://i.imgur.com/BrLU94q.png|注释=喵喵喵喵喵喵|对齐=left|高度=33px}}{{-}}
+
{{External image|add=https://i.imgur.com/BrLU94q.png|cap=喵喵喵喵喵喵|align=left|h=33px}}{{-}}
  
 
==与[[template:外部图片注释]]的区别==
 
==与[[template:外部图片注释]]的区别==

Revision as of 03:20, 9 September 2017

This template is used for linking external pictures while adding captions and adjusting formats

Usage

{{Outer image|add=|title=|cap=|align=|w=px|h=px}}
{{Outer image|add=|cap=|align=|w=px}}

{{Outer image
|add=
|title=
|cap=
|align=
|w=px
|h=px
}}

Parameters

This template contains 5 parameters:

  • add The address of the picture, replaced by text if it isn't available. The text defaults to An editor forgot to add the address here. Let's hit him. Mandatory.
  • title The infobox that appears when the mouse hovers over the picture. "<" is prohibited. Optional.
  • cap Caption below the picture. Defaults to No captions.Optional.
  • align How the picture aligns in the page. Either left or right. Defaults to right.
  • w Width of the image. Uses the original width if left blank. If not accompanying h then the image is scaled accordingly.
  • h Height of the image. Uses the original height if left blank. If not accompanying w then the image is scaled accordingly.

If parameter w of the image is specified, the template will be limited to the width of the image, causing excess text to automatically start in a new line.Refer to Example 3 below. But using long lines of consecutive Latin characters will render the limit invalid, such as when using a long weblink.

If it is not wished to have the text automatically start in a new line, please scale the picture with the h parameter.

Examples

  • 1 Basic usage
  • {{External image|add=https://i.imgur.com/BrLU94q.png}}
https://i.imgur.com/BrLU94q.png
  • 2 Stretching
  • {{External image|add=https://i.imgur.com/BrLU94q.png|cap=喵喵喵喵|w=30px|h=150px}}
https://i.imgur.com/BrLU94q.png
喵喵喵喵
  • 3{{External image|add=https://i.imgur.com/BrLU94q.png|cap=喵喵喵喵|align=left|w=30px}}
https://i.imgur.com/BrLU94q.png
喵喵喵喵
  • 4{{External image|add=https://i.imgur.com/BrLU94q.png|cap=喵喵喵喵|align=left|h=33px}}
https://i.imgur.com/BrLU94q.png
喵喵喵喵喵喵

template:外部图片注释的区别

  1. 本模板中引入的图片不独占行,更适合用于条目中插图。
  2. 本模板采用命名参数方式,能避免带有某些特殊符号的图片地址或图片注释调用出错。
  3. 本模板可以对图片进行拉伸变形。

参见