diff --git a/404.php b/404.php index 63c1ed5..11b91d0 100644 --- a/404.php +++ b/404.php @@ -10,7 +10,6 @@ link.href = 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700'; link.rel = 'stylesheet'; link.onerror = function() { - console.warn('Google Fonts 加载失败,使用系统字体'); document.body.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'; }; document.head.appendChild(link); diff --git a/ai-summary-query.php b/ai-summary-query.php index a5fa3a9..d908644 100644 --- a/ai-summary-query.php +++ b/ai-summary-query.php @@ -13,7 +13,7 @@ $error = ''; if (!empty($query_code)) { if (strlen($query_code) !== 8) { - $error = __('识别码格式无效,应为 8 位字符', 'argon'); + $error = __('识别码格式无效', 'argon'); } else { global $wpdb; $post_id = $wpdb->get_var($wpdb->prepare( @@ -32,7 +32,6 @@ if (!empty($query_code)) { 'post_modified' => get_the_modified_date('Y-m-d H:i:s', $post_id), 'post_author' => get_the_author_meta('display_name', $post->post_author), 'summary' => get_post_meta($post_id, '_argon_ai_summary', true), - 'summary_hash' => get_post_meta($post_id, '_argon_ai_summary_hash', true), 'model' => get_post_meta($post_id, '_argon_ai_summary_model', true), 'provider' => get_post_meta($post_id, '_argon_ai_summary_provider', true), 'generated_time' => get_post_meta($post_id, '_argon_ai_summary_time', true), @@ -52,9 +51,6 @@ if (!empty($query_code)) { ]; $result['provider_display'] = isset($provider_names[$result['provider']]) ? $provider_names[$result['provider']] : $result['provider']; - - $current_hash = md5($post->post_content . $post->post_title); - $result['is_modified'] = ($result['summary_hash'] !== $current_hash); } else { $error = __('文章不存在或未发布', 'argon'); } @@ -199,8 +195,7 @@ html.darkmode .ai-verify-subtitle { color: #aaa; }
-

-

+

@@ -227,24 +222,6 @@ html.darkmode .ai-verify-subtitle { color: #aaa; } - -
- -
-
- -
-
- -
- -
-
- -
-
- -

@@ -271,16 +248,6 @@ html.darkmode .ai-verify-subtitle { color: #aaa; } -
- - - - - - - - -

@@ -315,10 +282,9 @@ html.darkmode .ai-verify-subtitle { color: #aaa; }

diff --git a/argontheme.js b/argontheme.js index 277543f..8f4f8cf 100644 --- a/argontheme.js +++ b/argontheme.js @@ -2662,20 +2662,6 @@ $(document).on("click" , "#blog_categories .tag" , function(){ var header = $(this); var isExpanded = section.hasClass("expanded"); - // 添加点击波纹效果 - var ripple = $(''); - var rect = this.getBoundingClientRect(); - var x = e.clientX - rect.left; - var y = e.clientY - rect.top; - ripple.css({ - left: x + 'px', - top: y + 'px' - }); - header.append(ripple); - setTimeout(function() { - ripple.remove(); - }, 600); - // 切换展开状态 section.toggleClass("expanded"); @@ -3776,35 +3762,7 @@ void 0; (function() { 'use strict'; - // 1. 触摸涟漪效果 - function createRipple(event, element) { - if (window.matchMedia('(hover: hover)').matches) return; - var rect = element.getBoundingClientRect(); - var ripple = document.createElement('span'); - var size = Math.max(rect.width, rect.height); - ripple.style.width = ripple.style.height = size + 'px'; - ripple.style.left = ((event.clientX || event.touches[0].clientX) - rect.left - size / 2) + 'px'; - ripple.style.top = ((event.clientY || event.touches[0].clientY) - rect.top - size / 2) + 'px'; - ripple.className = 'touch-ripple'; - var oldRipple = element.querySelector('.touch-ripple'); - if (oldRipple) oldRipple.remove(); - element.style.position = 'relative'; - element.style.overflow = 'hidden'; - element.appendChild(ripple); - setTimeout(function() { ripple.remove(); }, 600); - } - - function initRippleEffect() { - // 排除大尺寸卡片(文章、评论区、相关文章、页脚等),避免触摸时产生布局问题 - var rippleElements = document.querySelectorAll('.btn, .card:not(article.post):not(#comments):not(#post_comment):not(.related-posts):not(.post-navigation):not(#footer), .nav-link, .dropdown-item, .page-link, .leftbar-mobile-menu-item > a, .leftbar-mobile-action, .fabtn, .comment-reply, .tag, .badge'); - rippleElements.forEach(function(el) { - if (el.dataset.rippleInit) return; - el.dataset.rippleInit = 'true'; - el.addEventListener('touchstart', function(e) { createRipple(e, this); }, { passive: true }); - }); - } - - // 2. 图片加载动画 + // 1. 图片加载动画 function initImageLoadAnimation() { var images = document.querySelectorAll('article img[loading="lazy"], .post-thumbnail img'); images.forEach(function(img) { @@ -3875,7 +3833,7 @@ void 0; jQuery('#primary').removeClass('pjax-loading'); var bar = document.getElementById('page-loading-bar'); if (bar) { bar.style.width = '100%'; setTimeout(function() { bar.style.opacity = '0'; setTimeout(function() { bar.remove(); }, 300); }, 200); } - setTimeout(function() { initRippleEffect(); initImageLoadAnimation(); initScrollAnimations(); initSmoothScroll(); }, 100); + setTimeout(function() { initImageLoadAnimation(); initScrollAnimations(); initSmoothScroll(); }, 100); }); } @@ -3895,7 +3853,6 @@ void 0; // 初始化 function init() { checkReducedMotion(); - initRippleEffect(); initImageLoadAnimation(); initScrollAnimations(); initSmoothScroll(); diff --git a/assets/vendor/external/js-fallback.js b/assets/vendor/external/js-fallback.js deleted file mode 100644 index b200338..0000000 --- a/assets/vendor/external/js-fallback.js +++ /dev/null @@ -1,328 +0,0 @@ -/* JavaScript 功能备用系统 - 确保基本功能始终可用 */ -(function() { - 'use strict'; - - // 检查并提供基本的 JavaScript 功能 - window.ArgonFallback = { - // 初始化备用系统 - init: function() { - this.checkDependencies(); - this.provideFallbacks(); - this.bindEvents(); - console.log('JavaScript 备用系统已启动'); - }, - - // 检查依赖项 - checkDependencies: function() { - var missing = []; - - // 检查 jQuery - if (typeof jQuery === 'undefined') { - missing.push('jQuery'); - this.provideJQueryFallback(); - } - - // 检查其他关键库 - if (typeof bootstrap === 'undefined') { - missing.push('Bootstrap'); - } - - if (missing.length > 0) { - console.warn('缺少依赖项:', missing.join(', ')); - } - }, - - // 提供 jQuery 基本功能备用 - provideJQueryFallback: function() { - window.$ = window.jQuery = function(selector) { - return new jQueryFallback(selector); - }; - - // 扩展 jQuery 对象 - $.fn = jQueryFallback.prototype; - $.extend = function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (source.hasOwnProperty(key)) { - target[key] = source[key]; - } - } - } - return target; - }; - - console.log('jQuery 备用版本已加载'); - }, - - // 提供其他备用功能 - provideFallbacks: function() { - // 模态框功能 - this.provideModalFallback(); - - // 工具提示功能 - this.provideTooltipFallback(); - - // 下拉菜单功能 - this.provideDropdownFallback(); - }, - - // 模态框备用 - provideModalFallback: function() { - window.showModal = function(content, title) { - var modal = document.createElement('div'); - modal.className = 'modal show'; - modal.innerHTML = - ''; - document.body.appendChild(modal); - - // 点击背景关闭 - modal.addEventListener('click', function(e) { - if (e.target === modal) { - modal.remove(); - } - }); - }; - }, - - // 工具提示备用 - provideTooltipFallback: function() { - document.addEventListener('mouseover', function(e) { - var element = e.target; - var tooltip = element.getAttribute('title') || element.getAttribute('data-tooltip'); - - if (tooltip && !element.querySelector('.tooltip-fallback')) { - var tooltipEl = document.createElement('div'); - tooltipEl.className = 'tooltip-fallback'; - tooltipEl.textContent = tooltip; - tooltipEl.style.cssText = - 'position: absolute; background: #333; color: #fff; padding: 4px 8px; ' + - 'border-radius: 4px; font-size: 12px; z-index: 1000; pointer-events: none;'; - - document.body.appendChild(tooltipEl); - - var rect = element.getBoundingClientRect(); - tooltipEl.style.left = rect.left + 'px'; - tooltipEl.style.top = (rect.top - tooltipEl.offsetHeight - 5) + 'px'; - - element.addEventListener('mouseleave', function() { - if (tooltipEl.parentNode) { - tooltipEl.parentNode.removeChild(tooltipEl); - } - }); - } - }); - }, - - // 下拉菜单备用 - provideDropdownFallback: function() { - document.addEventListener('click', function(e) { - var toggle = e.target.closest('[data-toggle="dropdown"]'); - if (toggle) { - e.preventDefault(); - var menu = toggle.nextElementSibling; - if (menu && menu.classList.contains('dropdown-menu')) { - menu.style.display = menu.style.display === 'block' ? 'none' : 'block'; - } - } - - // 关闭其他下拉菜单 - var openMenus = document.querySelectorAll('.dropdown-menu[style*="block"]'); - openMenus.forEach(function(menu) { - if (!menu.contains(e.target) && !menu.previousElementSibling.contains(e.target)) { - menu.style.display = 'none'; - } - }); - }); - }, - - // 绑定事件 - bindEvents: function() { - var self = this; - - // 监听错误事件 - window.addEventListener('error', function(e) { - console.warn('JavaScript 错误:', e.message); - self.handleError(e); - }); - - // 监听未处理的 Promise 拒绝 - window.addEventListener('unhandledrejection', function(e) { - console.warn('未处理的 Promise 拒绝:', e.reason); - }); - }, - - // 错误处理 - handleError: function(error) { - // 尝试恢复基本功能 - if (error.message.includes('jQuery') || error.message.includes('$')) { - this.provideJQueryFallback(); - } - } - }; - - // jQuery 备用实现 - function jQueryFallback(selector) { - this.elements = []; - - if (typeof selector === 'string') { - this.elements = Array.from(document.querySelectorAll(selector)); - } else if (selector && selector.nodeType) { - this.elements = [selector]; - } else if (selector && typeof selector === 'object' && selector.length !== undefined) { - this.elements = Array.from(selector); - } - - this.length = this.elements.length; - return this; - } - - // jQuery 方法实现 - jQueryFallback.prototype = { - each: function(callback) { - this.elements.forEach(callback); - return this; - }, - - on: function(event, handler) { - this.elements.forEach(function(el) { - el.addEventListener(event, handler); - }); - return this; - }, - - off: function(event, handler) { - this.elements.forEach(function(el) { - el.removeEventListener(event, handler); - }); - return this; - }, - - click: function(handler) { - if (handler) { - return this.on('click', handler); - } else { - this.elements.forEach(function(el) { - el.click(); - }); - return this; - } - }, - - addClass: function(className) { - this.elements.forEach(function(el) { - el.classList.add(className); - }); - return this; - }, - - removeClass: function(className) { - this.elements.forEach(function(el) { - el.classList.remove(className); - }); - return this; - }, - - toggleClass: function(className) { - this.elements.forEach(function(el) { - el.classList.toggle(className); - }); - return this; - }, - - hasClass: function(className) { - return this.elements.some(function(el) { - return el.classList.contains(className); - }); - }, - - html: function(content) { - if (content !== undefined) { - this.elements.forEach(function(el) { - el.innerHTML = content; - }); - return this; - } else { - return this.elements[0] ? this.elements[0].innerHTML : ''; - } - }, - - text: function(content) { - if (content !== undefined) { - this.elements.forEach(function(el) { - el.textContent = content; - }); - return this; - } else { - return this.elements[0] ? this.elements[0].textContent : ''; - } - }, - - hide: function() { - this.elements.forEach(function(el) { - el.style.display = 'none'; - }); - return this; - }, - - show: function() { - this.elements.forEach(function(el) { - el.style.display = ''; - }); - return this; - }, - - fadeIn: function(duration) { - this.elements.forEach(function(el) { - el.style.opacity = '0'; - el.style.display = ''; - var start = Date.now(); - var timer = setInterval(function() { - var progress = (Date.now() - start) / (duration || 400); - if (progress >= 1) { - el.style.opacity = '1'; - clearInterval(timer); - } else { - el.style.opacity = progress; - } - }, 16); - }); - return this; - }, - - fadeOut: function(duration) { - this.elements.forEach(function(el) { - var start = Date.now(); - var startOpacity = parseFloat(getComputedStyle(el).opacity); - var timer = setInterval(function() { - var progress = (Date.now() - start) / (duration || 400); - if (progress >= 1) { - el.style.display = 'none'; - clearInterval(timer); - } else { - el.style.opacity = startOpacity * (1 - progress); - } - }, 16); - }); - return this; - } - }; - - // 页面加载完成后初始化 - if (document.readyState === 'loading') { - document.addEventListener('DOMContentLoaded', function() { - ArgonFallback.init(); - }); - } else { - ArgonFallback.init(); - } -})(); \ No newline at end of file diff --git a/header.php b/header.php index ded0b98..683bf03 100644 --- a/header.php +++ b/header.php @@ -748,12 +748,6 @@ if ($card_opacity == '' || $card_opacity == '1') { } - - diff --git a/page-ai-summary-query.php b/page-ai-summary-query.php deleted file mode 100644 index e7d6ec8..0000000 --- a/page-ai-summary-query.php +++ /dev/null @@ -1,204 +0,0 @@ -get_var($wpdb->prepare( - "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = '_argon_ai_summary_code' AND meta_value = %s", - $query_code - )); - - if ($post_id) { - $post = get_post($post_id); - if ($post && $post->post_status === 'publish') { - $result = [ - 'post_id' => $post_id, - 'post_title' => get_the_title($post_id), - 'post_url' => get_permalink($post_id), - 'post_date' => get_the_date('Y-m-d H:i:s', $post_id), - 'post_author' => get_the_author_meta('display_name', $post->post_author), - 'summary' => get_post_meta($post_id, '_argon_ai_summary', true), - 'model' => get_post_meta($post_id, '_argon_ai_summary_model', true), - 'provider' => get_post_meta($post_id, '_argon_ai_summary_provider', true), - 'generated_time' => get_post_meta($post_id, '_argon_ai_summary_time', true), - 'code' => $query_code - ]; - - // 提供商名称映射 - $provider_names = [ - 'openai' => 'OpenAI', - 'anthropic' => 'Anthropic', - 'deepseek' => 'DeepSeek', - 'qianwen' => '通义千问', - 'wenxin' => '文心一言', - 'doubao' => '豆包', - 'kimi' => 'Kimi', - 'zhipu' => '智谱', - 'siliconflow' => 'SiliconFlow' - ]; - - $result['provider_display'] = isset($provider_names[$result['provider']]) ? $provider_names[$result['provider']] : $result['provider']; - } else { - $error = __('文章不存在或未发布', 'argon'); - } - } else { - $error = __('未找到对应的摘要记录', 'argon'); - } - } -} -?> - -
-
-
-
-
-

- - -

- - -
-
- - -
-
- - - -
- -
- - -
- -
-

- - -

-
- -
-
- - -
-

- - -

-
-
- : - - - -
-
- : - -
-
- : - -
-
- : - -
-
-
- - -
-

- - -

-
- -
-
- - -
-

- - -

-
-
- : - -
-
- : - -
-
- : - -
-
-
- - - -
- - -
-

- - -

-
    -
  • -
  • -
  • -
  • -
-
- -
-
-
-
-
- - diff --git a/settings.php b/settings.php index f188ef7..3cd4131 100644 --- a/settings.php +++ b/settings.php @@ -3072,34 +3072,6 @@ window.pjaxLoaded = function(){

- - - - -

- - - - - - - -

- - - @@ -6067,8 +6039,6 @@ function argon_update_themeoptions(){ argon_update_option('argon_disable_pjax_animation'); // 动画效果相关配置 - argon_update_option('argon_card_hover_effect'); - argon_update_option('argon_button_click_effect'); argon_update_option('argon_fab_show_darkmode_button');