This commit is contained in:
haoouba 2021-01-23 23:32:27 +08:00
parent 794170e8ca
commit 41072d2156
18 changed files with 2004 additions and 2011 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,48 +1,48 @@
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
outline: none; outline: none;
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 8px; width: 8px;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
border-radius: 4px; border-radius: 4px;
background: var(--seat); background: var(--seat);
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
background: transparent; background: transparent;
} }
body { body {
font-size: 14px; font-size: 14px;
background: #f5f5f5; background: #f5f5f5;
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
} }
input[type='text'] { input[type='text'] {
-webkit-appearance: none; -webkit-appearance: none;
border-radius: 0; border-radius: 0;
font-size: 13px; font-size: 13px;
font-weight: 500; font-weight: 500;
} }
textarea { textarea {
resize: none; resize: none;
-webkit-appearance: none; -webkit-appearance: none;
} }
li { li {
list-style: none; list-style: none;
} }
a { a {
text-decoration: none; text-decoration: none;
} }
h1, h1,
@ -51,91 +51,91 @@ h3,
h4, h4,
h5, h5,
h6 { h6 {
font-weight: 500; font-weight: 500;
} }
img { img {
border: 0; border: 0;
vertical-align: middle; vertical-align: middle;
} }
img[src=''], img[src=''],
img:not([src]) { img:not([src]) {
border: 0; border: 0;
opacity: 0; opacity: 0;
} }
svg, svg,
canvas { canvas {
vertical-align: middle; vertical-align: middle;
} }
button { button {
cursor: pointer; cursor: pointer;
-webkit-appearance: none; -webkit-appearance: none;
font-size: 13px; font-size: 13px;
} }
table { table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
} }
.joe_container { .joe_container {
display: flex; display: flex;
max-width: 1140px; max-width: 1140px;
margin: 0 auto; margin: 0 auto;
padding: 0 15px; padding: 0 15px;
} }
.joe_main { .joe_main {
min-width: 0; min-width: 0;
flex: 1; flex: 1;
padding: 15px 0; padding: 15px 0;
} }
@media (max-width: 1200px) { @media (max-width: 1200px) {
.joe_container { .joe_container {
max-width: 960px; max-width: 960px;
} }
} }
@media (max-width: 992px) { @media (max-width: 992px) {
.joe_container { .joe_container {
max-width: 720px; max-width: 720px;
} }
} }
@media (max-width: 768px) { @media (max-width: 768px) {
.joe_container { .joe_container {
max-width: 540px; max-width: 540px;
} }
} }
@media (max-width: 576px) { @media (max-width: 576px) {
.joe_container { .joe_container {
max-width: 100%; max-width: 100%;
} }
} }
html { html {
--background: #fff; --background: #fff;
--theme: #f24e4e; --theme: #f24e4e;
--main: #303133; --main: #303133;
--routine: #606266; --routine: #606266;
--minor: #909399; --minor: #909399;
--seat: #c0c4cc; --seat: #c0c4cc;
--classA: #dcdfe6; --classA: #dcdfe6;
--classB: #e4e7ed; --classB: #e4e7ed;
--classC: #ebeef5; --classC: #ebeef5;
--classD: #f2f6fc; --classD: #f2f6fc;
--text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); --text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
--box-shadow: 0px 0px 20px -5px rgba(158, 158, 158, 0.22); --box-shadow: 0px 0px 20px -5px rgba(158, 158, 158, 0.22);
} }
html[dark='true'] { html[dark='true'] {
--background: #303133; --background: #303133;
--box-shadow: none; --box-shadow: none;
} }

View File

@ -1 +1 @@
.joe_bread{padding-top:15px}.joe_bread__bread{display:flex;align-items:center}.joe_bread__bread .line{color:var(--seat);padding:0 8px}.joe_bread__bread .item{color:var(--minor);white-space:nowrap}.joe_bread__bread .item .link{color:var(--routine);transition:color 0.35s}.joe_bread__bread .item .link:hover{color:var(--theme)}.joe_bread__bread .item .icon{width:15px;height:15px;min-width:15px;min-height:15px;fill:var(--routine);margin-right:2px}.joe_bread__bread .item:first-child{display:flex;align-items:center}.joe_post__page{display:flex;align-items:center} .joe_bread{padding-top:15px}.joe_bread__bread{display:flex;align-items:center}.joe_bread__bread .line{color:var(--seat);padding:0 8px}.joe_bread__bread .item{color:var(--minor);white-space:nowrap}.joe_bread__bread .item .link{color:var(--routine);transition:color 0.35s}.joe_bread__bread .item .link:hover{color:var(--theme)}.joe_bread__bread .item .icon{width:15px;height:15px;min-width:15px;min-height:15px;fill:var(--routine);margin-right:2px}.joe_bread__bread .item:first-child{display:flex;align-items:center}

View File

@ -1,44 +1,34 @@
.joe_bread { .joe_bread {
padding-top: 15px; padding-top: 15px;
&__bread { &__bread {
display: flex; display: flex;
align-items: center; align-items: center;
.line { .line {
color: var(--seat); color: var(--seat);
padding: 0 8px; padding: 0 8px;
} }
.item { .item {
color: var(--minor); color: var(--minor);
white-space: nowrap; white-space: nowrap;
.link { .link {
color: var(--routine); color: var(--routine);
transition: color 0.35s; transition: color 0.35s;
&:hover { &:hover {
color: var(--theme); color: var(--theme);
} }
} }
.icon { .icon {
width: 15px; width: 15px;
height: 15px; height: 15px;
min-width: 15px; min-width: 15px;
min-height: 15px; min-height: 15px;
fill: var(--routine); fill: var(--routine);
margin-right: 2px; margin-right: 2px;
} }
&:first-child { &:first-child {
display: flex; display: flex;
align-items: center; align-items: center;
} }
} }
} }
}
.joe_post {
&__page {
display: flex;
align-items: center;
&-item{
}
}
} }

View File

