This commit is contained in:
haoouba 2021-02-10 11:39:20 +08:00
parent 136720167e
commit fb0d916901
18 changed files with 34 additions and 40 deletions

View File

@ -36,7 +36,7 @@
<li class="joe_list__item wow"> <li class="joe_list__item wow">
<div class="line"></div> <div class="line"></div>
<a href="<?php $this->permalink() ?>" class="thumbnail" title="<?php $this->title() ?>"> <a href="<?php $this->permalink() ?>" class="thumbnail" title="<?php $this->title() ?>">
<img onerror="javascript: this.src='<?php _getLazyload() ?>';" class="lazyload" src="<?php _getLazyload() ?>" data-original="<?php _getThumbnail($this) ?>" alt="<?php $this->title() ?>" /> <img class="lazyload" src="<?php _getLazyload() ?>" data-src="<?php _getThumbnail($this) ?>" onerror="javascript: this.src='<?php _getLazyload() ?>';" alt="<?php $this->title() ?>" />
<time datetime="<?php $this->date('Y-m-d'); ?>"><?php $this->date('Y-m-d'); ?></time> <time datetime="<?php $this->date('Y-m-d'); ?>"><?php $this->date('Y-m-d'); ?></time>
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20"> <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20">
<path d="M903.93077753 107.30625876H115.78633587C64.57261118 107.30625876 22.58166006 149.81138495 22.58166006 201.02510964v624.26547214c0 51.7240923 41.99095114 93.71694641 93.71694641 93.7169464h788.14444164c51.7202834 0 93.71694641-41.99285557 93.71694642-93.7169464v-624.26547214c-0.51227057-51.21372469-43.01739676-93.71885088-94.229217-93.71885088zM115.78633587 171.8333054h788.65671224c16.385041 0 29.70407483 13.31522639 29.70407484 29.70407482v390.22828696l-173.60830179-189.48107072c-12.80486025-13.82749697-30.21634542-21.50774542-48.14010264-19.97093513-17.92375723 1.02073227-34.82106734 10.75387344-46.60138495 26.11437327l-172.58185762 239.1598896-87.06123767-85.52061846c-12.28878076-11.78222353-27.65308802-17.92375723-44.03812902-17.92375577-16.3907529 0.50846167-31.75506163 7.67644101-43.52966736 20.48129978L86.59453164 821.70468765V202.04965083c-1.02454117-17.41529409 12.80486025-30.73052046 29.19180423-30.21634543zM903.93077753 855.50692718H141.90642105l222.25496164-245.81940722 87.0593347 86.03669649c12.80105134 12.80676323 30.21253651 18.95020139 47.11555999 17.4172 17.40958218-1.53871621 33.79652618-11.26614404 45.06267018-26.11818071l172.58376063-238.64762047 216.11152349 236.08817198 2.05098681-1.54062067v142.87778132c0.50846167 16.3907529-13.31522639 29.70597929-30.21444096 29.70597928z m0 0" p-id="1916"></path> <path d="M903.93077753 107.30625876H115.78633587C64.57261118 107.30625876 22.58166006 149.81138495 22.58166006 201.02510964v624.26547214c0 51.7240923 41.99095114 93.71694641 93.71694641 93.7169464h788.14444164c51.7202834 0 93.71694641-41.99285557 93.71694642-93.7169464v-624.26547214c-0.51227057-51.21372469-43.01739676-93.71885088-94.229217-93.71885088zM115.78633587 171.8333054h788.65671224c16.385041 0 29.70407483 13.31522639 29.70407484 29.70407482v390.22828696l-173.60830179-189.48107072c-12.80486025-13.82749697-30.21634542-21.50774542-48.14010264-19.97093513-17.92375723 1.02073227-34.82106734 10.75387344-46.60138495 26.11437327l-172.58185762 239.1598896-87.06123767-85.52061846c-12.28878076-11.78222353-27.65308802-17.92375723-44.03812902-17.92375577-16.3907529 0.50846167-31.75506163 7.67644101-43.52966736 20.48129978L86.59453164 821.70468765V202.04965083c-1.02454117-17.41529409 12.80486025-30.73052046 29.19180423-30.21634543zM903.93077753 855.50692718H141.90642105l222.25496164-245.81940722 87.0593347 86.03669649c12.80105134 12.80676323 30.21253651 18.95020139 47.11555999 17.4172 17.40958218-1.53871621 33.79652618-11.26614404 45.06267018-26.11818071l172.58376063-238.64762047 216.11152349 236.08817198 2.05098681-1.54062067v142.87778132c0.50846167 16.3907529-13.31522639 29.70597929-30.21444096 29.70597928z m0 0" p-id="1916"></path>

View File

@ -344,7 +344,4 @@ document.addEventListener('DOMContentLoaded', () => {
}); });
} }
} }
/* 懒加载 */
new LazyLoad('.lazyload');
}); });

View File

