• 首页
  • 随机
  • 最近更改
  • 特殊页面
  • 社群首页
  • 设置
  • 关于戏曲百科
  • 免责声明
戏曲百科
  • 登录

模板:Random slideshow

  • 监视
  • 查看源代码
    • 链入页面
    • 固定链接
    • 页面信息
模板文档[查看] [编辑] [历史] [清除缓存]


🪧此模板使用Lua语言:
  • Module:Random slideshow

模板:Notice This template creates a slideshow gallery with a randomised order – i.e. it changes when the page is purged.

目录

  • 1 Usage
    • 1.1 Parameters
  • 2 Examples
    • 2.1 Cats
    • 2.2 Mice

Usage

As many images and captions as desired may be specified, in the following format:

{{Random slideshow 
| First image  | first caption
| second image | second caption
| third image  | third caption
}}

Credits (e.g. "Photograph: Example") may be specified, using the following format

{{Random slideshow 
| First image  | first caption | credit1=
| second image | second caption | credit2=
| third image  | third caption | credit3=
}}

Parameters

|1=, |3=, |5=, ... (or equivalent positional parameters)
File name. The "File:" prefix is optional.
|2=, |4=, |6=, ... (or equivalent positional parameters)
Caption for the file.
|credit1=, |credit2=, |credit3=, ...
Credits for the file. Optional.
|width=
Maximum width for all images; default is 100% (intended for use inside portal components)
Can be specified as a % (e.g. 75%), or in ems (e.g. 30em), or in px (e.g. 200px)
If a unit is not specified, px is assumed (i.e. 350 is equivalent to 350px)
|random=
Set to no or false to turn off the randomisation.

Examples

模板:Purge to see these galleries in a different order

Cats

{{Box-header|title=Selected pictures}}
{{Random slideshow 
| File:Cat playing with a lizard.jpg | Cat playing with a lizard
| Felis silvestris catus lying on rice straw.jpg | Cat lying on rice straw
| Mumbai 03-2016 63 Dhobi Talao Chowk.jpg | Cats in Mumbai
| File:Felis catus-cat on snow.jpg | Cat on snow
| Tired 20-year-old cat.jpg | Tired cat
}}
{{Box-footer}}

模板:Box-header

  • Image 1Cat lying on rice straw
    Image 1Cat lying on rice straw
  • Image 2Cat on snow
    Image 2Cat on snow
  • Image 3Cat playing with a lizard
    Image 3Cat playing with a lizard
  • Image 4Tired cat
    Image 4Tired cat
  • Image 5Cats in Mumbai
    Image 5Cats in Mumbai

模板:Box-footer

Mice

{{Random slideshow | width=275
| File:Agouti Mice.jpg | Two mice | credit1= Photograph: Pogrebnoj-Alexandroff
| Brown mouse.jpg | Brown mouse | credit2= Photograph: [[User:Kulmalukko|Tiia Monto]]
| File:Farbmaeuse.jpg | Mice with food | credit3= Photograph: [[c:User:Whitesky~commonswiki|Whitesky]]
| File:Farbmaus.JPG | Mouse on a wheel | credit2= Photograph: [[de:User:R2Dine|R2Dine]]
| White lab mouse in hand B.jpg | A mouse in the hand is worth two in the bush | credit4= Photograph: Pogrebnoj-Alexandroff
}}
  • Image 1Two mice Photograph: Pogrebnoj-Alexandroff
    Image 1Two mice

    Photograph: Pogrebnoj-Alexandroff

  • Image 2A mouse in the hand is worth two in the bush Photograph: Pogrebnoj-Alexandroff
    Image 2A mouse in the hand is worth two in the bush

    Photograph: Pogrebnoj-Alexandroff

  • Image 3Brown mouse Photograph: Tiia Monto
    Image 3Brown mouse

    Photograph: Tiia Monto

  • Image 4Mouse on a wheel Photograph: R2Dine
    Image 4Mouse on a wheel

    Photograph: R2Dine

  • Image 5Mice with food Photograph: Whitesky
    Image 5Mice with food

    Photograph: Whitesky

模板:Cot

Creates a slideshow gallery with randomized order. Add as many images as desired.

模板参数[编辑模板数据]

此模板首选参数换行的代码块格式。

参数描述类型状态
Image 11 (unnamed positional parameter)

Name of the first image, without prefix

默认值
(empty)
示例值
Portal puzzle.svg, 1=Portal puzzle.svg
文件必需
Caption 12 (unnamed positional parameter)

Caption of the first image

默认值
(empty)
示例值
2=This is the default portal icon
字符串必需
Credit 1credit1

Credit for the first image

示例值
Photograph: [[User:Example|Example]]
未知可选
Widthwidth

Maximum width of all images

默认值
(none)
示例值
width=80px, width=30em, width=50%
数字推荐
Image 23 (unnamed positional parameter

Name of the second image, without prefix

默认值
(empty)
示例值
Brown mouse.jpg, 3=Brown mouse.jpg
文件推荐
Caption 24 (unnamed positional parameter)

Caption of the second image

默认值
(empty)
示例值
4=This is a brown mouse
字符串推荐
Credit 2credit2

Credits for the second image

示例值
Photographer: [[User:Example|Example]]
未知可选

模板:Cob

上述文档嵌入自模板:Random slideshow/doc。 (编辑 | 历史)
编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。
请在/doc子页面中添加分类。 本模板的子页面。
检索自“https://wiki66.com/index.php?title=模板:Random_slideshow&oldid=123645”
分类:​
  • 含有受损文件链接的页面
  • Lua模板
最后编辑于2023年5月24日 (星期三) 21:37

语言

    此页面在其他语言不可用。

    戏曲百科
    • 本页面最后编辑于2023年5月24日 (星期三) 21:37。
    • 错误反馈
    • 关于戏曲百科
    • 免责声明
    • 豫ICP备13003402号-1
    • 桌面版