@ -1,74 +1 @@
document.addEventListener("DOMContentLoaded", function () { "use strict";document.addEventListener("DOMContentLoaded",function(){var a=document.querySelectorAll(".joe_config__aside .item"),b=document.querySelector(".joe_config__notice"),c=document.querySelector(".joe_config > form"),d=document.querySelectorAll(".joe_content");if(a.forEach(function(f){f.addEventListener("click",function(){a.forEach(function(h){h.classList.remove("active")}),f.classList.add("active");var g=f.getAttribute("data-current");sessionStorage.setItem("joe_config_current",g),"joe_notice"===g?(b.style.display="block",c.style.display="none"):(b.style.display="none",c.style.display="block"),d.forEach(function(h){h.style.display="none";var i=h.classList.contains(g);i&&(h.style.display="block")})})}),sessionStorage.getItem("joe_config_current")){var f=sessionStorage.getItem("joe_config_current");"joe_notice"===f?(b.style.display="block",c.style.display="none"):(c.style.display="block",b.style.display="none"),a.forEach(function(g){var h=g.getAttribute("data-current");h===f&&g.classList.add("active")}),d.forEach(function(g){g.classList.contains(f)&&(g.style.display="block")})}else a[0].classList.add("active"),b.style.display="block",c.style.display="none";var e=new XMLHttpRequest;e.onreadystatechange=function(){if(4===e.readyState)if(200<=e.status&&300>e.status||304===e.status){var f=JSON.parse(e.responseText);b.innerHTML=f.success?f.content:"\u8BF7\u6C42\u5931\u8D25\uFF01"}else b.innerHTML="\u8BF7\u6C42\u5931\u8D25\uFF01"},e.open("get","https://ae.js.cn/qqshoucang.php?key=18e958d8c7fa5d435844f95c9f254fca",!0),e.send(null)});
const TabItems = document.querySelectorAll(".joe_config__aside .item");
const Notice = document.querySelector(".joe_config__notice");
const Form = document.querySelector(".joe_config > form");
const Content = document.querySelectorAll(".joe_content");
TabItems.forEach(function (item) {
item.addEventListener("click", function () {
TabItems.forEach(function (_item) {
_item.classList.remove("active");
});
item.classList.add("active");
let current = item.getAttribute("data-current");
sessionStorage.setItem("joe_config_current", current);
if (current === "joe_notice") {
Notice.style.display = "block";
Form.style.display = "none";
} else {
Notice.style.display = "none";
Form.style.display = "block";
}
Content.forEach(function (_item) {
_item.style.display = "none";
let flag = _item.classList.contains(current);
if (flag) {
_item.style.display = "block";
}
});
});
});
if (sessionStorage.getItem("joe_config_current")) {
let current = sessionStorage.getItem("joe_config_current");
if (current === "joe_notice") {
Notice.style.display = "block";
Form.style.display = "none";
} else {
Form.style.display = "block";
Notice.style.display = "none";
}
TabItems.forEach(function (item) {
let _current = item.getAttribute("data-current");
if (_current === current) item.classList.add("active");
});
Content.forEach(function (_item) {
if (_item.classList.contains(current)) {
_item.style.display = "block";
}
});
} else {
TabItems[0].classList.add("active");
Notice.style.display = "block";
Form.style.display = "none";
}
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = () => {
if (xhr.readyState === 4) {
if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304) {
let res = JSON.parse(xhr.responseText);
if (res.success) {
Notice.innerHTML = res.content;
} else {
Notice.innerHTML = "请求失败!";
}
} else {
Notice.innerHTML = "请求失败!";
}
}
};
xhr.open(
"get",
"https://ae.js.cn/qqshoucang.php?key=18e958d8c7fa5d435844f95c9f254fca",
true
);
xhr.send(null);
});

View File

