diff --git a/package.json b/package.json index 2ec0ed4..0dc250b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-butterfly", - "version": "3.7.0-b7", + "version": "3.7.0-b8", "description": "A Simple and Card UI Design theme for Hexo", "main": "package.json", "scripts": { diff --git a/scripts/tag/inlineImg.js b/scripts/tag/inlineImg.js new file mode 100644 index 0000000..9bcbfdb --- /dev/null +++ b/scripts/tag/inlineImg.js @@ -0,0 +1,17 @@ +/** + * inlineImg 圖片 + * {% inlineImg src height %} + */ + +'use strict' + +const urlFor = require('hexo-util').url_for.bind(hexo) + +function inlineImg (args) { + const img = args[0] + const height = args[1] ? `style="height:${args[1]}"` : '' + + return `` +} + +hexo.extend.tag.register('inlineImg', inlineImg, { ends: false }) diff --git a/source/css/_tags/inlineImg.styl b/source/css/_tags/inlineImg.styl new file mode 100644 index 0000000..c8bb0c1 --- /dev/null +++ b/source/css/_tags/inlineImg.styl @@ -0,0 +1,6 @@ +#article-container + .inline-img + display: inline + margin: 0 3px + height: 1.1em + vertical-align: text-bottom \ No newline at end of file