Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
change bottomOffset to verticalOffset
Browse files Browse the repository at this point in the history
  • Loading branch information
EYHN committed Nov 3, 2017
1 parent 5fc7796 commit 94560f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var fs = require('hexo-fs');
var nfs = require('fs');
var path = require('path');
var url = require("url");

Expand Down Expand Up @@ -31,14 +30,14 @@ var config = Object.assign( {
mobileHeight: 150,
position: "right",
horizontalOffset: 0,
bottomOffset: -20,
verticalOffset: -20,
className: "live2d",
id: "live2dcanvas",
},
hexo.config.live2d,
hexo.theme.config.live2d
);

hexo.extend.helper.register('live2d', function() {
return `
<div id="hexo-helper-live2d">
Expand Down Expand Up @@ -76,14 +75,15 @@ hexo.extend.helper.register('live2d', function() {
`
});

nfs.exists(path.resolve(process.cwd(), path.join('./live2d_models/', config.model)), function(exists){
fs.exists(path.resolve(process.cwd(), path.join('./live2d_models/', config.model)), function(exists){
if(exists){
registerDir("live2d/assets/", path.resolve(process.cwd(), path.join('./live2d_models/', config.model)));
console.log('Found custom model at: ' & path.resolve(process.cwd(), path.join('./live2d_models/', config.model)));
}else{
registerDir('live2d/assets/', path.resolve(__dirname, path.join('./assets/', config.model)));
}
});

registerFile('live2d/script.js', path.resolve(__dirname, './dist/bundle.js'));
registerFile('live2d/device.min.js', path.resolve(__dirname, './dist/device.min.js'));

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ live2d:
mobileHeight: 150 # The height of your model on mobile devices. default: 75
position: right # Which side the model is shown at. default: right
horizontalOffset: 0 # The horizontal offset. default: 0
bottomOffset: -20 # The offset of the bottom. default: -20
verticalOffset: -20 # The offset of the bottom. default: -20
className: live2d # The class name of the element. default: live2d
id: live2dcanvas # The ID of the live2d element. default: live2dcanvas
```
Expand Down
2 changes: 1 addition & 1 deletion readme.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ live2d:
mobileHeight: 150 # 移动设备上的高度 默认值: 150
position: right # 模型左右侧放置位置 默认值: right
horizontalOffset: 0 # 元素的水平偏移 默认值: 0
bottomOffset: -20 # 元素的底部偏移 默认值: -20
verticalOffset: -20 # 元素的底部偏移 默认值: -20
className: live2d # 元素的类名 默认值: live2d
id: live2dcanvas # 元素的id 默认值: live2dcanvas
```
Expand Down

0 comments on commit 94560f7

Please sign in to comment.