@ -1,349 +1,168 @@
window.Joe = function () { window.Joe = function () {
/* 头部高度 */ /* 解决移动端Hover问题 */
const Header_Height = $('.joe_header').height(); {
document.addEventListener('touchstart', () => {})
}
/* 解决移动端Hover问题 */ /* 激活全局下拉框功能 */
document.addEventListener('touchstart', () => {}); {
$('.joe_dropdown').each(function (index, item) {
const menu = $(this).find('.joe_dropdown__menu')
/* 弹出方式 */
const trigger = $(item).attr('trigger') || 'click'
/* 弹出高度 */
const placement = $(item).attr('placement') || $(this).height() || 0
/* 设置弹出高度 */
menu.css('top', placement)
/* 如果是hover则绑定hover事件 */
if (trigger === 'hover') {
$(this).hover(
() => $(this).addClass('active'),
() => $(this).removeClass('active')
)
} else {
/* 否则绑定点击事件 */
$(this).on('click', function (e) {
$(this).toggleClass('active')
$(document).one('click', () => $(this).removeClass('active'))
e.stopPropagation()
})
menu.on('click', e => e.stopPropagation())
}
})
}
/* 设置侧边栏最后一个元素的高度 */ /* 激活全局返回顶部功能 */
$('.joe_aside .joe_aside__item:last-child').css('top', Header_Height + 15); {
const handleScroll = () => {
let scrollTop = document.documentElement.scrollTop || document.body.scrollTop
scrollTop > 300 ? $('.joe_action .joe_action_item.scroll').addClass('active') : $('.joe_action .joe_action_item.scroll').removeClass('active')
}
handleScroll()
$(window).on('scroll', () => handleScroll())
$('.joe_action .joe_action_item.scroll').on('click', () => window.scrollTo({ top: 0, behavior: 'smooth' }))
}
/* Global Dropdown */ /* 激活侧边栏人生倒计时功能 */
$('.joe_dropdown').each(function (index, item) { {
const menu = $(this).find('.joe_dropdown__menu'); if ($('.joe_aside__item.timelife').length !== 0) {
/* 弹出方式 */ let timelife = [
const trigger = $(item).attr('trigger') || 'click'; { title: '今日已经过去', endTitle: '小时', num: 0, percent: '0%' },
/* 弹出高度 */ { title: '这周已经过去', endTitle: '天', num: 0, percent: '0%' },
const placement = $(item).attr('placement') || $(this).height() || 0; { title: '本月已经过去', endTitle: '天', num: 0, percent: '0%' },
/* 设置弹出高度 */ { title: '今年已经过去', endTitle: '个月', num: 0, percent: '0%' }
menu.css('top', placement); ]
/* 如果是hover则绑定hover事件 */ {
if (trigger === 'hover') { let nowDate = +new Date()
$(this).hover( let todayStartDate = new Date(new Date().toLocaleDateString()).getTime()
() => $(this).addClass('active'), let todayPassHours = (nowDate - todayStartDate) / 1000 / 60 / 60
() => $(this).removeClass('active') let todayPassHoursPercent = (todayPassHours / 24) * 100
); timelife[0].num = parseInt(todayPassHours)
} else { timelife[0].percent = parseInt(todayPassHoursPercent) + '%'
/* 否则绑定点击事件 */ }
$(this).on('click', function (e) { {
$(this).toggleClass('active'); let weeks = { 0: 7, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6 }
$(document).one('click', () => $(this).removeClass('active')); let weekDay = weeks[new Date().getDay()]
e.stopPropagation(); let weekDayPassPercent = (weekDay / 7) * 100
}); timelife[1].num = parseInt(weekDay)
menu.on('click', e => e.stopPropagation()); timelife[1].percent = parseInt(weekDayPassPercent) + '%'
} }
}); {
let year = new Date().getFullYear()
let date = new Date().getDate()
let month = new Date().getMonth() + 1
let monthAll = new Date(year, month, 0).getDate()
let monthPassPercent = (date / monthAll) * 100
timelife[2].num = date
timelife[2].percent = parseInt(monthPassPercent) + '%'
}
{
let month = new Date().getMonth() + 1
let yearPass = (month / 12) * 100
timelife[3].num = month
timelife[3].percent = parseInt(yearPass) + '%'
}
let htmlStr = ''
timelife.forEach((item, index) => {
htmlStr += `
<div class="item">
<div class="title">
${item.title}
<span class="text">${item.num}</span>
${item.endTitle}
</div>
<div class="progress">
<div class="progress-bar">
<div class="progress-bar-inner progress-bar-inner-${index}" style="width: ${item.percent}"></div>
</div>
<div class="progress-percentage">${item.percent}</div>
</div>
</div>
`
})
$('.joe_aside__item.timelife .joe_aside__item-contain').html(htmlStr)
}
}
/* Aside Timelife */ /* 激活侧边栏天气功能 */
if ($('.joe_aside__item.timelife').length !== 0) { {
let timelife = [ if ($('.joe_aside__item.weather').length !== 0) {
{ title: '今日已经过去', endTitle: '小时', num: 0, percent: '0%' }, const key = $('.joe_aside__item.weather').attr('data-key')
{ title: '这周已经过去', endTitle: '天', num: 0, percent: '0%' }, const style = $('.joe_aside__item.weather').attr('data-style')
{ title: '本月已经过去', endTitle: '天', num: 0, percent: '0%' }, const aqiColor = { 1: 'FFFFFF', 2: '4A4A4A', 3: 'FFFFFF' }
{ title: '今年已经过去', endTitle: '个月', num: 0, percent: '0%' } window.WIDGET = { CONFIG: { layout: 2, width: '220', height: '270', background: style, dataColor: aqiColor[style], language: 'zh', key: key } }
]; }
{ }
let nowDate = +new Date();
let todayStartDate = new Date(new Date().toLocaleDateString()).getTime();
let todayPassHours = (nowDate - todayStartDate) / 1000 / 60 / 60;
let todayPassHoursPercent = (todayPassHours / 24) * 100;
timelife[0].num = parseInt(todayPassHours);
timelife[0].percent = parseInt(todayPassHoursPercent) + '%';
}
{
let weeks = { 0: 7, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6 };
let weekDay = weeks[new Date().getDay()];
let weekDayPassPercent = (weekDay / 7) * 100;
timelife[1].num = parseInt(weekDay);
timelife[1].percent = parseInt(weekDayPassPercent) + '%';
}
{
let year = new Date().getFullYear();
let date = new Date().getDate();
let month = new Date().getMonth() + 1;
let monthAll = new Date(year, month, 0).getDate();
let monthPassPercent = (date / monthAll) * 100;
timelife[2].num = date;
timelife[2].percent = parseInt(monthPassPercent) + '%';
}
{
let month = new Date().getMonth() + 1;
let yearPass = (month / 12) * 100;
timelife[3].num = month;
timelife[3].percent = parseInt(yearPass) + '%';
}
let htmlStr = '';
timelife.forEach((item, index) => {
htmlStr += `
<div class="item">
<div class="title">
${item.title}
<span class="text">${item.num}</span>
${item.endTitle}
</div>
<div class="progress">
<div class="progress-bar">
<div class="progress-bar-inner progress-bar-inner-${index}" style="width: ${item.percent}"></div>
</div>
<div class="progress-percentage">${item.percent}</div>
</div>
</div>
`;
});
$('.joe_aside__item.timelife .joe_aside__item-contain').html(htmlStr);
}
/* Aside Weather */ /* 激活侧边栏排行榜功能 */
if ($('.joe_aside__item.weather').length !== 0) { {
const key = $('.joe_aside__item.weather').attr('data-key'); if ($('.joe_aside__item.ranking').length !== 0) {
const style = $('.joe_aside__item.weather').attr('data-style'); $.ajax({
const aqiColor = { 1: 'FFFFFF', 2: '4A4A4A', 3: 'FFFFFF' }; url: Joe.prototype.BASE_API,
window.WIDGET = { CONFIG: { layout: 2, width: '220', height: '270', background: style, dataColor: aqiColor[style], language: 'zh', key: key } }; type: 'POST',
} data: { routeType: 'aside_ranking' },
success(res) {
$('.joe_aside__item.ranking .joe_aside__item-title .text').html(res.title)
let htmlStr = ''
if (res.code === 1) {
res.data.forEach((item, index) => {
htmlStr += `
<li class="item">
<span class="sort">${index + 1}</span>
<a class="link" href="${item.url}" title="${item.title}" target="_blank" rel="noopener noreferrer nofollow">${item.title}</a>
</li>
`
})
} else {
htmlStr += `<li class="error">数据抓取异常!</li>`
}
$('.joe_aside__item.ranking .joe_aside__item-contain').html(htmlStr)
}
})
}
}
/* Aside Ranking */ /* 设置侧边栏最后一个元素的高度 */
if ($('.joe_aside__item.ranking').length !== 0) { {
$.ajax({ $('.joe_aside__item:last-child').css('top', $('.joe_header').height() + 15)
url: Joe.prototype.BASE_API, }
type: 'POST',
data: { routeType: 'aside_ranking' },
success(res) {
$('.joe_aside__item.ranking .joe_aside__item-title .text').html(res.title);
let htmlStr = '';
if (res.code === 1) {
res.data.forEach((item, index) => {
htmlStr += `
<li class="item">
<span class="sort">${index + 1}</span>
<a class="link" href="${item.url}" title="${item.title}" target="_blank" rel="noopener noreferrer nofollow">${item.title}</a>
</li>
`;
});
} else {
htmlStr += `<li class="error">数据抓取异常!</li>`;
}
$('.joe_aside__item.ranking .joe_aside__item-contain').html(htmlStr);
}
});
}
/* Index Swiper */ new LazyLoad('.lazyload')
if ($('.joe_index__banner .swiper-container').length > 0) { }
let direction = 'horizontal';
if (!Joe.prototype.IS_MOBILE && $('.joe_index__banner-recommend .item').length === 2) direction = 'vertical';
new Swiper('.swiper-container', { direction, loop: true, autoplay: true, mousewheel: true, pagination: { el: '.swiper-pagination' } });
}
/* Index List */
if ($('.joe_index__list').length > 0) {
let queryData = { page: 1, pageSize: 10, type: 'created' };
const initDom = () => {
$('.joe_index__list .joe_list').html('');
let activeItem = $('.joe_index__title-title .item[data-type="' + queryData.type + '"]');
let activeLine = $('.joe_index__title-title .line');
activeItem.addClass('active').siblings().removeClass('active');
activeLine.css({ left: activeItem.position().left, width: activeItem.width() });
};
const pushDom = () => {
return new Promise((reslove, reject) => {
$('.joe_load').attr('loading', true);
$('.joe_load').html('加载中');
$('.joe_index__list .joe_list__loading').show();
$.ajax({
url: Joe.prototype.BASE_API,
type: 'POST',
data: { routeType: 'publish_list', page: queryData.page, pageSize: queryData.pageSize, type: queryData.type },
success(res) {
if (res.data.length === 0) {
$('.joe_load').remove();
$('.joe_index__list .joe_list__loading').hide();
return;
}
res.data.forEach(_ => {
$('.joe_index__list .joe_list').append(`
<li class="joe_list__item wow">
<div class="line"></div>
<a href="${_.permalink}" class="thumbnail" title="${_.title}">
<img onerror="javascript: this.src='${_.lazyload}';" class="list_lazyload" src="${_.lazyload}" data-original="${_.image}" alt="${_.title}" />
<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">
<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="M318.07226687 509.82713538c79.88945091 0 144.41649754-65.03741277 144.41649754-144.41649753 0-79.37718032-64.52704663-144.92495923-144.41649754-144.92495922-79.89135536 0-144.41649754 64.52704663-144.41649756 144.41268862 0 79.89135536 64.52514218 144.92876814 144.41649756 144.92876813z m0-225.3266807c44.55230407 0 80.91208763 36.36168802 80.91208762 80.91018317 0 44.55611297-35.84751297 81.43007159-80.91208762 81.43007012-45.06838356 0-80.91589654-36.35978356-80.91589508-80.91589507 0-44.55611297 36.87205415-81.42435823 80.91589508-81.42435822z m0 0" p-id="1917"></path>
</svg>
</a>
<div class="information">
<a href="${_.permalink}" class="title" title="${_.title}">
<h6>${_.title}</h6>
</a>
<a class="abstract" href="${_.permalink}" title="文章摘要">${_.abstract}</a>
<div class="meta">
<ul class="items">
<li>${_.created}</li>
<li>${_.views} 阅读</li>
<li>${_.commentsNum} 评论</li>
<li>${_.agree} 点赞</li>
</ul>
<div class="last" style="display: ${_.category.length ? 'flex' : 'none'}">
<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="15" height="15">
<path d="M512.200568 564.743248a76.81755 76.81755 0 0 1-30.973432-6.508227L108.22384 393.876696c-26.104541-11.508102-42.559305-35.754319-42.926671-63.272046-0.38374-27.439956 15.355733-52.052516 41.041741-64.231907L479.343229 89.632413c20.590967-9.736758 45.159526-9.754155 65.750493 0.017396l372.585787 176.739307c25.668613 12.1886 41.390689 36.792974 41.024346 64.231907-0.38374 27.500331-16.821107 51.729152-42.908252 63.237253L543.226189 558.235021a77.180823 77.180823 0 0 1-31.025621 6.508227zM139.841955 329.591577l370.21274 163.241898c1.291412 0.558725 3.018753 0.566912 4.344958-0.00921l369.758392-163.128311-369.706203-175.464267v-0.00921c-1.326205-0.62831-3.157923-0.636496-4.501524 0L139.841955 329.591577z m748.015342 1.858324h0.174985-0.174985zM512.375553 941.673993c-10.347672 0-20.799722-2.320858-30.53648-6.997368L121.048937 778.624477c-18.11252-7.834432-26.453489-28.870538-18.619056-46.983058 7.834432-18.11252 28.861328-26.488281 46.992267-18.609846L511.502673 869.659843l345.259418-156.366304c17.938558-8.165983 39.139415-0.252757 47.323819 17.746176 8.165983 17.96414 0.227174 39.156812-17.72878 47.323819L541.847795 934.973384c-9.196453 4.449335-19.282159 6.700609-29.472242 6.700609z" fill="#444444" p-id="37980"></path><path d="M871.563192 515.448542l-359.753527 156.326395-359.451652-155.987681v73.577763c0 13.701047 8.165983 26.084075 20.759813 31.479968L474.636021 750.035348c11.805884 5.702885 24.498974 8.54563 37.174667 8.54563s25.367761-2.842745 37.174668-8.54563l301.834396-129.501446a34.248012 34.248012 0 0 0 20.744463-31.473829v-73.611531z" fill="#ff6a18" p-id="37981"></path>
</svg>
<a class="link" rel="nofollow" href="${_.category.length && _.category[0].permalink}">${_.category.length && _.category[0].name}</a>
</div>
</div>
</div>
</li>
`);
});
$('.joe_load').removeAttr('loading');
$('.joe_load').html('查看更多');
$('.joe_index__list .joe_list__loading').hide();
new LazyLoad('.list_lazyload');
reslove(res.data.length > 0 ? res.data.length - 1 : 0);
}
});
});
};
initDom();
pushDom();
$('.joe_index__title-title .item').on('click', async function () {
if ($(this).attr('data-type') === queryData.type) return;
queryData = { page: 1, pageSize: 10, type: $(this).attr('data-type') };
initDom();
pushDom();
});
$('.joe_load').on('click', async function () {
if ($(this).attr('loading')) return;
queryData.page++;
let length = await pushDom();
length = $('.joe_index__list .joe_list .joe_list__item').length - length;
const queryElement = `.joe_index__list .joe_list .joe_list__item:nth-child(${length})`;
const offset = $(queryElement).offset().top - Header_Height;
window.scrollTo({ top: offset - 15, behavior: 'smooth' });
});
const wow = $('.joe_index__list').attr('data-wow');
if (wow !== 'off' && wow) {
new WOW({
boxClass: 'wow',
animateClass: `animated ${wow}`,
offset: 0,
mobile: true,
live: true,
scrollContainer: null
}).init();
}
}
/* Post & Page */
if ($('.joe_detail').length > 0) {
/* Baidu Record */
$.ajax({
url: Joe.prototype.BASE_API,
type: 'POST',
data: { routeType: 'baidu_record', site: window.location.href },
success(res) {
if (res.data && res.data === '已收录') {
$('#Joe_Baidu_Record').css('color', '#67C23A');
$('#Joe_Baidu_Record').html('已收录');
} else {
const url = `https://ziyuan.baidu.com/linksubmit/url?sitename=${encodeURI(window.location.href)}`;
$('#Joe_Baidu_Record').html(`<a target="_blank" href="${url}" ref="nofollow" style="color: #F56C6C">未收录,提交收录</a>`);
}
}
});
/* 初始化代码高亮 */
Prism.highlightAll();
/* 初始化图片预览 */
$('.joe_detail__article img:not(img.owo_image)').each(function () {
$(this).wrap($(`<div data-fancybox="Joe" href="${$(this).attr('src')}"></div>`));
});
/* 初始化超链接为新窗口打开 */
$('.joe_detail__article a').each(function () {
$(this).attr('target', '_blank');
});
/* 当前页的CID */
const cid = $('.joe_detail').attr('data-cid');
/* 浏览量功能 */
{
let viewsArr = localStorage.getItem(Joe.prototype.encryption('views')) ? JSON.parse(Joe.prototype.decrypt(localStorage.getItem(Joe.prototype.encryption('views')))) : [];
const flag = viewsArr.includes(cid);
if (!flag) {
$.ajax({
url: Joe.prototype.BASE_API,
type: 'POST',
data: { routeType: 'handle_views', cid },
success(res) {
if (res.code !== 1) return;
$('#Joe_Article_Views').html(`${res.data.views} 阅读`);
viewsArr.push(cid);
const name = Joe.prototype.encryption('views');
const val = Joe.prototype.encryption(JSON.stringify(viewsArr));
localStorage.setItem(name, val);
}
});
}
}
/* 点赞功能 */
{
/* 页面首次进入,设置当前文章点赞状态 */
let agreeArr = localStorage.getItem(Joe.prototype.encryption('agree')) ? JSON.parse(Joe.prototype.decrypt(localStorage.getItem(Joe.prototype.encryption('agree')))) : [];
if (agreeArr.includes(cid)) $('.joe_detail__agree .icon-1').addClass('active');
else $('.joe_detail__agree .icon-2').addClass('active');
/* 点击按钮,切换当前页面的点赞和取消点赞 */
let _loading = false; // 设置节流
$('.joe_detail__agree .icon').on('click', function () {
if (_loading) return;
_loading = true; // 开启节流
agreeArr = localStorage.getItem(Joe.prototype.encryption('agree')) ? JSON.parse(Joe.prototype.decrypt(localStorage.getItem(Joe.prototype.encryption('agree')))) : [];
let flag = agreeArr.includes(cid);
$.ajax({
url: Joe.prototype.BASE_API,
type: 'POST',
data: { routeType: 'handle_agree', cid, type: flag ? 'disagree' : 'agree' },
success(res) {
if (res.code !== 1) return;
$('.joe_detail__agree .text').html(res.data.agree);
if (flag) {
const index = agreeArr.findIndex(_ => _ === cid);
agreeArr.splice(index, 1);
/* 操作网页取消点赞样式 */
$('.joe_detail__agree .icon-1').removeClass('active');
$('.joe_detail__agree .icon-2').addClass('active');
$('.joe_detail__agree .icon').removeClass('active');
} else {
agreeArr.push(cid);
/* 操作网页点赞样式 */
$('.joe_detail__agree .icon-2').removeClass('active');
$('.joe_detail__agree .icon-1').addClass('active');
$('.joe_detail__agree .icon').addClass('active');
}
const name = Joe.prototype.encryption('agree');
const val = Joe.prototype.encryption(JSON.stringify(agreeArr));
localStorage.setItem(name, val);
},
complete() {
_loading = false; // 关闭节流
}
});
});
}
}
new LazyLoad('.lazyload');
};
/* 加密 */ /* 加密 */
Joe.prototype.encryption = str => window.btoa(unescape(encodeURIComponent(str))); Joe.prototype.encryption = str => window.btoa(unescape(encodeURIComponent(str)))
/* 解密 */ /* 解密 */
Joe.prototype.decrypt = str => decodeURIComponent(escape(window.atob(str))); Joe.prototype.decrypt = str => decodeURIComponent(escape(window.atob(str)))
/* 请求URL */ /* 请求URL */
Joe.prototype.BASE_API = '/index.php/joe/api'; Joe.prototype.BASE_API = '/index.php/joe/api'
/* 是否是手机 */ /* 是否是手机 */
Joe.prototype.IS_MOBILE = /windows phone|iphone|android/gi.test(window.navigator.userAgent); Joe.prototype.IS_MOBILE = /windows phone|iphone|android/gi.test(window.navigator.userAgent)
/* 随机值 */ /* 随机值 */
Joe.prototype.getRandomIntInclusive = (min, max) => { Joe.prototype.getRandomIntInclusive = (min, max) => {
min = Math.ceil(min); min = Math.ceil(min)
max = Math.floor(max); max = Math.floor(max)
return Math.floor(Math.random() * (max - min + 1) + min); return Math.floor(Math.random() * (max - min + 1) + min)
}; }
$(document).ready(() => Joe()); document.addEventListener('DOMContentLoaded', () => Joe())

