screenshot-api
This commit is contained in:
parent
4ef9a65cd2
commit
f42720e301
|
@ -43,7 +43,7 @@ hexo.extend.tag.register('sites', function(args) {
|
|||
if (site.url && site.title) {
|
||||
var cell = '<div class="site-card">';
|
||||
cell += '<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="' + site.url + '">';
|
||||
cell += '<img src="' + (site.screenshot || ('https://image.thum.io/get/width/1024/crop/768/' + site.url)) + '" onerror="javascript:this.removeAttribute("data-src");this.src="' + hexo.theme.config.default.cover + '";"/>';
|
||||
cell += '<img src="' + (site.screenshot || ('https://screenshot-api.xaoxuu.com/api?url=' + site.url + '&width=1280&height=720')) + '" onerror="javascript:this.removeAttribute("data-src");this.src="' + hexo.theme.config.default.cover + '";"/>';
|
||||
cell += '<div class="info">';
|
||||
cell += '<img src="' + (site.avatar || hexo.theme.config.default.link) + '" onerror="javascript:this.removeAttribute("data-src");this.src="' + hexo.theme.config.default.link + '";"/>';
|
||||
cell += '<span class="title">' + site.title + '</span>';
|
||||
|
|
|
@ -51,7 +51,7 @@ const sitesjs = {
|
|||
arr.forEach((item, i) => {
|
||||
var cell = '<div class="site-card">';
|
||||
cell += '<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="' + item.url + '">';
|
||||
cell += '<img src="' + (item.screenshot || ('https://image.thum.io/get/width/1024/crop/768/' + item.url)) + '" onerror="javascript:this.src=\'' + cfg.screenshot + '\';"/>';
|
||||
cell += '<img src="' + (item.screenshot || ('https://screenshot-api.xaoxuu.com/api?url=' + site.url + '&width=1280&height=720')) + '" onerror="javascript:this.src=\'' + cfg.screenshot + '\';"/>';
|
||||
cell += '<div class="info">';
|
||||
cell += '<img src="' + (item.avatar || cfg.avatar) + '" onerror="javascript:this.src=\'' + cfg.avatar + '\';"/>';
|
||||
cell += '<span class="title">' + item.title + '</span>';
|
||||
|
|
Loading…
Reference in New Issue