@ -49,7 +49,7 @@ document.addEventListener('DOMContentLoaded', () => {
<li class="joe_list__item wow"> <li class="joe_list__item wow">
<div class="line"></div> <div class="line"></div>
<a href="${_.permalink}" class="thumbnail" title="${_.title}"> <a href="${_.permalink}" class="thumbnail" title="${_.title}">
<img onerror="javascript: this.src='${_.lazyload}';" class="list_lazyload" src="${_.lazyload}" data-original="${_.image}" alt="${_.title}" /> <img class="lazyload" src="${_.lazyload}" data-src="${_.image}" onerror="javascript: this.src='${_.lazyload}';" alt="${_.title}" />
<time datetime="${_.time}">${_.time}</time> <time datetime="${_.time}">${_.time}</time>
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20"> <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20">
<path d="M903.93077753 107.30625876H115.78633587C64.57261118 107.30625876 22.58166006 149.81138495 22.58166006 201.02510964v624.26547214c0 51.7240923 41.99095114 93.71694641 93.71694641 93.7169464h788.14444164c51.7202834 0 93.71694641-41.99285557 93.71694642-93.7169464v-624.26547214c-0.51227057-51.21372469-43.01739676-93.71885088-94.229217-93.71885088zM115.78633587 171.8333054h788.65671224c16.385041 0 29.70407483 13.31522639 29.70407484 29.70407482v390.22828696l-173.60830179-189.48107072c-12.80486025-13.82749697-30.21634542-21.50774542-48.14010264-19.97093513-17.92375723 1.02073227-34.82106734 10.75387344-46.60138495 26.11437327l-172.58185762 239.1598896-87.06123767-85.52061846c-12.28878076-11.78222353-27.65308802-17.92375723-44.03812902-17.92375577-16.3907529 0.50846167-31.75506163 7.67644101-43.52966736 20.48129978L86.59453164 821.70468765V202.04965083c-1.02454117-17.41529409 12.80486025-30.73052046 29.19180423-30.21634543zM903.93077753 855.50692718H141.90642105l222.25496164-245.81940722 87.0593347 86.03669649c12.80105134 12.80676323 30.21253651 18.95020139 47.11555999 17.4172 17.40958218-1.53871621 33.79652618-11.26614404 45.06267018-26.11818071l172.58376063-238.64762047 216.11152349 236.08817198 2.05098681-1.54062067v142.87778132c0.50846167 16.3907529-13.31522639 29.70597929-30.21444096 29.70597928z m0 0" p-id="1916"></path> <path d="M903.93077753 107.30625876H115.78633587C64.57261118 107.30625876 22.58166006 149.81138495 22.58166006 201.02510964v624.26547214c0 51.7240923 41.99095114 93.71694641 93.71694641 93.7169464h788.14444164c51.7202834 0 93.71694641-41.99285557 93.71694642-93.7169464v-624.26547214c-0.51227057-51.21372469-43.01739676-93.71885088-94.229217-93.71885088zM115.78633587 171.8333054h788.65671224c16.385041 0 29.70407483 13.31522639 29.70407484 29.70407482v390.22828696l-173.60830179-189.48107072c-12.80486025-13.82749697-30.21634542-21.50774542-48.14010264-19.97093513-17.92375723 1.02073227-34.82106734 10.75387344-46.60138495 26.11437327l-172.58185762 239.1598896-87.06123767-85.52061846c-12.28878076-11.78222353-27.65308802-17.92375723-44.03812902-17.92375577-16.3907529 0.50846167-31.75506163 7.67644101-43.52966736 20.48129978L86.59453164 821.70468765V202.04965083c-1.02454117-17.41529409 12.80486025-30.73052046 29.19180423-30.21634543zM903.93077753 855.50692718H141.90642105l222.25496164-245.81940722 87.0593347 86.03669649c12.80105134 12.80676323 30.21253651 18.95020139 47.11555999 17.4172 17.40958218-1.53871621 33.79652618-11.26614404 45.06267018-26.11818071l172.58376063-238.64762047 216.11152349 236.08817198 2.05098681-1.54062067v142.87778132c0.50846167 16.3907529-13.31522639 29.70597929-30.21444096 29.70597928z m0 0" p-id="1916"></path>
@ -83,7 +83,6 @@ document.addEventListener('DOMContentLoaded', () => {
$('.joe_load').removeAttr('loading'); $('.joe_load').removeAttr('loading');
$('.joe_load').html('查看更多'); $('.joe_load').html('查看更多');
$('.joe_index__list .joe_list__loading').hide(); $('.joe_index__list .joe_list__loading').hide();
new LazyLoad('.list_lazyload');
reslove(res.data.length > 0 ? res.data.length - 1 : 0); reslove(res.data.length > 0 ? res.data.length - 1 : 0);
} }
}); });

View File