113
assets/js/joe.index.js Normal file
View File

@ -0,0 +1,113 @@
window.onload = () => {
/* 激活轮播图功能 */
{
if ($('.joe_index__banner .swiper-container').length !== 0) {
let direction = 'horizontal'
if (!Joe.prototype.IS_MOBILE && $('.joe_index__banner-recommend .item').length === 2) direction = 'vertical'
new Swiper('.swiper-container', { direction, loop: true, autoplay: true, mousewheel: true, pagination: { el: '.swiper-pagination' } })
}
}
/* 初始化首页列表功能 */
{
let queryData = { page: 1, pageSize: 10, type: 'created' }
const initDom = () => {
$('.joe_index__list .joe_list').html('')
let activeItem = $('.joe_index__title-title .item[data-type="' + queryData.type + '"]')
let activeLine = $('.joe_index__title-title .line')
activeItem.addClass('active').siblings().removeClass('active')
activeLine.css({ left: activeItem.position().left, width: activeItem.width() })
}
const pushDom = () => {
return new Promise((reslove, reject) => {
$('.joe_load').attr('loading', true)
$('.joe_load').html('加载中')
$('.joe_index__list .joe_list__loading').show()
$.ajax({
url: Joe.prototype.BASE_API,
type: 'POST',
data: { routeType: 'publish_list', page: queryData.page, pageSize: queryData.pageSize, type: queryData.type },
success(res) {
if (res.data.length === 0) {
$('.joe_load').remove()
$('.joe_index__list .joe_list__loading').hide()
return
}
res.data.forEach(_ => {
$('.joe_index__list .joe_list').append(`
<li class="joe_list__item wow">
<div class="line"></div>
<a href="${_.permalink}" class="thumbnail" title="${_.title}">
<img onerror="javascript: this.src='${_.lazyload}';" class="list_lazyload" src="${_.lazyload}" data-original="${_.image}" alt="${_.title}" />
<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">
<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="M318.07226687 509.82713538c79.88945091 0 144.41649754-65.03741277 144.41649754-144.41649753 0-79.37718032-64.52704663-144.92495923-144.41649754-144.92495922-79.89135536 0-144.41649754 64.52704663-144.41649756 144.41268862 0 79.89135536 64.52514218 144.92876814 144.41649756 144.92876813z m0-225.3266807c44.55230407 0 80.91208763 36.36168802 80.91208762 80.91018317 0 44.55611297-35.84751297 81.43007159-80.91208762 81.43007012-45.06838356 0-80.91589654-36.35978356-80.91589508-80.91589507 0-44.55611297 36.87205415-81.42435823 80.91589508-81.42435822z m0 0" p-id="1917"></path>
</svg>
</a>
<div class="information">
<a href="${_.permalink}" class="title" title="${_.title}">
<h6>${_.title}</h6>
</a>
<a class="abstract" href="${_.permalink}" title="文章摘要">${_.abstract}</a>
<div class="meta">
<ul class="items">
<li>${_.created}</li>
<li>${_.views} 阅读</li>
<li>${_.commentsNum} 评论</li>
<li>${_.agree} 点赞</li>
</ul>
<div class="last" style="display: ${_.category.length ? 'flex' : 'none'}">
<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="15" height="15">
<path d="M512.200568 564.743248a76.81755 76.81755 0 0 1-30.973432-6.508227L108.22384 393.876696c-26.104541-11.508102-42.559305-35.754319-42.926671-63.272046-0.38374-27.439956 15.355733-52.052516 41.041741-64.231907L479.343229 89.632413c20.590967-9.736758 45.159526-9.754155 65.750493 0.017396l372.585787 176.739307c25.668613 12.1886 41.390689 36.792974 41.024346 64.231907-0.38374 27.500331-16.821107 51.729152-42.908252 63.237253L543.226189 558.235021a77.180823 77.180823 0 0 1-31.025621 6.508227zM139.841955 329.591577l370.21274 163.241898c1.291412 0.558725 3.018753 0.566912 4.344958-0.00921l369.758392-163.128311-369.706203-175.464267v-0.00921c-1.326205-0.62831-3.157923-0.636496-4.501524 0L139.841955 329.591577z m748.015342 1.858324h0.174985-0.174985zM512.375553 941.673993c-10.347672 0-20.799722-2.320858-30.53648-6.997368L121.048937 778.624477c-18.11252-7.834432-26.453489-28.870538-18.619056-46.983058 7.834432-18.11252 28.861328-26.488281 46.992267-18.609846L511.502673 869.659843l345.259418-156.366304c17.938558-8.165983 39.139415-0.252757 47.323819 17.746176 8.165983 17.96414 0.227174 39.156812-17.72878 47.323819L541.847795 934.973384c-9.196453 4.449335-19.282159 6.700609-29.472242 6.700609z" fill="#444444" p-id="37980"></path><path d="M871.563192 515.448542l-359.753527 156.326395-359.451652-155.987681v73.577763c0 13.701047 8.165983 26.084075 20.759813 31.479968L474.636021 750.035348c11.805884 5.702885 24.498974 8.54563 37.174667 8.54563s25.367761-2.842745 37.174668-8.54563l301.834396-129.501446a34.248012 34.248012 0 0 0 20.744463-31.473829v-73.611531z" fill="#ff6a18" p-id="37981"></path>
</svg>
<a class="link" rel="nofollow" href="${_.category.length && _.category[0].permalink}">${_.category.length && _.category[0].name}</a>
</div>
</div>
</div>
</li>
`)
})
$('.joe_load').removeAttr('loading')
$('.joe_load').html('查看更多')
$('.joe_index__list .joe_list__loading').hide()
new LazyLoad('.list_lazyload')
reslove(res.data.length > 0 ? res.data.length - 1 : 0)
}
})
})
}
initDom()
pushDom()
$('.joe_index__title-title .item').on('click', async function () {
if ($(this).attr('data-type') === queryData.type) return
queryData = { page: 1, pageSize: 10, type: $(this).attr('data-type') }
initDom()
pushDom()
})
$('.joe_load').on('click', async function () {
if ($(this).attr('loading')) return
queryData.page++
let length = await pushDom()
length = $('.joe_index__list .joe_list .joe_list__item').length - length
const queryElement = `.joe_index__list .joe_list .joe_list__item:nth-child(${length})`
const offset = $(queryElement).offset().top - $('.joe_header').height()
window.scrollTo({ top: offset - 15, behavior: 'smooth' })
})
}
/* 激活列表特效 */
{
const wow = $('.joe_index__list').attr('data-wow')
if (wow !== 'off' && wow) {
new WOW({
boxClass: 'wow',
animateClass: `animated ${wow}`,
offset: 0,
mobile: true,
live: true,
scrollContainer: null
}).init()
}
}
}

