mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
🎉 Feat: add douyin shortcode support
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
.douyin {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
padding-bottom: 60.725%;
|
||||
margin: 3% auto;
|
||||
text-align: center;
|
||||
|
||||
iframe {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
@import '_admonition';
|
||||
@import '_bilibili';
|
||||
@import '_douyin';
|
||||
@import '_cardlink';
|
||||
@import '_center-quote';
|
||||
@import '_echarts';
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{{- /* reference https://developer.open-douyin.com/docs/resource/zh-CN/dop/develop/openapi/video-management/douyin/iframe-player/get-iframe-by-video */ -}}
|
||||
{{- $id := cond .IsNamedParams (.Get "id") (.Get 0) -}}
|
||||
|
||||
<div class="douyin">
|
||||
<iframe src="//open.douyin.com/player/video?vid={{ $id }}&autoplay=0" border="0" framespacing="0" allowfullscreen="true"></iframe>
|
||||
</div>
|
||||
{{- /* EOF */ -}}
|
||||
Reference in New Issue
Block a user