Difference between revisions of "Template:Bilibili"

From Team Fortress Wiki
Jump to: navigation, search
m
m (danmaku)
Line 1: Line 1:
<div class="youtubebox ratio-{{{ratio|16x9}}} widths-{{{width|512}}}}}}" style="margin:0.75em 0em;">
+
<div class="youtubebox ratio-{{{ratio|16x9}}} widths-{{{width|512}}}" style="margin:0.75em 0em;">{{#if: {{{align|}}}|<div class="embedvideo autoResize" style="text-align: {{{align}}}"><div class="embedvideowrap bilibili-video" data-vbvid="{{{1|}}}" data-vdanmaku="{{{danmaku|0}}}" data-vwidth="{{{width|640}}}" data-vheight="{{{height|360}}}">|<div class="embedvideo autoResize"><div class="embedvideowrap bilibili-video" data-vbvid="{{{1|}}}" data-vdanmaku="{{{danmaku|0}}}" data-vwidth="{{{width|640}}}" data-vheight="{{{height|360}}}">}}</div>{{#if:{{{2|<noinclude>yes</noinclude>}}}| <br /><div>{{hatnote|1={{{2|Caption here.}}}}}</div></div>
{{#if: {{{align|}}}|<div class="embedvideo autoResize" style="text-align: {{{align}}}"><div class="embedvideowrap bilibili-video" data-vbvid="{{{1|}}}" data-vwidth="{{{width|512}}}" data-vheight="{{{height|360}}}">></div></div>|<div class="embedvideo autoResize"><div class="embedvideowrap bilibili-video" data-vbvid="{{{1|}}}" data-vwidth="{{{width|512}}}" data-vheight="{{{height|360}}}">}}</div></div>{{#if:{{{2|<noinclude>yes</noinclude>}}}
 
| <br /><div style="margin-top:0.75em;">{{hatnote|1={{{2|Caption here.}}}}}</div>
 
 
}}</div><noinclude>{{Doc begin}}
 
}}</div><noinclude>{{Doc begin}}
 +
This template will embed a Bilibili video inside an article.
  
This template will embed a video inside an article.
+
=== Usage ===
 +
* <code><nowiki>{{bilibili|Bilibili id}}</nowiki></code> produces: {{bilibili|bv1mQ4y1M7Cn}}
 +
* <code><nowiki>{{bilibili|Bilibili id|Caption here.|width=value|height=value|align=alignment}}</nowiki></code> produces: {{bilibili|BV15W411T7En|Ready Up: Competitive Team Fortress 2 Documentary|width=512|height=320|align=center}}
 +
* <code><nowiki>{{bilibili|Bilibili id|danmaku=1}}</nowiki></code> produces: {{bilibili|BV1bE411V7UT|danmaku=1}}
  
=== Syntax ===
+
=== Parameters ===
Basic:
+
; Bilibili bvid (required): The Bilibili video id of the video to include.
<nowiki>{{bilibili|Bilibili bvid}}</nowiki>
+
; {{code|Caption}}: Custom caption to include.
 
+
; {{code|width}}: Width of the video, in pixels. Default is 640px.
With a defined thumbnail width:
+
; {{code|height}}: Height of the video, in pixels. Default is 360px.
<nowiki>{{bilibili|Bilibili bvid|width=value|align=alignment}}</nowiki>
+
; {{code|align}}: Horizontal alignment of video. Default is left.
 
+
; {{code|danmaku}}: Bullet screen/danmaku subtitles. Default is 0 (disabled).
;Bilibili bvid: The Bilibili video id of the video to include.
 
;{{code|width}}: Width of the video, in pixels. Default is 512px.
 
;{{code|height}}: Height of the video, in pixels. Default is 360px.
 
;{{code|align}}: Horizontal alignment of video. Default is left.
 
  
 
=== See also ===
 
=== See also ===

Revision as of 01:15, 7 April 2020


Caption here.

Documentation for Bilibili

This template will embed a Bilibili video inside an article.

Usage

  • {{bilibili|Bilibili id}} produces:
    <div class="embedvideowrap bilibili-video" data-vaid="Expression error: Unrecognized word "bv"." data-vdanmaku="0" data-vpage="1" data-vwidth="640" data-vheight="360">
  • {{bilibili|Bilibili id|Caption here.|width=value|height=value|align=alignment}} produces:
    <div class="embedvideowrap bilibili-video" data-vaid="Expression error: Unrecognized word "bv"." data-vdanmaku="0" data-vpage="1" data-vwidth="512" data-vheight="320" style="text-align: center">

    Ready Up: Competitive Team Fortress 2 Documentary
  • {{bilibili|Bilibili id|danmaku=1}} produces:
    <div class="embedvideowrap bilibili-video" data-vaid="Expression error: Unrecognized word "bv"." data-vdanmaku="1" data-vpage="1" data-vwidth="640" data-vheight="360">
  • Parameters

    Bilibili bvid (required)
    The Bilibili video id of the video to include.
    Caption
    Custom caption to include.
    width
    Width of the video, in pixels. Default is 640px.
    height
    Height of the video, in pixels. Default is 360px.
    align
    Horizontal alignment of video. Default is left.
    danmaku
    Bullet screen/danmaku subtitles. Default is 0 (disabled).

    See also