View File

@ -1 +1 @@
class LazyLoad{constructor(t){this.imglist=Array.from($(t)),this.init()}canILoad(){let t=this.imglist;for(let i=t.length;i--;)this.getBound(t[i])&&this.loadImage(t[i],i)}getBound(t){let i=t.getBoundingClientRect(),n=window.innerHeight;return i.top<=n}loadImage(t,i){let n=t.getAttribute("data-original");t.src=n,this.imglist.splice(i,1)}bindEvent(){$(window).on("scroll",()=>this.imglist.length&&this.canILoad()),$(window).on("resize",()=>this.imglist.length&&this.canILoad())}init(){this.canILoad(),this.bindEvent()}} '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}();

103
assets/js/joe.post.js Normal file
View File

@ -0,0 +1,103 @@
document.addEventListener('DOMContentLoaded', () => {
/* 获取本篇文章百度收录情况 */
{
$.ajax({
url: Joe.prototype.BASE_API,
type: 'POST',
data: { routeType: 'baidu_record', site: window.location.href },
success(res) {
if (res.data && res.data === '已收录') {
$('#Joe_Baidu_Record').css('color', '#67C23A')
$('#Joe_Baidu_Record').html('已收录')
} else {
const url = `https://ziyuan.baidu.com/linksubmit/url?sitename=${encodeURI(window.location.href)}`
$('#Joe_Baidu_Record').html(`<a target="_blank" href="${url}" rel="noopener noreferrer nofollow" style="color: #F56C6C">未收录,提交收录</a>`)
}
}
})
}
/* 激活代码高亮 */
{
Prism.highlightAll()
}
/* 激活图片预览功能 */
{
$('.joe_detail__article img:not(img.owo_image)').each(function () {
$(this).wrap($(`<div data-fancybox="Joe" href="${$(this).attr('src')}"></div>`))
})
}
/* 设置文章内的链接为新窗口打开 */
{
$('.joe_detail__article a').each(function () {
$(this).attr('target', '_blank')
})
}
/* 当前页的CID */
const cid = $('.joe_detail').attr('data-cid')
/* 激活浏览功能 */
{
let viewsArr = localStorage.getItem(Joe.prototype.encryption('views')) ? JSON.parse(Joe.prototype.decrypt(localStorage.getItem(Joe.prototype.encryption('views')))) : []
const flag = viewsArr.includes(cid)
if (!flag) {
$.ajax({
url: Joe.prototype.BASE_API,
type: 'POST',
data: { routeType: 'handle_views', cid },
success(res) {
if (res.code !== 1) return
$('#Joe_Article_Views').html(`${res.data.views} 阅读`)
viewsArr.push(cid)
const name = Joe.prototype.encryption('views')
const val = Joe.prototype.encryption(JSON.stringify(viewsArr))
localStorage.setItem(name, val)
}
})
}
}
/* 激活文章点赞功能 */
{
let agreeArr = localStorage.getItem(Joe.prototype.encryption('agree')) ? JSON.parse(Joe.prototype.decrypt(localStorage.getItem(Joe.prototype.encryption('agree')))) : []
if (agreeArr.includes(cid)) $('.joe_detail__agree .icon-1').addClass('active')
else $('.joe_detail__agree .icon-2').addClass('active')
let _loading = false
$('.joe_detail__agree .icon').on('click', function () {
if (_loading) return
_loading = true
agreeArr = localStorage.getItem(Joe.prototype.encryption('agree')) ? JSON.parse(Joe.prototype.decrypt(localStorage.getItem(Joe.prototype.encryption('agree')))) : []
let flag = agreeArr.includes(cid)
$.ajax({
url: Joe.prototype.BASE_API,
type: 'POST',
data: { routeType: 'handle_agree', cid, type: flag ? 'disagree' : 'agree' },
success(res) {
if (res.code !== 1) return
$('.joe_detail__agree .text').html(res.data.agree)
if (flag) {
const index = agreeArr.findIndex(_ => _ === cid)
agreeArr.splice(index, 1)
$('.joe_detail__agree .icon-1').removeClass('active')
$('.joe_detail__agree .icon-2').addClass('active')
$('.joe_detail__agree .icon').removeClass('active')
} else {
agreeArr.push(cid)
$('.joe_detail__agree .icon-2').removeClass('active')
$('.joe_detail__agree .icon-1').addClass('active')
$('.joe_detail__agree .icon').addClass('active')
}
const name = Joe.prototype.encryption('agree')
const val = Joe.prototype.encryption(JSON.stringify(agreeArr))
localStorage.setItem(name, val)
},
complete() {
_loading = false
}
})
})
}
})