@ -25,7 +25,7 @@ document.addEventListener('DOMContentLoaded', () => {
renderLiveType(); renderLiveType();
function renderLiveType() { function renderLiveType() {
$.ajax({ $.ajax({
url: '/usr/themes/joe/assets/json/joe.live.json', url: '/usr/themes/Joe/assets/json/joe.live.json',
success(res) { success(res) {
const item = res[queryData.index]; const item = res[queryData.index];
$('.joe_live__type-title .text').html(item.name); $('.joe_live__type-title .text').html(item.name);
@ -55,14 +55,14 @@ document.addEventListener('DOMContentLoaded', () => {
<a target="_blank" rel="noopener noreferrer nofollow" class="joe_live__list-item animated bounceIn" href="${window.location.href + '?profileRoom=' + _.profileRoom + '&title=' + _.nick}"> <a target="_blank" rel="noopener noreferrer nofollow" class="joe_live__list-item animated bounceIn" href="${window.location.href + '?profileRoom=' + _.profileRoom + '&title=' + _.nick}">
<div class="thumb"> <div class="thumb">
<i class="recommendTagName" style="display: ${_.recommendTagName ? '' : 'none'}">${_.recommendTagName}</i> <i class="recommendTagName" style="display: ${_.recommendTagName ? '' : 'none'}">${_.recommendTagName}</i>
<img class="screenshot screenshot_lazyload" onerror="javascript: this.src = '${Joe.LAZY_LOAD}';" src="${Joe.LAZY_LOAD}" data-original="${_.screenshot}" alt="${_.introduction}" /> <img class="screenshot lazyload" src="${Joe.LAZY_LOAD}" data-src="${_.screenshot}" onerror="javascript: this.src = '${Joe.LAZY_LOAD}';" alt="${_.introduction}" />
</div> </div>
<div class="description"> <div class="description">
<div class="avatar"> <div class="avatar">
<svg class="icon" viewBox="0 0 76 31" version="1.1" xmlns="http://www.w3.org/2000/svg"> <svg class="icon" viewBox="0 0 76 31" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path d="M57.7,11.4c-1.4-1.4-2.7-2.9-4.1-4.4c-0.2-0.3-0.5-0.5-0.8-0.8c-0.2-0.2-0.3-0.3-0.5-0.5l0,0C48.6,2.2,43.5,0,38,0S27.4,2.2,23.6,5.7l0,0c-0.2,0.2-0.3,0.3-0.5,0.5c-0.3,0.3-0.5,0.5-0.8,0.8c-1.4,1.5-2.7,3-4.1,4.4c-5,5.1-11.7,6.1-18.3,6.3V31h9.4h8.9h39.4h4.9H76V17.6C69.4,17.4,62.7,16.5,57.7,11.4z"></path> <path d="M57.7,11.4c-1.4-1.4-2.7-2.9-4.1-4.4c-0.2-0.3-0.5-0.5-0.8-0.8c-0.2-0.2-0.3-0.3-0.5-0.5l0,0C48.6,2.2,43.5,0,38,0S27.4,2.2,23.6,5.7l0,0c-0.2,0.2-0.3,0.3-0.5,0.5c-0.3,0.3-0.5,0.5-0.8,0.8c-1.4,1.5-2.7,3-4.1,4.4c-5,5.1-11.7,6.1-18.3,6.3V31h9.4h8.9h39.4h4.9H76V17.6C69.4,17.4,62.7,16.5,57.7,11.4z"></path>
</svg> </svg>
<img src="${_.avatar180}" alt="${_.nick}"/> <img class="lazyload" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="${_.avatar180}" onerror="javascript: this.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';" alt="${_.nick}"/>
</div> </div>
<div class="nick">${_.nick}</div> <div class="nick">${_.nick}</div>
<p class="introduction">${_.introduction}</p> <p class="introduction">${_.introduction}</p>
@ -78,7 +78,6 @@ document.addEventListener('DOMContentLoaded', () => {
`; `;
}); });
$('.joe_live__list').html(htmlStr); $('.joe_live__list').html(htmlStr);
new LazyLoad('.screenshot_lazyload');
queryData.totalPage = res.data.totalPage; queryData.totalPage = res.data.totalPage;
initPagination(); initPagination();
}, },

View File

@ -52,13 +52,12 @@ document.addEventListener('DOMContentLoaded', () => {
<a class="item animated bounceIn" href="${window.location.href + '?vod_id=' + _.vod_id}" target="_blank" rel="noopener noreferrer nofollow"> <a class="item animated bounceIn" href="${window.location.href + '?vod_id=' + _.vod_id}" target="_blank" rel="noopener noreferrer nofollow">
<i class="year" style="display: ${_.vod_year && _.vod_year != 0 ? 'block' : 'none'}">${_.vod_year}</i> <i class="year" style="display: ${_.vod_year && _.vod_year != 0 ? 'block' : 'none'}">${_.vod_year}</i>
<div class="thumb"> <div class="thumb">
<img onerror="javascript: this.src = '${Joe.LAZY_LOAD}'" class="pic video_lazyload" src="${Joe.LAZY_LOAD}" data-original="${_.vod_pic}" alt="${_.vod_name}"> <img class="pic lazyload" src="${Joe.LAZY_LOAD}" data-src="${_.vod_pic}" onerror="javascript: this.src = '${Joe.LAZY_LOAD}'" alt="${_.vod_name}">
</div> </div>
<p class="title">${_.vod_name}</p> <p class="title">${_.vod_name}</p>
</a>`; </a>`;
}); });
$('.joe_video__list-item').html(htmlStr); $('.joe_video__list-item').html(htmlStr);
new LazyLoad('.video_lazyload');
} }
pagecount = res.data.pagecount; pagecount = res.data.pagecount;
initPagination(); initPagination();
@ -131,7 +130,7 @@ document.addEventListener('DOMContentLoaded', () => {
/* 设置视频详情 */ /* 设置视频详情 */
$('.joe_video__detail-info').html(` $('.joe_video__detail-info').html(`
<div class="thumbnail"> <div class="thumbnail">
<img class="pic video_lazyload" onerror="javascript: this.src = '${Joe.LAZY_LOAD}'" src="${Joe.LAZY_LOAD}" data-original="${item.vod_pic}" alt="${item.vod_name}"> <img class="pic lazyload" src="${Joe.LAZY_LOAD}" data-src="${item.vod_pic}" onerror="javascript: this.src = '${Joe.LAZY_LOAD}'" alt="${item.vod_name}">
<i class="year" style="display: ${item.vod_year && item.vod_year != 0 ? 'block' : 'none'}">${item.vod_year}</i> <i class="year" style="display: ${item.vod_year && item.vod_year != 0 ? 'block' : 'none'}">${item.vod_year}</i>
</div> </div>
<dl class="description"> <dl class="description">
@ -142,7 +141,6 @@ document.addEventListener('DOMContentLoaded', () => {
<dd><span class="muted">简介</span><p class="text">${getContent(item)}</p></dd> <dd><span class="muted">简介</span><p class="text">${getContent(item)}</p></dd>
</dl> </dl>
`); `);
new LazyLoad('.video_lazyload');
/* 设置视频播放标题 */ /* 设置视频播放标题 */
$('.joe_video__player .joe_video__contain-title').html('正在播放:' + item.vod_name); $('.joe_video__player .joe_video__contain-title').html('正在播放:' + item.vod_name);
/* 设置播放链接 */ /* 设置播放链接 */

View File

@ -40,10 +40,12 @@ document.addEventListener('DOMContentLoaded', () => {
if (res.code !== 1) return; if (res.code !== 1) return;
let htmlStr = ''; let htmlStr = '';
res.data.forEach(_ => { res.data.forEach(_ => {
htmlStr += `<a class="item animated bounceIn" data-fancybox="gallery" href="${_.url}"><img onerror="javascript: this.src = '${Joe.LAZY_LOAD}'" class="wallpaper_lazyload" src="${Joe.LAZY_LOAD}" data-original="${_.img_1024_768 || _.url}" alt="壁纸"></a>`; htmlStr += `
<a class="item animated bounceIn" data-fancybox="gallery" href="${_.url}">
<img class="lazyload" src="${Joe.LAZY_LOAD}" data-src="${_.img_1024_768 || _.url}" onerror="javascript: this.src = '${Joe.LAZY_LOAD}'" alt="壁纸">
</a>`;
}); });
$('.joe_wallpaper__list').html(htmlStr); $('.joe_wallpaper__list').html(htmlStr);
new LazyLoad('.wallpaper_lazyload');
total = res.total; total = res.total;
initPagination(); initPagination();
}, },

View File

@ -7,7 +7,7 @@ require_once('short.php');
function _parseCommentReply($text) function _parseCommentReply($text)
{ {
$text = _parseReply($text); $text = _parseReply($text);
$text = preg_replace('/\{!{(.*?)\}!}/', '<img src="$1" class="draw_image" alt="画图"/>', $text); $text = preg_replace('/\{!{(.*?)\}!}/', '<img class="lazyload draw_image" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="$1" onerror="javascript: this.src=\'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\';" alt="画图"/>', $text);
echo $text; echo $text;
} }
@ -17,14 +17,14 @@ function _parseReply($text)
$text = preg_replace_callback( $text = preg_replace_callback(
'/\:\:\(\s*(呵呵|哈哈|吐舌|太开心|笑眼|花心|小乖|乖|捂嘴笑|滑稽|你懂的|不高兴|怒|汗|黑线|泪|真棒|喷|惊哭|阴险|鄙视|酷|啊|狂汗|what|疑问|酸爽|呀咩爹|委屈|惊讶|睡觉|笑尿|挖鼻|吐|犀利|小红脸|懒得理|勉强|爱心|心碎|玫瑰|礼物|彩虹|太阳|星星月亮|钱币|茶杯|蛋糕|大拇指|胜利|haha|OK|沙发|手纸|香蕉|便便|药丸|红领巾|蜡烛|音乐|灯泡|开心|钱|咦|呼|冷|生气|弱|吐血)\s*\)/is', '/\:\:\(\s*(呵呵|哈哈|吐舌|太开心|笑眼|花心|小乖|乖|捂嘴笑|滑稽|你懂的|不高兴|怒|汗|黑线|泪|真棒|喷|惊哭|阴险|鄙视|酷|啊|狂汗|what|疑问|酸爽|呀咩爹|委屈|惊讶|睡觉|笑尿|挖鼻|吐|犀利|小红脸|懒得理|勉强|爱心|心碎|玫瑰|礼物|彩虹|太阳|星星月亮|钱币|茶杯|蛋糕|大拇指|胜利|haha|OK|沙发|手纸|香蕉|便便|药丸|红领巾|蜡烛|音乐|灯泡|开心|钱|咦|呼|冷|生气|弱|吐血)\s*\)/is',
function ($match) { function ($match) {
return '<img class="owo_image" alt="表情" src="/usr/themes/joe/assets/owo/paopao/' . str_replace('%', '', urlencode($match[1])) . '_2x.png" />'; return '<img class="owo_image lazyload" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="/usr/themes/Joe/assets/owo/paopao/' . str_replace('%', '', urlencode($match[1])) . '_2x.png" onerror="javascript: this.src=\'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\';" alt="表情"/>';
}, },
$text $text
); );
$text = preg_replace_callback( $text = preg_replace_callback(
'/\:\@\(\s*(高兴|小怒|脸红|内伤|装大款|赞一个|害羞|汗|吐血倒地|深思|不高兴|无语|亲亲|口水|尴尬|中指|想一想|哭泣|便便|献花|皱眉|傻笑|狂汗|吐|喷水|看不见|鼓掌|阴暗|长草|献黄瓜|邪恶|期待|得意|吐舌|喷血|无所谓|观察|暗地观察|肿包|中枪|大囧|呲牙|抠鼻|不说话|咽气|欢呼|锁眉|蜡烛|坐等|击掌|惊喜|喜极而泣|抽烟|不出所料|愤怒|无奈|黑线|投降|看热闹|扇耳光|小眼睛|中刀)\s*\)/is', '/\:\@\(\s*(高兴|小怒|脸红|内伤|装大款|赞一个|害羞|汗|吐血倒地|深思|不高兴|无语|亲亲|口水|尴尬|中指|想一想|哭泣|便便|献花|皱眉|傻笑|狂汗|吐|喷水|看不见|鼓掌|阴暗|长草|献黄瓜|邪恶|期待|得意|吐舌|喷血|无所谓|观察|暗地观察|肿包|中枪|大囧|呲牙|抠鼻|不说话|咽气|欢呼|锁眉|蜡烛|坐等|击掌|惊喜|喜极而泣|抽烟|不出所料|愤怒|无奈|黑线|投降|看热闹|扇耳光|小眼睛|中刀)\s*\)/is',
function ($match) { function ($match) {
return '<img class="owo_image" alt="表情" src="/usr/themes/joe/assets/owo/aru/' . str_replace('%', '', urlencode($match[1])) . '_2x.png">'; return '<img class="owo_image lazyload" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="/usr/themes/Joe/assets/owo/aru/' . str_replace('%', '', urlencode($match[1])) . '_2x.png" onerror="javascript: this.src=\'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\';" alt="表情"/>';
}, },
$text $text
); );

View File

@ -17,7 +17,7 @@ function _parseContent($post, $login)
if (preg_match('/\{music-list\s{0,}id="\d{0,}"\s{0,}\/\}/SU', $content)) { if (preg_match('/\{music-list\s{0,}id="\d{0,}"\s{0,}\/\}/SU', $content)) {
$content = preg_replace( $content = preg_replace(
'/\{music-list\s{0,}id="(\d{0,})"\s{0,}\/\}/SU', '/\{music-list\s{0,}id="(\d{0,})"\s{0,}\/\}/SU',
'<iframe width="330" height="450" src="//music.163.com/outchain/player?type=0&id=$1&auto=0&height=430"></iframe>', '<iframe class="lazyload" data-src="//music.163.com/outchain/player?type=0&id=$1&auto=0&height=430" width="330" height="450"></iframe>',
$content $content
); );
} }
@ -25,16 +25,16 @@ function _parseContent($post, $login)
if (preg_match('/\{music\s{0,}id="\d{0,}"\s{0,}\/\}/SU', $content)) { if (preg_match('/\{music\s{0,}id="\d{0,}"\s{0,}\/\}/SU', $content)) {
$content = preg_replace( $content = preg_replace(
'/\{music\s{0,}id="(\d{0,})"\s{0,}\/\}/SU', '/\{music\s{0,}id="(\d{0,})"\s{0,}\/\}/SU',
'<iframe width="330" height="86" src="//music.163.com/outchain/player?type=2&id=$1&auto=0&height=66"></iframe>', '<iframe class="lazyload" data-src="//music.163.com/outchain/player?type=2&id=$1&auto=0&height=66" width="330" height="86"></iframe>',
$content $content
); );
} }
/* 过滤dplayer播放器 */ /* 过滤dplayer播放器 */
if (preg_match('/\{dplayer\s{0,}src=".{0,}"\s{0,}\/\}/sSU', $content)) { if (preg_match('/\{dplayer\s{0,}src=".{0,}"\s{0,}\/\}/sSU', $content)) {
$player = Helper::options()->JCustomPlayer ? Helper::options()->JCustomPlayer : '/usr/themes/joe/library/player.php?url='; $player = Helper::options()->JCustomPlayer ? Helper::options()->JCustomPlayer : '/usr/themes/Joe/library/player.php?url=';
$content = preg_replace( $content = preg_replace(
'/\{dplayer\s{0,}src="(.{0,})"\s{0,}\/\}/sSU', '/\{dplayer\s{0,}src="(.{0,})"\s{0,}\/\}/sSU',
'<iframe class="joe_detail__article-player block" allowfullscreen="true" src="' . $player . '$1"></iframe>', '<iframe class="joe_detail__article-player block lazyload" allowfullscreen="true" data-src="' . $player . '$1"></iframe>',
$content $content
); );
} }
@ -42,7 +42,7 @@ function _parseContent($post, $login)
if (preg_match('/\{bilibili\s{0,}bvid="\w{0,}"\s{0,}\/\}/sSU', $content)) { if (preg_match('/\{bilibili\s{0,}bvid="\w{0,}"\s{0,}\/\}/sSU', $content)) {
$content = preg_replace( $content = preg_replace(
'/\{bilibili\s{0,}bvid="(\w{0,})"\s{0,}\/\}/sSU', '/\{bilibili\s{0,}bvid="(\w{0,})"\s{0,}\/\}/sSU',
'<iframe class="joe_detail__article-player block" allowfullscreen="true" src="//player.bilibili.com/player.html?bvid=$1"></iframe>', '<iframe class="joe_detail__article-player block lazyload" allowfullscreen="true" data-src="//player.bilibili.com/player.html?bvid=$1"></iframe>',
$content $content
); );
} }

View File

@ -93,7 +93,7 @@
<span class="title"><?php echo $item['name']; ?></span> <span class="title"><?php echo $item['name']; ?></span>
<div class="content"> <div class="content">
<div class="desc"><?php echo $item['desc']; ?></div> <div class="desc"><?php echo $item['desc']; ?></div>
<img class="avatar lazyload" src="<?php _getAvatarLazyload(); ?>" onerror="javascript: this.src = '<?php _getAvatarLazyload(); ?>'" data-original="<?php echo $item['avatar']; ?>" alt="<?php echo $item['name']; ?>" /> <img class="avatar lazyload" src="<?php _getAvatarLazyload(); ?>" data-src="<?php echo $item['avatar']; ?>" onerror="javascript: this.src = '<?php _getAvatarLazyload(); ?>'" alt="<?php echo $item['name']; ?>" />
</div> </div>
</a> </a>
</li> </li>

View File

@ -57,7 +57,7 @@
<?php foreach ($carousel as $item) : ?> <?php foreach ($carousel as $item) : ?>
<div class="swiper-slide"> <div class="swiper-slide">
<a class="item" href="<?php echo $item['url'] ?>" target="_blank" rel="noopener noreferrer nofollow"> <a class="item" href="<?php echo $item['url'] ?>" target="_blank" rel="noopener noreferrer nofollow">
<img class="thumbnail" onerror="javascript: this.src='<?php _getLazyload() ?>';" src="<?php echo $item['img'] ?>" alt="<?php echo $item['title'] ?>" width="100%" height="100%" /> <img class="thumbnail lazyload" src="<?php _getLazyload() ?>" data-src="<?php echo $item['img'] ?>" onerror="javascript: this.src='<?php _getLazyload() ?>';" alt="<?php echo $item['title'] ?>" width="100%" height="100%" />
<div class="title"><?php echo $item['title'] ?></div> <div class="title"><?php echo $item['title'] ?></div>
<svg class="icon" viewBox="0 0 1026 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="18" height="18"> <svg class="icon" viewBox="0 0 1026 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="18" height="18">
<path d="M784.299475 1007.961156a33.200407 33.200407 0 0 1-27.105646-9.061947l-216.524395-144.349597-108.903751 108.262198c-9.061947 9.061947-36.167593 18.0437-45.229541 9.061947a49.720417 49.720417 0 0 1-27.105646-45.229541v-198.881666A33.200407 33.200407 0 0 1 368.893414 700.656903l343.070875-370.577492a44.748375 44.748375 0 0 1 63.273239 63.27324L441.068212 754.868196v72.174799l63.27324-54.211293a42.583131 42.583131 0 0 1 54.211293-9.061947L757.193829 890.155846l153.652126-749.81596-759.198684 370.497298 171.695826 108.50278c18.0437 9.061947 27.105646 45.22954 9.061946 63.27324-9.061947 18.0437-45.22954 27.105646-63.273239 18.043699L34.082544 547.004777C25.100791 538.023025 16.038844 529.281854 16.038844 510.837184s9.061947-27.105646 27.105647-36.167594l903.788863-451.814237c18.0437-9.061947 36.167593-9.061947 45.229541 0C1010.447177 32.077688 1010.447177 49.960999 1010.447177 68.004699l-180.757773 903.788864c0 18.0437-9.061947 27.105646-27.105646 36.167593z"></path> <path d="M784.299475 1007.961156a33.200407 33.200407 0 0 1-27.105646-9.061947l-216.524395-144.349597-108.903751 108.262198c-9.061947 9.061947-36.167593 18.0437-45.229541 9.061947a49.720417 49.720417 0 0 1-27.105646-45.229541v-198.881666A33.200407 33.200407 0 0 1 368.893414 700.656903l343.070875-370.577492a44.748375 44.748375 0 0 1 63.273239 63.27324L441.068212 754.868196v72.174799l63.27324-54.211293a42.583131 42.583131 0 0 1 54.211293-9.061947L757.193829 890.155846l153.652126-749.81596-759.198684 370.497298 171.695826 108.50278c18.0437 9.061947 27.105646 45.22954 9.061946 63.27324-9.061947 18.0437-45.22954 27.105646-63.273239 18.043699L34.082544 547.004777C25.100791 538.023025 16.038844 529.281854 16.038844 510.837184s9.061947-27.105646 27.105647-36.167594l903.788863-451.814237c18.0437-9.061947 36.167593-9.061947 45.229541 0C1010.447177 32.077688 1010.447177 49.960999 1010.447177 68.004699l-180.757773 903.788864c0 18.0437-9.061947 27.105646-27.105646 36.167593z"></path>
@ -77,7 +77,7 @@
<?php $this->widget('Widget_Archive@' . $cid, 'pageSize=1&type=post', 'cid=' . $cid)->to($item); ?> <?php $this->widget('Widget_Archive@' . $cid, 'pageSize=1&type=post', 'cid=' . $cid)->to($item); ?>
<figure class="item"> <figure class="item">
<a class="thumbnail" href="<?php $item->permalink() ?>" title="<?php $item->title() ?>"> <a class="thumbnail" href="<?php $item->permalink() ?>" title="<?php $item->title() ?>">
<img class="lazyload" onerror="javascript: this.src='<?php _getLazyload() ?>';" src="<?php _getLazyload(); ?>" data-original="<?php _getThumbnail($item); ?>" alt="<?php $item->title() ?>" width="100%" /> <img class="lazyload" src="<?php _getLazyload(); ?>" data-src="<?php _getThumbnail($item); ?>" onerror="javascript: this.src='<?php _getLazyload() ?>';" alt="<?php $item->title() ?>" width="100%" />
</a> </a>
<figcaption class="information"> <figcaption class="information">
<span class="information_type">推荐</span> <span class="information_type">推荐</span>
@ -98,7 +98,7 @@
<a class="link" href="<?php $item->permalink(); ?>" title="<?php $item->title(); ?>"> <a class="link" href="<?php $item->permalink(); ?>" title="<?php $item->title(); ?>">
<figure class="inner"> <figure class="inner">
<span class="views"><?php _getViews($item); ?></span> <span class="views"><?php _getViews($item); ?></span>
<img class="image lazyload" onerror="javascript: this.src='<?php _getLazyload() ?>';" src="<?php _getLazyload(); ?>" data-original="<?php _getThumbnail($item); ?>" alt="<?php $item->title(); ?>" /> <img class="image lazyload" src="<?php _getLazyload(); ?>" data-src="<?php _getThumbnail($item); ?>" onerror="javascript: this.src='<?php _getLazyload() ?>';" alt="<?php $item->title(); ?>" />
<figcaption class="title"><?php $item->title(); ?></figcaption> <figcaption class="title"><?php $item->title(); ?></figcaption>
</figure> </figure>
</a> </a>
@ -118,7 +118,7 @@
<?php if ($index_ad) : ?> <?php if ($index_ad) : ?>
<div class="joe_index__ad"> <div class="joe_index__ad">
<a class="joe_index__ad-link" href="<?php echo $index_ad['url'] ?>" target="_blank" rel="noopener noreferrer nofollow"> <a class="joe_index__ad-link" href="<?php echo $index_ad['url'] ?>" target="_blank" rel="noopener noreferrer nofollow">
<img class="image lazyload" onerror="javascript: this.src='<?php _getLazyload() ?>';" src="<?php _getLazyload() ?>" data-original="<?php echo $index_ad['image'] ?>" alt="<?php echo $index_ad['url'] ?>" width="100%" /> <img class="image lazyload" src="<?php _getLazyload() ?>" data-src="<?php echo $index_ad['image'] ?>" onerror="javascript: this.src='<?php _getLazyload() ?>';" alt="<?php echo $index_ad['url'] ?>" width="100%" />
<span class="icon">广告</span> <span class="icon">广告</span>
</a> </a>
</div> </div>

View File

@ -29,7 +29,7 @@
<div class="joe_live__contain joe_live__play"> <div class="joe_live__contain joe_live__play">
<div class="joe_live__contain-title joe_live__play-title">正在播放:<?php echo $_GET['title'] ?></div> <div class="joe_live__contain-title joe_live__play-title">正在播放:<?php echo $_GET['title'] ?></div>
<?php ini_set('user_agent', 'Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); ?> <?php ini_set('user_agent', 'Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'); ?>
<iframe class="joe_live__play-player" src="<?php echo 'https://liveshare.huya.com/iframe/' . $_GET['profileRoom'] ?>"></iframe> <iframe class="joe_live__play-player lazyload" data-src="<?php echo 'https://liveshare.huya.com/iframe/' . $_GET['profileRoom'] ?>"></iframe>
</div> </div>
<?php else : ?> <?php else : ?>
<!-- 列表页 --> <!-- 列表页 -->

View File

@ -1 +0,0 @@
'use strict';var _createClass=function(){function a(b,c){for(var e,d=0;d<c.length;d++)e=c[d],e.enumerable=e.enumerable||!1,e.configurable=!0,'value'in e&&(e.writable=!0),Object.defineProperty(b,e.key,e)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}var LazyLoad=function(){function a(b){_classCallCheck(this,a),this.imglist=Array.from($(b)),this.init()}return _createClass(a,[{key:'canILoad',value:function canILoad(){for(var b=this.imglist,c=b.length;c--;)this.getBound(b[c])&&this.loadImage(b[c],c)}},{key:'getBound',value:function getBound(b){var c=b.getBoundingClientRect(),d=window.innerHeight;return c.top<=d}},{key:'loadImage',value:function loadImage(b,c){var d=b.getAttribute('data-original');b.src=d,this.imglist.splice(c,1)}},{key:'bindEvent',value:function bindEvent(){var b=this;$(window).on('scroll',function(){return b.imglist.length&&b.canILoad()}),$(window).on('resize',function(){return b.imglist.length&&b.canILoad()})}},{key:'init',value:function init(){this.canILoad(),this.bindEvent()}}]),a}();

View File

@ -18,7 +18,7 @@
<h1 class="joe_detail__title"><?php $this->title() ?></h1> <h1 class="joe_detail__title"><?php $this->title() ?></h1>
<div class="joe_detail__count"> <div class="joe_detail__count">
<div class="joe_detail__count-information"> <div class="joe_detail__count-information">
<img class="avatar lazyload" src="<?php _getAvatarLazyload(); ?>" onerror="javascript: this.src = '<?php _getAvatarLazyload(); ?>'" data-original="<?php _getAvatarByMail($this->author->mail) ?>" alt="<?php $this->author(); ?>" /> <img class="avatar lazyload" src="<?php _getAvatarLazyload(); ?>" data-src="<?php _getAvatarByMail($this->author->mail) ?>" onerror="javascript: this.src = '<?php _getAvatarLazyload(); ?>'" alt="<?php $this->author(); ?>" />
<div class="meta"> <div class="meta">
<div class="author"> <div class="author">
<a class="link" href="<?php $this->author->permalink(); ?>" title="<?php $this->author(); ?>"><?php $this->author(); ?></a> <a class="link" href="<?php $this->author->permalink(); ?>" title="<?php $this->author(); ?>"><?php $this->author(); ?></a>

View File

@ -2,9 +2,9 @@
<aside class="joe_aside"> <aside class="joe_aside">
<?php if (in_array('author', $this->options->JAside)) : ?> <?php if (in_array('author', $this->options->JAside)) : ?>
<section class="joe_aside__item author"> <section class="joe_aside__item author">
<img class="image" onerror="javascript: this.src='<?php _getLazyload() ?>';" src="<?php $this->options->JAside_Author_Image() ?>" alt="<?php $this->author->screenName(); ?>" /> <img class="image lazyload" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="<?php $this->options->JAside_Author_Image() ?>" onerror="javascript: this.src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';" alt="<?php $this->author->screenName(); ?>" />
<div class="user"> <div class="user">
<img class="avatar lazyload" src="<?php _getAvatarLazyload(); ?>" onerror="javascript: this.src = '<?php _getAvatarLazyload(); ?>'" data-original="<?php _getAvatarByMail($this->author->mail) ?>" alt="<?php $this->author->screenName(); ?>" /> <img class="avatar lazyload" src="<?php _getAvatarLazyload(); ?>" data-src="<?php _getAvatarByMail($this->author->mail) ?>" onerror="javascript: this.src = '<?php _getAvatarLazyload(); ?>'" alt="<?php $this->author->screenName(); ?>" />
<a class="link" href="<?php $this->options->JAside_Author_Link() ?>" target="_blank" rel="noopener noreferrer nofollow"><?php $this->author->screenName(); ?></a> <a class="link" href="<?php $this->options->JAside_Author_Link() ?>" target="_blank" rel="noopener noreferrer nofollow"><?php $this->author->screenName(); ?></a>
<p class="motto"><?php _getAsideAuthorMotto() ?></p> <p class="motto"><?php _getAsideAuthorMotto() ?></p>
</div> </div>
@ -57,7 +57,7 @@
<li class="item"> <li class="item">
<a class="link" href="<?php $item->permalink(); ?>" title="<?php $item->title(); ?>"> <a class="link" href="<?php $item->permalink(); ?>" title="<?php $item->title(); ?>">
<i class="sort"><?php echo $index; ?></i> <i class="sort"><?php echo $index; ?></i>
<img class="image lazyload" onerror="javascript: this.src='<?php _getLazyload() ?>';" src="<?php _getLazyload(); ?>" data-original="<?php _getThumbnail($item); ?>" alt="<?php $item->title() ?>" /> <img class="image lazyload" src="<?php _getLazyload(); ?>" data-src="<?php _getThumbnail($item); ?>" onerror="javascript: this.src='<?php _getLazyload() ?>';" alt="<?php $item->title() ?>" />
<div class="describe"> <div class="describe">
<h6><?php $item->title(); ?></h6> <h6><?php $item->title(); ?></h6>
<span><?php _getViews($item); ?> 阅读 - <?php $item->date('m/d'); ?></span> <span><?php _getViews($item); ?> 阅读 - <?php $item->date('m/d'); ?></span>
@ -88,7 +88,7 @@
<?php while ($item->next()) : ?> <?php while ($item->next()) : ?>
<li class="item"> <li class="item">
<div class="user"> <div class="user">
<img class="avatar lazyload" src="<?php _getAvatarLazyload(); ?>" onerror="javascript: this.src = '<?php _getAvatarLazyload(); ?>'" data-original="<?php _getAvatarByMail($item->mail) ?>" alt="<?php $item->author(false) ?>" /> <img class="avatar lazyload" src="<?php _getAvatarLazyload(); ?>" data-src="<?php _getAvatarByMail($item->mail) ?>" onerror="javascript: this.src = '<?php _getAvatarLazyload(); ?>'" alt="<?php $item->author(false) ?>" />
<div class="info"> <div class="info">
<div class="author"><?php $item->author(false) ?></div> <div class="author"><?php $item->author(false) ?></div>
<span class="date"><?php $item->date('Y-m-d'); ?></span> <span class="date"><?php $item->date('Y-m-d'); ?></span>

View File

@ -100,7 +100,7 @@ function threadedComments($comments, $options)
<li class="comment-list__item"> <li class="comment-list__item">
<div class="comment-list__item-contain" id="<?php $comments->theId(); ?>"> <div class="comment-list__item-contain" id="<?php $comments->theId(); ?>">
<div class="term"> <div class="term">
<img class="avatar lazyload" onerror="javascript: this.src = '<?php _getAvatarLazyload(); ?>'" src="<?php _getAvatarLazyload() ?>" data-original="<?php _getAvatarByMail($comments->mail); ?>" alt="头像" /> <img class="avatar lazyload" src="<?php _getAvatarLazyload() ?>" data-src="<?php _getAvatarByMail($comments->mail); ?>" onerror="javascript: this.src = '<?php _getAvatarLazyload(); ?>'" alt="头像" />
<div class="content"> <div class="content">
<div class="user"> <div class="user">
<span class="author"><?php $comments->author(); ?></span> <span class="author"><?php $comments->author(); ?></span>

View File

@ -2,7 +2,7 @@
<div class="joe_header__above"> <div class="joe_header__above">
<div class="joe_container"> <div class="joe_container">
<a title="<?php $this->options->title(); ?>" class="joe_header__above-logo" href="<?php $this->options->siteUrl(); ?>"> <a title="<?php $this->options->title(); ?>" class="joe_header__above-logo" href="<?php $this->options->siteUrl(); ?>">
<img src="<?php $this->options->JLogo() ?>" alt="<?php $this->options->title(); ?>" /> <img class="lazyload" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="<?php $this->options->JLogo() ?>" onerror="javascript: this.src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';" alt="<?php $this->options->title(); ?>" />
<svg class="profile-color-modes" height="45" viewBox="0 0 106 60" fill="none" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"> <svg class="profile-color-modes" height="45" viewBox="0 0 106 60" fill="none" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
<g class="profile-color-modes-illu-group profile-color-modes-illu-red"> <g class="profile-color-modes-illu-group profile-color-modes-illu-red">
<path d="M37.5 58.5V57.5C37.5 49.768 43.768 43.5 51.5 43.5V43.5C59.232 43.5 65.5 49.768 65.5 57.5V58.5"></path> <path d="M37.5 58.5V57.5C37.5 49.768 43.768 43.5 51.5 43.5V43.5C59.232 43.5 65.5 49.768 65.5 57.5V58.5"></path>

View File

@ -72,7 +72,7 @@
<!-- 全局公用JS静态资源放在了CDN上如果你的服务器带宽不够请不要修改成本地cdn采用jsdelivr放心不会失效 --> <!-- 全局公用JS静态资源放在了CDN上如果你的服务器带宽不够请不要修改成本地cdn采用jsdelivr放心不会失效 -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/scroll/joe.scroll.js"></script> <script src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/scroll/joe.scroll.js"></script>
<script src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/lazyload/joe.lazyload.js"></script> <script src="https://cdn.jsdelivr.net/npm/lazysizes@5.3.0/lazysizes.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/sketchpad/joe.sketchpad.js"></script> <script src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/sketchpad/joe.sketchpad.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/qmsg/qmsg.js"></script> <script src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/qmsg/qmsg.js"></script>

View File

@ -33,7 +33,7 @@
</div> </div>
<div class="joe_video__player joe_video__contain"> <div class="joe_video__player joe_video__contain">
<div class="joe_video__contain-title">正在播放:</div> <div class="joe_video__contain-title">正在播放:</div>
<iframe allowfullscreen="true" class="joe_video__player-play" data-player="<?php echo $this->options->JCustomPlayer ? $this->options->JCustomPlayer : '/usr/themes/joe/library/player.php?url=' ?>"></iframe> <iframe allowfullscreen="true" class="joe_video__player-play" data-player="<?php echo $this->options->JCustomPlayer ? $this->options->JCustomPlayer : '/usr/themes/Joe/library/player.php?url=' ?>"></iframe>
</div> </div>
<?php else : ?> <?php else : ?>
<div class="joe_video__type joe_video__contain"> <div class="joe_video__type joe_video__contain">