0.2.0 版本发布
This commit is contained in:
1 parent
28f74e7a38
commit
b6bff1bc80
12 files changed
+4237
-50
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -10,7 +10,7 @@ function isMobile() {
|
||||
// 文章图片灯箱
|
||||
window.ViewImage && ViewImage.init('.post-content img');
|
||||
|
||||
// 激活返回顶部插件
|
||||
// 激活返回顶部插件
|
||||
$(function () {
|
||||
$.scrollUp({
|
||||
animation: 'fade',
|
||||
@@ -145,4 +145,69 @@ function flattenComments(comments) {
|
||||
// 调用异步的弹幕加载函数
|
||||
if (document.querySelector("#Comments") && !isMobile()) {
|
||||
loadBarrager()
|
||||
}
|
||||
}
|
||||
|
||||
// 灯箱调用(首页顶部/Memos页面)
|
||||
window.ViewImage && ViewImage.init('.content_zhengwen img, .top-img,.gallery-thumbnail img,.posts_photo a,.photo-moment a');
|
||||
|
||||
// 页面上滑加载动画
|
||||
function animateSummaries() {
|
||||
const articles = document.querySelectorAll('.img-hide,.retu-hide'); // 包含新的类
|
||||
const shuffledArticles = Array.from(articles).sort(() => Math.random() - 0.5);
|
||||
|
||||
function animate(article, delay) {
|
||||
setTimeout(() => {
|
||||
article.classList.add('visible');
|
||||
}, delay);
|
||||
}
|
||||
|
||||
const options = {
|
||||
rootMargin: '0px 0px -70px 0px',
|
||||
};
|
||||
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
entries.forEach((entry, index) => {
|
||||
if (entry.isIntersecting) {
|
||||
// 类名 retu-hide 延迟 100 默认 img-hide 延迟 8,实现错落效果
|
||||
const delay = entry.target.classList.contains('retu-hide') ? index * 100 : index * 8;
|
||||
animate(entry.target, delay);
|
||||
observer.unobserve(entry.target);
|
||||
}
|
||||
});
|
||||
}, options);
|
||||
|
||||
shuffledArticles.forEach((article) => {
|
||||
observer.observe(article);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function initEditor() {
|
||||
const loadEditorBtn = document.getElementById("loadEditorBtn");
|
||||
const memosEditor = document.querySelector(".memos-editor");
|
||||
const editorBody = document.querySelector('.index-laodao');
|
||||
|
||||
if (loadEditorBtn) {
|
||||
loadEditorBtn.addEventListener("click", function () {
|
||||
// 切换编辑器显示状态
|
||||
getEditor != "show" ? hasMemosOpenId() : '';
|
||||
memosEditor.classList.toggle("d-none");
|
||||
|
||||
// 保存编辑器显示状态到 localStorage
|
||||
if (window.localStorage) {
|
||||
const isHidden = memosEditor.classList.contains("d-none");
|
||||
window.localStorage.setItem("memos-editor-display", isHidden ? "hide" : "show");
|
||||
getEditor = window.localStorage.getItem("memos-editor-display");
|
||||
}
|
||||
|
||||
// 平滑滚动到 .index-laodao
|
||||
if (editorBody && !memosEditor.classList.contains("d-none")) {
|
||||
editorBody.scrollIntoView({ behavior: 'smooth' });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化编辑器逻辑
|
||||
initEditor();
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,247 @@
|
||||
{
|
||||
"Emoji": {
|
||||
"type": "emoji",
|
||||
"container":[
|
||||
{
|
||||
"icon": "😂",
|
||||
"text": "哭笑不得"
|
||||
},
|
||||
{
|
||||
"icon": "😎",
|
||||
"text": "酷"
|
||||
},
|
||||
{
|
||||
"icon": "😏",
|
||||
"text": "坏笑"
|
||||
},
|
||||
{
|
||||
"icon": "😅",
|
||||
"text": "流汗"
|
||||
},
|
||||
{
|
||||
"icon": "😄",
|
||||
"text": "笑"
|
||||
},
|
||||
{
|
||||
"icon": "😜",
|
||||
"text": "调皮"
|
||||
},
|
||||
{
|
||||
"icon": "🤣",
|
||||
"text": "笑倒"
|
||||
},
|
||||
{
|
||||
"icon": "😭",
|
||||
"text": "大哭"
|
||||
},
|
||||
{
|
||||
"icon": "🙄",
|
||||
"text": "白眼"
|
||||
},
|
||||
{
|
||||
"icon": "🤐",
|
||||
"text": "嘘"
|
||||
},
|
||||
{
|
||||
"icon": "😋",
|
||||
"text": "美食脸"
|
||||
},
|
||||
{
|
||||
"icon": "🥶",
|
||||
"text": "冰冻"
|
||||
},
|
||||
{
|
||||
"icon": "🥵",
|
||||
"text": "热"
|
||||
},
|
||||
{
|
||||
"icon": "😴",
|
||||
"text": "睡觉"
|
||||
},
|
||||
{
|
||||
"icon": "🤧",
|
||||
"text": "打喷嚏"
|
||||
},
|
||||
{
|
||||
"icon": "🍉",
|
||||
"text": "西瓜"
|
||||
},
|
||||
{
|
||||
"icon": "😱",
|
||||
"text": "惊恐"
|
||||
},
|
||||
{
|
||||
"icon": "👋",
|
||||
"text": "招手"
|
||||
},
|
||||
{
|
||||
"icon": "🔨",
|
||||
"text": "锤子"
|
||||
},
|
||||
{
|
||||
"icon": "🐶",
|
||||
"text": "小狗"
|
||||
},
|
||||
{
|
||||
"icon": "👏",
|
||||
"text": "鼓掌"
|
||||
},
|
||||
{
|
||||
"icon": "🙈",
|
||||
"text": "不看"
|
||||
},
|
||||
{
|
||||
"icon": "😓",
|
||||
"text": "汗"
|
||||
},
|
||||
{
|
||||
"icon": "😍",
|
||||
"text": "爱心眼"
|
||||
},
|
||||
{
|
||||
"icon": "🤝",
|
||||
"text": "握手"
|
||||
},
|
||||
{
|
||||
"icon": "🥺",
|
||||
"text": "求你"
|
||||
},
|
||||
{
|
||||
"icon": "😔",
|
||||
"text": "沮丧"
|
||||
},
|
||||
{
|
||||
"icon": "😪",
|
||||
"text": "困"
|
||||
},
|
||||
{
|
||||
"icon": "😕",
|
||||
"text": "困惑"
|
||||
},
|
||||
{
|
||||
"icon": "🤷♂️",
|
||||
"text": "摊手"
|
||||
},
|
||||
{
|
||||
"icon": "😛",
|
||||
"text": "舌头"
|
||||
},
|
||||
{
|
||||
"icon": "🤭",
|
||||
"text": "偷笑"
|
||||
},
|
||||
{
|
||||
"icon": "🤮",
|
||||
"text": "呕吐"
|
||||
},
|
||||
{
|
||||
"icon": "🥺",
|
||||
"text": "求你"
|
||||
},
|
||||
{
|
||||
"icon": "🙂",
|
||||
"text": "轻松的笑"
|
||||
},
|
||||
{
|
||||
"icon": "😈",
|
||||
"text": "恶魔"
|
||||
},
|
||||
{
|
||||
"icon": "😃",
|
||||
"text": "笑脸"
|
||||
},
|
||||
{
|
||||
"icon": "🤫",
|
||||
"text": "嘘"
|
||||
},
|
||||
{
|
||||
"icon": "😒",
|
||||
"text": "无语"
|
||||
},
|
||||
{
|
||||
"icon": "😵",
|
||||
"text": "晕"
|
||||
},
|
||||
{
|
||||
"icon": "💪",
|
||||
"text": "加油"
|
||||
},
|
||||
{
|
||||
"icon": "👍",
|
||||
"text": "赞"
|
||||
},
|
||||
{
|
||||
"icon": "👎",
|
||||
"text": "踩"
|
||||
},
|
||||
{
|
||||
"icon": "😡",
|
||||
"text": "愤怒"
|
||||
},
|
||||
{
|
||||
"icon": "🤬",
|
||||
"text": "怒骂"
|
||||
},
|
||||
{
|
||||
"icon": "😖",
|
||||
"text": "心烦"
|
||||
},
|
||||
{
|
||||
"icon": "🌹",
|
||||
"text": "玫瑰"
|
||||
},
|
||||
{
|
||||
"icon": "🏃",
|
||||
"text": "跑步"
|
||||
},
|
||||
{
|
||||
"icon": "😆",
|
||||
"text": "大笑"
|
||||
},
|
||||
{
|
||||
"icon": "💵",
|
||||
"text": "钞票"
|
||||
},
|
||||
{
|
||||
"icon": "😘",
|
||||
"text": "飞吻"
|
||||
},
|
||||
{
|
||||
"icon": "😷",
|
||||
"text": "生病"
|
||||
},
|
||||
{
|
||||
"icon": "🤕",
|
||||
"text": "受伤"
|
||||
},
|
||||
{
|
||||
"icon": "🎉",
|
||||
"text": "庆祝"
|
||||
},
|
||||
{
|
||||
"icon": "❤️",
|
||||
"text": "红心"
|
||||
},
|
||||
{
|
||||
"icon": "💔",
|
||||
"text": "心碎"
|
||||
},
|
||||
{
|
||||
"icon": "😣",
|
||||
"text": "无奈"
|
||||
},
|
||||
{
|
||||
"icon": "😘",
|
||||
"text": "飞吻"
|
||||
},
|
||||
{
|
||||
"icon": "💩",
|
||||
"text": "一坨便便"
|
||||
},
|
||||
{
|
||||
"icon": "🤩",
|
||||
"text": "爱慕"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user