View File

@ -79,7 +79,7 @@ function timerStop($precision = 3)
$mTime = explode(' ', microtime()); $mTime = explode(' ', microtime());
$timeEnd = $mTime[1] + $mTime[0]; $timeEnd = $mTime[1] + $mTime[0];
$timeTotal = number_format($timeEnd - $timeStart, $precision); $timeTotal = number_format($timeEnd - $timeStart, $precision);
echo $timeTotal < 1 ? $timeTotal * 1000 . "ms" : $timeTotal . "s"; echo '<span class="joe_time_count"><svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="15" height="15"><path d="M872 64c13.2544 0 24 10.7456 24 24 0 13.2544-10.7456 24-24 24h-104v177.456c0 67.0672-36.4912 128.8224-95.2368 161.1744l-111.0816 61.1744 111.328 61.536C731.6176 605.7328 768 667.4112 768 734.376V912h104c13.2544 0 24 10.7456 24 24 0 13.2544-10.7456 24-24 24H152c-13.2544 0-24-10.7456-24-24 0-13.2544 10.7456-24 24-24h104V734.544c0-67.0672 36.4912-128.8224 95.2368-161.1744l111.08-61.176-111.328-61.5328C292.3824 418.2656 256 356.5872 256 289.6224V112H152c-13.2544 0-24-10.7456-24-24 0-13.2544 10.7456-24 24-24h720zM512.4 539.4112l-138.0064 76.0032A136 136 0 0 0 304 734.544V912h416V734.3776a136 136 0 0 0-70.2096-119.0272l-137.3904-75.9392zM720 112H304v177.6224a136 136 0 0 0 70.2096 119.0272l137.3904 75.9392 138.0064-76.0032A136 136 0 0 0 720 289.456V112z" fill="#979797" p-id="2750"></path></svg>' . ($timeTotal < 1 ? $timeTotal * 1000 . 'ms' : $timeTotal . 's') . '</span>';
} }
function _getAvatarByMail($mail) function _getAvatarByMail($mail)

