-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* audio.js v1.0 | https://github.com/xaoxuu/hexo-theme-stellar/ | ||
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来) | ||
* | ||
* {% audio src %} | ||
* | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = ctx => function(args) { | ||
args = ctx.args.map(args, ['type'], ['src']) | ||
if (args.type == null) { | ||
args.type = 'audio/mp3' | ||
} | ||
return ` | ||
<div class="tag-plugin video"> | ||
<audio controls preload> | ||
<source src="${args.src}" type="${args.type}">Your browser does not support the audio tag. | ||
</audio> | ||
</div> | ||
` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* | ||
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来) | ||
* | ||
* {% md [src:url] %} | ||
* {% md src %} | ||
* | ||
*/ | ||
'use strict' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* video.js v1.0 | https://github.com/xaoxuu/hexo-theme-stellar/ | ||
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来) | ||
* | ||
* {% video src %} | ||
* | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = ctx => function(args) { | ||
args = ctx.args.map(args, ['type'], ['src']) | ||
if (args.type == null) { | ||
args.type = 'video/mp4' | ||
} | ||
return ` | ||
<div class="tag-plugin video"> | ||
<video controls preload> | ||
<source src="${args.src}" type="${args.type}">Your browser does not support the video tag. | ||
</video> | ||
</div> | ||
` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
audio,video | ||
border-radius: $border-block | ||
max-width: 100% | ||
video | ||
z-index: 1 | ||
box-shadow: $boxshadow-card-float | ||
.video | ||
line-height: 0 | ||
text-align: center |