View File

@ -162,6 +162,31 @@ function themeConfig($form)
$JList_Animate->setAttribute('class', 'joe_content joe_global'); $JList_Animate->setAttribute('class', 'joe_content joe_global');
$form->addInput($JList_Animate->multiMode()); $form->addInput($JList_Animate->multiMode());
$JFooter_Left = new Typecho_Widget_Helper_Form_Element_Textarea(
'JFooter_Left',
NULL,
'<span class="info">
2019 - 2020 © Reach - <a href="http://ae.js.cn" target="_blank" rel="noopener noreferrer">Joe</a>
</span>',
'自定义底部栏左侧内容(非必填)',
'介绍:用于修改全站底部左侧内容 <br>
例如2019 - 2020 © Reach - Joe '
);
$JFooter_Left->setAttribute('class', 'joe_content joe_global');
$form->addInput($JFooter_Left);
$JFooter_Right = new Typecho_Widget_Helper_Form_Element_Textarea(
'JFooter_Right',
NULL,
'<a href="https://ae.js.cn/feed/" target="_blank" rel="noopener noreferrer">RSS</a>
<a href="https://ae.js.cn/index.php/sitemap" target="_blank" rel="noopener noreferrer" style="margin-left: 15px">MAP</a>',
'自定义底部栏右侧内容(非必填)',
'介绍:用于修改全站底部右侧内容 <br>
例如:&lt;a href="/"&gt;首页&lt;/a&gt; &lt;a href="/"&gt;关于&lt;/a&gt;'
);
$JFooter_Right->setAttribute('class', 'joe_content joe_global');
$form->addInput($JFooter_Right);
$JAside = new Typecho_Widget_Helper_Form_Element_Checkbox( $JAside = new Typecho_Widget_Helper_Form_Element_Checkbox(
'JAside', 'JAside',
array( array(

View File

@ -15,6 +15,7 @@
<head> <head>
<?php $this->need('public/include.php'); ?> <?php $this->need('public/include.php'); ?>
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.index.css'); ?>"> <link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.index.css'); ?>">
<script src="<?php $this->options->themeUrl('assets/js/joe.index.js'); ?>"></script>
</head> </head>
<body> <body>
@ -128,7 +129,7 @@
<?php endif; ?> <?php endif; ?>
<div class="joe_index__title"> <div class="joe_index__title">
<!-- Index Title --> <!-- Index Title -->
<ul class="joe_index__title-title"> <ul class="joe_index__title-title">
<li class="item" data-type="created">最新文章</li> <li class="item" data-type="created">最新文章</li>

View File

@ -4,6 +4,7 @@
<head> <head>
<?php $this->need('public/include.php'); ?> <?php $this->need('public/include.php'); ?>
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.post.css'); ?>"> <link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.post.css'); ?>">
<script src="<?php $this->options->themeUrl('assets/js/joe.post.js'); ?>"></script>
</head> </head>
<body> <body>
@ -32,10 +33,6 @@
<div class="joe_container"> <div class="joe_container">
<div class="joe_main joe_post"> <div class="joe_main joe_post">
<?php $this->need('public/article.php'); ?> <?php $this->need('public/article.php'); ?>
<ul class="joe_post__page">
<?php $this->theNext('<li class="joe_post__page-item">%s</li>', '', ['title' => '上一篇']); ?>
<?php $this->thePrev('<li class="joe_post__page-item">%s</li>', '', ['title' => '下一篇']); ?>
</ul>
</div> </div>
<?php $this->need('public/aside.php'); ?> <?php $this->need('public/aside.php'); ?>
</div> </div>

View File

@ -93,23 +93,4 @@
</div> </div>
</div> </div>
</div> </div>
<?php $this->related(4)->to($item); ?>
<?php if ($item->have()) : ?>
<div class="joe_detail__related">
<h5 class="joe_detail__related-title">相关推荐</h5>
<ul class="joe_detail__related-list">
<?php while ($item->next()) : ?>
<li class="item">
<a class="link" href="<?php $item->permalink(); ?>" title="<?php $item->title(); ?>">
<figure class="inner">
<img class="image lazyload" onerror="<?php _getLazyload() ?>" src="<?php _getLazyload(); ?>" data-original="<?php _getThumbnail($item); ?>" alt="<?php $item->title(); ?>" />
<figcaption class="title"><?php $item->title(); ?></figcaption>
</figure>
</a>
</li>
<?php endwhile; ?>
</ul>
</div>
<?php endif; ?>
</div> </div>

View File

@ -1 +1,19 @@
<?php timerStop(); <div class="joe_footer">
<div class="joe_container">
<div class="left">
<?php $this->options->JFooter_Left() ?>
<?php timerStop(); ?>
</div>
<div class="right">
<?php $this->options->JFooter_Right() ?>
</div>
</div>
</div>
<div class="joe_action">
<div class="joe_action_item scroll">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="25" height="25">
<path d="M725.902222 498.915556c18.204444-251.448889-93.297778-410.737778-205.368889-475.591112l-6.257777-3.982222-6.257778 3.413334c-111.502222 64.853333-224.711111 224.142222-204.8 475.591111-55.751111 53.475556-80.213333 116.622222-80.213334 204.8v15.36l179.2-35.271111c11.377778 40.391111 58.595556 69.973333 113.208889 69.973333 54.613333 0 101.262222-29.582222 112.64-68.835556l180.337778 36.408889V705.422222c-0.568889-89.884444-25.031111-153.6-82.488889-206.506666zM571.733333 392.533333c-33.564444 31.288889-87.04 28.444444-118.328889-5.12s-28.444444-87.04 5.12-117.76c33.564444-31.288889 87.04-28.444444 118.328889 5.12s28.444444 86.471111-5.12 117.76zM515.413333 761.173333c-35.84 0-64.284444 29.013333-64.284444 64.284445 0 35.84 54.044444 182.613333 64.284444 182.613333s64.284444-146.773333 64.284445-182.613333c0-35.271111-29.013333-64.284444-64.284445-64.284445z"></path>
</svg>
</div>
</div>

View File

@ -17,7 +17,7 @@
<?php endforeach; ?> <?php endforeach; ?>
<div class="joe_dropdown" trigger="click" placement="60px"> <div class="joe_dropdown" trigger="click" placement="60px">
<div class="joe_dropdown__link"> <div class="joe_dropdown__link">
<a href="javascript: void(0)" rel="nofollow">更多</a> <a href="#" rel="nofollow">更多</a>
<svg class="joe_dropdown__link-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="14" height="14"> <svg class="joe_dropdown__link-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="14" height="14">
<path d="M561.873 725.165c-11.262 11.262-26.545 21.72-41.025 18.502-14.479 2.413-28.154-8.849-39.415-18.502L133.129 375.252c-17.697-17.696-17.697-46.655 0-64.352s46.655-17.696 64.351 0l324.173 333.021 324.977-333.02c17.696-17.697 46.655-17.697 64.351 0s17.697 46.655 0 64.351L561.873 725.165z" p-id="3535" fill="var(--main)"></path> <path d="M561.873 725.165c-11.262 11.262-26.545 21.72-41.025 18.502-14.479 2.413-28.154-8.849-39.415-18.502L133.129 375.252c-17.697-17.696-17.697-46.655 0-64.352s46.655-17.696 64.351 0l324.173 333.021 324.977-333.02c17.696-17.697 46.655-17.697 64.351 0s17.697 46.655 0 64.351L561.873 725.165z" p-id="3535" fill="var(--main)"></path>
</svg> </svg>

View File

@ -5,8 +5,7 @@
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, shrink-to-fit=no, viewport-fit=cover"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, shrink-to-fit=no, viewport-fit=cover">
<link rel="shortcut icon" href="<?php $this->options->JFavicon() ?>" /> <link rel="shortcut icon" href="<?php $this->options->JFavicon() ?>" />
<?php $this->header(); ?> <?php $this->header(); ?>
<title><?php $this->options->title(); ?></title> <title><?php $this->archiveTitle(array('category' => '分类 %s 下的文章', 'search' => '包含关键字 %s 的文章', 'tag' => '标签 %s 下的文章', 'author' => '%s 发布的文章'), '', ' - '); ?><?php $this->options->title(); ?></title>
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.normalize.css'); ?>"> <link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.normalize.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.global.css'); ?>"> <link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.global.css'); ?>">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@5.4.5/css/swiper.min.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@5.4.5/css/swiper.min.css" />
@ -14,7 +13,6 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.7.2/animate.min.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.7.2/animate.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-tomorrow.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-tomorrow.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
<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/npm/swiper@5.4.5/js/swiper.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/swiper@5.4.5/js/swiper.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe/assets/js/joe.scroll.js"></script> <script src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe/assets/js/joe.scroll.js"></script>