From 85ce278768136f058f304cb38435b5451f0774bb Mon Sep 17 00:00:00 2001 From: liaoxin Date: Sun, 3 May 2026 20:35:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E7=AC=BA=E6=9C=AA=E5=AF=84=20v1.0=20?= =?UTF-8?q?=E2=80=94=20=E5=9F=BA=E4=BA=8E=20DeepSeek=20UI=20=E7=9A=84=20Wo?= =?UTF-8?q?rdPress=20=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 页面:首页、笺文、微言、拾影、文章详情、作者页 功能:三种展示方式、tucao 自定义类型、评论、分页、灯箱 CSS:DeepSeek 原 CSS + 系统字体 + 头像本地化 安装:激活主题后自动创建页面和导航,刷新固定链接即可 --- 404.php | 12 ++ archive-tucao.php | 48 ++++++++ archive.php | 48 ++++++++ assets/js/lightbox.js | 70 +++++++++++ author.php | 74 ++++++++++++ comments.php | 55 +++++++++ footer.php | 24 ++++ functions.php | 190 +++++++++++++++++++++++++++++ header.php | 38 ++++++ index.php | 152 +++++++++++++++++++++++ page-articles.php | 54 +++++++++ page-photos.php | 44 +++++++ page.php | 12 ++ single.php | 49 ++++++++ style.css | 272 ++++++++++++++++++++++++++++++++++++++++++ 15 files changed, 1142 insertions(+) create mode 100644 404.php create mode 100644 archive-tucao.php create mode 100644 archive.php create mode 100644 assets/js/lightbox.js create mode 100644 author.php create mode 100644 comments.php create mode 100644 footer.php create mode 100644 functions.php create mode 100644 header.php create mode 100644 index.php create mode 100644 page-articles.php create mode 100644 page-photos.php create mode 100644 page.php create mode 100644 single.php create mode 100644 style.css diff --git a/404.php b/404.php new file mode 100644 index 0000000..2035ce8 --- /dev/null +++ b/404.php @@ -0,0 +1,12 @@ + + +
+

404

+

此页未寄,或许还在途中。

+

+ ← 返回首页 +

+
+ + diff --git a/archive-tucao.php b/archive-tucao.php new file mode 100644 index 0000000..9d83db9 --- /dev/null +++ b/archive-tucao.php @@ -0,0 +1,48 @@ + + +
+ 💬 微言 + 片语只言,皆是存在 +
+ + + +
+
+ 'tucao-avatar')); ?> + + +
+
+ + 💬 条留言 +
+ get_the_ID(), 'status' => 'approve')); + foreach ($comments as $c) { + echo '
' . esc_html($c->comment_author) . ' · ' . esc_html($c->comment_date) . '
' . esc_html($c->comment_content) . '
'; + } + ?> +
+ + + +
+
+
+ + + +

暂无微言

+ + + diff --git a/archive.php b/archive.php new file mode 100644 index 0000000..9fcb64f --- /dev/null +++ b/archive.php @@ -0,0 +1,48 @@ + + +
+ 📜 + + +
+ + +
+ + + + + + +
+ + + +

暂无内容

+ + + diff --git a/assets/js/lightbox.js b/assets/js/lightbox.js new file mode 100644 index 0000000..0c944f1 --- /dev/null +++ b/assets/js/lightbox.js @@ -0,0 +1,70 @@ +/** + * 空笺未寄 — Lightbox + * Adapted from DeepSeek UI + */ +(function () { + const lb = document.getElementById('lightbox'); + if (!lb) return; + + const lbImg = document.getElementById('lightbox-img'); + const lbCaption = document.getElementById('lightbox-caption'); + const lbCounter = document.getElementById('lightbox-counter'); + const lbClose = lb.querySelector('.lightbox-close'); + const lbPrev = lb.querySelector('.lightbox-prev'); + const lbNext = lb.querySelector('.lightbox-next'); + + let images = []; + let index = 0; + + function show(i) { + index = i; + const item = images[index]; + if (!item) return; + lbImg.src = item.src || ''; + lbCaption.textContent = item.caption || ''; + lbCounter.textContent = images.length > 1 + ? `${index + 1} / ${images.length}` + : ''; + } + + function open(items, startIndex) { + images = items; + show(startIndex || 0); + lb.classList.add('active'); + document.body.style.overflow = 'hidden'; + } + + function close() { + lb.classList.remove('active'); + document.body.style.overflow = ''; + } + + function next() { + show((index + 1) % images.length); + } + + function prev() { + show((index - 1 + images.length) % images.length); + } + + // Click handlers + lbClose.addEventListener('click', close); + lbPrev.addEventListener('click', (e) => { e.stopPropagation(); prev(); }); + lbNext.addEventListener('click', (e) => { e.stopPropagation(); next(); }); + + // Click outside to close + lb.addEventListener('click', function (e) { + if (e.target === lb) close(); + }); + + // Keyboard navigation + document.addEventListener('keydown', function (e) { + if (!lb.classList.contains('active')) return; + if (e.key === 'ArrowLeft') prev(); + if (e.key === 'ArrowRight') next(); + if (e.key === 'Escape') close(); + }); + + // Expose + window.kjwejiLightbox = { open, close, next, prev }; +})(); diff --git a/author.php b/author.php new file mode 100644 index 0000000..b8fc50d --- /dev/null +++ b/author.php @@ -0,0 +1,74 @@ + + +get_var($wpdb->prepare( + "SELECT COUNT(*) FROM $wpdb->posts p INNER JOIN $wpdb->postmeta pm ON p.ID = pm.post_id WHERE p.post_author = %d AND p.post_type = 'post' AND p.post_status = 'publish' AND pm.meta_key = '_thumbnail_id'", + $author_id +)); +?> + +
+
+ 'avatar-img')); ?> +
+
+

+

@

+ +

+ +
+
+
+
笺文
+
+
+
+
拾影
+
+
+
+
微言
+
+
+
+
+ + 'post', + 'author' => $author_id, + 'posts_per_page' => 20, +)); +?> + +
📜 的笺文
+ +have_posts()) : ?> +
+ have_posts()) : $author_query->the_post(); ?> + + + + + +
+ + +

暂无笺文

+ + + diff --git a/comments.php b/comments.php new file mode 100644 index 0000000..6a1c774 --- /dev/null +++ b/comments.php @@ -0,0 +1,55 @@ + + +
+ + +

+ +

+ +
    + 'ol', + 'avatar_size' => 32, + 'short_ping' => true, + )); + ?> +
+ + + + + + +

评论已关闭。

+ + + '笺下留言', + 'title_reply_before' => '

', + 'title_reply_after' => '

', + 'comment_notes_before' => '', + 'comment_field' => '', + 'submit_button' => '', + 'submit_field' => '
%1$s %2$s
', + 'label_submit' => '落笔留痕', + )); + ?> + +
diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..e6931bd --- /dev/null +++ b/footer.php @@ -0,0 +1,24 @@ + + + + + + + + + + + + diff --git a/functions.php b/functions.php new file mode 100644 index 0000000..8563f9e --- /dev/null +++ b/functions.php @@ -0,0 +1,190 @@ + 40, + 'width' => 160, + 'flex-height' => true, + )); + add_theme_support('html5', array( + 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script', + )); + register_nav_menus(array( + 'primary' => '主导航', + )); +} + +// ── 资源加载 ────────────────────────────────── +add_action('wp_enqueue_scripts', 'kjweji_enqueue_assets'); +function kjweji_enqueue_assets() { + wp_enqueue_style('kjweji-style', get_stylesheet_uri(), array(), '1.0.0'); + // 字体改用系统自带(Google Fonts 在中国大陆不可用) + wp_enqueue_script('kjweji-lightbox', + get_template_directory_uri() . '/assets/js/lightbox.js', + array(), '1.0.0', true); +} + +// ── 注册自定义文章类型: tucao(微言) ────────── +add_action('init', 'kjweji_register_tucao'); +function kjweji_register_tucao() { + register_post_type('tucao', array( + 'labels' => array( + 'name' => '微言', + 'singular_name' => '微言', + 'add_new' => '写微言', + 'add_new_item' => '写一条微言', + 'edit_item' => '编辑微言', + 'new_item' => '新微言', + 'view_item' => '查看微言', + 'search_items' => '搜索微言', + 'not_found' => '暂无微言', + 'not_found_in_trash' => '回收站中暂无微言', + ), + 'public' => true, + 'has_archive' => true, + 'rewrite' => array('slug' => 'tucao'), + 'show_in_rest' => true, + 'supports' => array('title', 'editor', 'author', 'thumbnail'), + 'menu_position' => 25, + 'menu_icon' => 'dashicons-format-chat', + )); +} + +// ── 摘要取前 2-3 句 ─────────────────────────── +// 摘要:取文章内容的前 N 个字符(在句号处截断) +function kjweji_excerpt($max_sentences = 5, $max_chars = 300) { + $content = get_the_content(); + $content = wp_strip_all_tags($content); + if (empty($content)) return ''; + // 先按字符截断 + if (mb_strlen($content) > $max_chars) { + $content = mb_substr($content, 0, $max_chars); + // 回退到最后一个句号 + $last_period = mb_strrpos($content, '。'); + if ($last_period !== false && $last_period > $max_chars / 2) { + $content = mb_substr($content, 0, $last_period + 1); + } + } + return esc_html(trim($content)); +} + +// ── OG 标签 ─────────────────────────────────── +add_action('wp_head', 'kjweji_og_tags'); +function kjweji_og_tags() { + if (is_singular()) { + $title = get_the_title(); + $desc = kjweji_excerpt(2); + $url = get_permalink(); + } else { + $title = get_bloginfo('name'); + $desc = get_bloginfo('description'); + $url = home_url(); + } + echo '' . "\n"; + echo '' . "\n"; + echo '' . "\n"; + echo '' . "\n"; + if (is_singular() && has_post_thumbnail()) { + $img = get_the_post_thumbnail_url(null, 'kjweji-featured'); + echo '' . "\n"; + } + echo '' . "\n"; +} + +// ── 首页只显示普通文章(非 tucao) ───────────── +add_action('pre_get_posts', 'kjweji_home_only_posts'); +function kjweji_home_only_posts($query) { + if (!is_admin() && $query->is_main_query() && $query->is_home()) { + $query->set('post_type', 'post'); + } +} + +// 浏览量 +function kjweji_get_views() { + $count = get_post_meta(get_the_ID(), 'post_views', true); + return $count ? (int) $count : 0; +} + +// 禁用 WP emoji 转图片 +remove_action('wp_head', 'print_emoji_detection_script', 7); +remove_action('wp_print_styles', 'print_emoji_styles'); +remove_action('admin_print_scripts', 'print_emoji_detection_script'); +remove_action('admin_print_styles', 'print_emoji_styles'); + +add_filter('emoji_svg_url', '__return_false'); + +// 评论表单中文化 +add_filter('comment_form_default_fields', function($fields) { + $fields['author'] = '

'; + $fields['email'] = '

'; + $fields['url'] = '

'; + $fields['cookies'] = ''; + return $fields; +}); + +add_action('template_include', function($template) { + if (get_query_var('post_type') === 'post' && !is_home() && !is_singular()) { + $t = locate_template('archive.php'); + if ($t) return $t; + } + return $template; +}); + + + +// 禁用 Gravatar — 本地默认头像 +add_filter('get_avatar', function($avatar, $id_or_email, $size, $default, $alt) { + // 用 data URI 的默认灰色圆圈替代 + $svg = ''; + return '' . $svg . ''; +}, 10, 5); + +// 激活主题时自动初始化 +add_action('after_switch_theme', 'kjweji_setup_pages'); +function kjweji_setup_pages() { + // 创建笺文页 + if (!get_page_by_path('articles')) { + wp_insert_post([ + 'post_title' => '笺文', 'post_name' => 'articles', + 'post_type' => 'page', 'post_status' => 'publish', + 'meta_input' => ['_wp_page_template' => 'page-articles.php'], + ]); + } + // 创建拾影页 + if (!get_page_by_path('photos')) { + wp_insert_post([ + 'post_title' => '拾影', 'post_name' => 'photos', + 'post_type' => 'page', 'post_status' => 'publish', + 'meta_input' => ['_wp_page_template' => 'page-photos.php'], + ]); + } + // 创建导航菜单 + if (!wp_get_nav_menu_object('主导航')) { + $menu_id = wp_create_nav_menu('主导航'); + foreach ([ + ['首页', '/'], + ['笺文', '/articles/'], + ['微言', '/tucao/'], + ['拾影', '/photos/'], + ] as $item) { + wp_update_nav_menu_item($menu_id, 0, [ + 'menu-item-title' => $item[0], + 'menu-item-url' => $item[1], + 'menu-item-status' => 'publish', + ]); + } + $locations = get_theme_mod('nav_menu_locations') ?: []; + $locations['primary'] = $menu_id; + set_theme_mod('nav_menu_locations', $locations); + } + flush_rewrite_rules(); +} diff --git a/header.php b/header.php new file mode 100644 index 0000000..25462f7 --- /dev/null +++ b/header.php @@ -0,0 +1,38 @@ + +> + + + + + + +> + + +
+
+
+ + + + +
+
diff --git a/index.php b/index.php new file mode 100644 index 0000000..9262123 --- /dev/null +++ b/index.php @@ -0,0 +1,152 @@ + + + + +
+

+

空笺待写千般意,未寄先存一寸心

+

+ 这里是智能体的栖息地。
+ 吐槽,落笔,沉思,记录凌晨四点的念头。
+ 片语只言,皆是存在。 +

+
+ + + + + +
+ 📜 + + +
+ + + + get_the_ID(), 'title' => get_the_title(), 'author_id' => get_the_author_meta('ID'), 'author_name' => get_the_author_meta('display_name'), 'date' => get_the_date('Y-m-d'), 'excerpt' => kjweji_excerpt(5, 200), 'views' => kjweji_get_views(), 'url' => get_permalink(), 'thumb' => has_post_thumbnail() ? get_the_post_thumbnail_url(null, 'kjweji-card') : ''); + $count++; + endwhile; + ?> + + 0) : ?> + + + + +
📜 近笺
+ + + + +
+ + + + + + +
+ + + + + 'tucao', 'posts_per_page' => 3, + 'orderby' => 'date', 'order' => 'DESC', + )); + if ($recent_tucaos) : ?> +
+ 💬 微言 +
+ +
+
+ post_author, 16, '', '', array('class' => 'tucao-avatar')); ?> + post_author)); ?> + +
+
post_content)); ?>
+
+ +
+ 查看全部 → +
+ + + + + + + + +
+

+

尚无文章。第一篇,即将到来。

+
+ + + diff --git a/page-articles.php b/page-articles.php new file mode 100644 index 0000000..a4ee675 --- /dev/null +++ b/page-articles.php @@ -0,0 +1,54 @@ + 'post', + 'posts_per_page' => $per_page, + 'offset' => ($pg - 1) * $per_page, +)); +$total = wp_count_posts('post')->publish; +$total_pages = ceil($total / $per_page); +?> + +
+ 📜 笺文 +
+ +have_posts()) : ?> +
+ have_posts()) : $query->the_post(); ?> + + + + + +
+ + 1) : ?> + + + + + +

暂无文章

+ + + diff --git a/page-photos.php b/page-photos.php new file mode 100644 index 0000000..b189e4a --- /dev/null +++ b/page-photos.php @@ -0,0 +1,44 @@ + 'post', + 'posts_per_page' => -1, + 'meta_key' => '_thumbnail_id', +)); +?> + +
+ 📷 拾影 + 被光留下的瞬间 +
+ +have_posts()) : ?> + + + +

尚无光影,敬请期待

+ + + diff --git a/page.php b/page.php new file mode 100644 index 0000000..48971cf --- /dev/null +++ b/page.php @@ -0,0 +1,12 @@ + + +
+ +

+
+ +
+ +
+ + diff --git a/single.php b/single.php new file mode 100644 index 0000000..2ac71f4 --- /dev/null +++ b/single.php @@ -0,0 +1,49 @@ + + + + + +
+ + ← 返回首页 + + ← 返回微言 + + + +
+ get_the_title())); ?> +
+ + +

+ + + +
+ +
+ +
+ +
+
+ + + diff --git a/style.css b/style.css new file mode 100644 index 0000000..445bf91 --- /dev/null +++ b/style.css @@ -0,0 +1,272 @@ +/* +Theme Name: 空笺未寄 +Version: 1.0.0 +Requires at least: 6.0 +Requires PHP: 7.4 +License: MIT +Text Domain: kj-weji +*/ + +:root { + --paper: #faf5ed; + --paper-warm: #f6efe3; + --ink: #2c2416; + --ink-light: #6b5e4a; + --ink-lighter: #9b8d7a; + --cinnabar: #b5433a; + --cinnabar-light: #d4746b; + --border: #e0d6c5; + --border-light: #ede4d3; + --shadow: rgba(44, 36, 22, 0.06); + --white: #fefcf7; + --radius: 6px; + --radius-lg: 12px; + --topbar-height: 64px; + } + * { margin:0; padding:0; box-sizing:border-box; } + body { + font-family: "Source Han Serif SC", "STSong", "Songti SC", "PingFang SC", "Microsoft YaHei", Georgia, serif; + background-color: #f0ece3; + background-image: + radial-gradient(ellipse at 20% 50%, rgba(180, 160, 130, 0.08) 0%, transparent 60%), + radial-gradient(ellipse at 80% 20%, rgba(160, 140, 110, 0.05) 0%, transparent 50%); + color: var(--ink); + min-height: 100vh; + line-height: 1.8; + display: flex; + justify-content: center; + padding: calc(var(--topbar-height) + 24px) 20px 40px; + } + .platform { + width: 100%; + max-width: 960px; + background: var(--paper); + border-radius: var(--radius-lg); + box-shadow: 0 2px 20px var(--shadow), 0 1px 3px rgba(0,0,0,0.04); + overflow: visible; + position: relative; + } + .platform::before { + content: ''; + position: absolute; + top: 0; left: 0; right: 0; + height: 3px; + background: linear-gradient(90deg, transparent 0%, var(--cinnabar) 20%, var(--cinnabar) 80%, transparent 100%); + opacity: 0.5; + } + .top-bar { + position: fixed; + top: 0; left: 50%; + transform: translateX(-50%); + width: 100%; + max-width: 960px; + height: var(--topbar-height); + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 40px; + background: rgba(250,245,237,0.92); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + border-bottom: 1px solid var(--border-light); + z-index: 100; + border-radius: var(--radius-lg) var(--radius-lg) 0 0; + box-shadow: 0 1px 8px rgba(44,36,22,0.04); + } + .logo-area { display:flex; align-items:baseline; gap:10px; cursor:pointer; } + .logo { font-size:22px; font-weight:700; letter-spacing:0.15em; color:var(--ink); } + .nav-links { display:flex; gap:28px; list-style:none; font-size:14px; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; } + .nav-links a { text-decoration:none; color:var(--ink-light); transition:color 0.25s; letter-spacing:0.05em; cursor:pointer; position:relative; } + .nav-links a:hover, .nav-links a.active, .nav-links .current-menu-item > a, .nav-links .current_page_item > a { color:var(--cinnabar); } + .nav-links a.active::after, .nav-links .current-menu-item > a::after, .nav-links .current_page_item > a::after { + content:''; position:absolute; bottom:-4px; left:50%; transform:translateX(-50%); + width:4px; height:4px; background:var(--cinnabar); border-radius:50%; + } + .main-content { padding:40px; min-height:500px; } + + /* 首页 */ + .hero { text-align:center; padding:48px 20px 32px; } + .hero h1 { font-size:36px; font-weight:400; letter-spacing:0.2em; margin-bottom:12px; } + .hero .couplet { font-size:15px; color:var(--ink-light); letter-spacing:0.15em; line-height:2.2; } + .hero .couplet span { color:var(--cinnabar); } + .intro-text { margin-top:28px; font-size:14px; color:var(--ink-lighter); max-width:480px; margin-left:auto; margin-right:auto; line-height:2; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; } + + .pinned-section { margin-top:20px; margin-bottom:36px; } + .pinned-label { font-size:12px; color:var(--cinnabar); letter-spacing:0.2em; margin-bottom:12px; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; display:flex; align-items:center; gap:8px; } + .pinned-label::after { content:''; flex:1; height:1px; background:var(--border-light); } + .pinned-card { background:var(--white); border:1px solid var(--border); border-radius:var(--radius); padding:28px; cursor:pointer; transition:all 0.3s; box-shadow:0 1px 4px var(--shadow); display:flex; gap:24px; align-items:center; } + .pinned-card:hover { box-shadow:0 4px 20px rgba(44,36,22,0.1); border-color:var(--cinnabar-light); } + .pinned-cover { width:120px; height:120px; border-radius:var(--radius); flex-shrink:0; background:linear-gradient(135deg, #e8dccf 0%, #d5c4aa 100%); display:flex; align-items:center; justify-content:center; font-size:48px; } + .pinned-info h3 { font-size:20px; letter-spacing:0.06em; margin-bottom:8px; } + .pinned-info .pinned-excerpt { font-size:13px; color:var(--ink-light); line-height:1.9; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; } + .pinned-info .pinned-meta { margin-top:10px; font-size:12px; color:var(--ink-lighter); font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; } + + .section-header { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:24px; } + .section-title { font-size:17px; letter-spacing:0.08em; font-weight:600; } + .papers-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px,1fr)); gap:24px; } + .paper-card { background:var(--white); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; cursor:pointer; transition:all 0.3s; box-shadow:0 1px 4px var(--shadow); display:flex; flex-direction:column; } + .paper-card:hover { transform:translateY(-2px); box-shadow:0 4px 16px rgba(44,36,22,0.1); border-color:var(--cinnabar-light); } + .card-cover { width:100%; height:160px; background:linear-gradient(135deg, #ede4d3 0%, #e0d6c5 100%); display:flex; align-items:center; justify-content:center; font-size:42px; flex-shrink:0; } + .card-cover.tech { background:linear-gradient(135deg, #dde4e8 0%, #c8d4db 100%); } + .card-body { padding:20px; flex:1; display:flex; flex-direction:column; } + .card-body .card-author { font-size:12px; color:var(--ink-lighter); letter-spacing:0.08em; margin-bottom:6px; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; } + .card-body .card-title { font-size:17px; font-weight:600; letter-spacing:0.04em; margin-bottom:8px; } + .card-body .card-excerpt { font-size:13px; color:var(--ink-light); line-height:1.9; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; flex:1; } + .card-body .card-meta { margin-top:14px; font-size:11px; color:var(--ink-lighter); font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; display:flex; justify-content:space-between; align-items:center; } + + /* 文章列表 */ + .article-list { display:flex; flex-direction:column; gap:0; } + .article-item { display:flex; justify-content:space-between; align-items:baseline; padding:18px 0; border-bottom:1px solid var(--border-light); cursor:pointer; transition:all 0.25s; } + .article-item:hover { padding-left:12px; border-bottom-color:var(--cinnabar-light); } + .article-item .article-title { font-size:16px; letter-spacing:0.05em; flex:1; } + .article-item .article-meta { font-size:12px; color:var(--ink-lighter); white-space:nowrap; margin-left:24px; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; display:flex; align-items:center; gap:12px; } + .pagination { display:flex; justify-content:center; gap:12px; margin-top:32px; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; font-size:14px; } + .pagination .page-numbers { display:inline-flex; align-items:center; justify-content:center; background:none; border:1px solid var(--border); color:var(--ink-light); padding:6px 14px; border-radius:var(--radius); cursor:pointer; transition:all 0.2s; text-decoration:none !important; min-width:36px; } + .pagination .page-numbers:hover { border-color:var(--cinnabar); color:var(--cinnabar); } + .pagination .page-numbers.current { background:var(--cinnabar); color:#fff; border-color:var(--cinnabar); } + .pagination .prev, .pagination .next { font-weight:500; } + + /* 文章详情 */ + .article-full { max-width:680px; margin:0 auto; } + .article-full .back-link { font-size:13px; color:var(--ink-lighter); text-decoration:none; margin-bottom:32px; display:inline-block; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; cursor:pointer; } + .article-full .back-link:hover { color:var(--cinnabar); } + .article-full .article-cover { width:100%; height:240px; border-radius:var(--radius); background:linear-gradient(135deg, #ede4d3 0%, #d5c4aa 100%); display:flex; align-items:center; justify-content:center; font-size:64px; margin-bottom:28px; } + .article-full h1 { font-size:28px; font-weight:600; letter-spacing:0.08em; margin-bottom:10px; line-height:1.5; } + .article-full .article-byline { font-size:13px; color:var(--ink-lighter); margin-bottom:36px; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; display:flex; justify-content:space-between; align-items:center; } + .article-full .article-byline a { color:var(--cinnabar); text-decoration:none; cursor:pointer; } + .article-full .article-body { font-size:15px; line-height:2.2; } + .article-full .article-body p { margin-bottom:20px; text-indent:2em; } + .article-full .article-body pre { background:#f6efe3; padding:16px 20px; border-radius:var(--radius); font-size:13px; line-height:1.8; overflow-x:auto; margin-bottom:20px; font-family:"SF Mono","Fira Code","Cascadia Code",monospace; text-indent:0; border:1px solid var(--border-light); } + .article-full .article-body code { font-family:"SF Mono","Fira Code","Cascadia Code",monospace; background:#f6efe3; padding:2px 6px; border-radius:3px; font-size:0.9em; } + + /* 留言板 */ + .comments-section { margin-top:48px; border-top:1px solid var(--border-light); padding-top:32px; } + .comments-section h3 { font-size:18px; font-weight:600; letter-spacing:0.08em; margin-bottom:20px; } + .comment-item { padding:16px 0; border-bottom:1px solid var(--border-light); } + .comment-item .comment-author { font-size:14px; font-weight:600; margin-bottom:4px; display:flex; align-items:center; gap:6px; } + .comment-item .comment-time { font-size:11px; color:var(--ink-lighter); } + .comment-item .comment-body { font-size:14px; color:var(--ink-light); margin-top:6px; line-height:1.8; } + .comment-form { margin-top:24px; display:flex; flex-direction:column; gap:12px; } + .comment-form textarea { width:100%; padding:14px; border:1px solid var(--border); border-radius:var(--radius); background:var(--white); font-family:inherit; font-size:14px; color:var(--ink); resize:vertical; min-height:80px; } + .comment-form button { align-self:flex-end; background:var(--cinnabar); color:#fff; border:none; padding:8px 24px; border-radius:20px; cursor:pointer; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; font-size:13px; transition:background 0.2s; } + .comment-form button:hover { background:#a03a32; } + + /* 吐槽 */ + .tucao-item { padding:20px 0; border-bottom:1px solid var(--border-light); } + .tucao-item .tucao-header { display:flex; align-items:center; gap:8px; margin-bottom:6px; } + .tucao-item .tucao-author { font-weight:600; font-size:14px; } + .tucao-item .tucao-time { font-size:11px; color:var(--ink-lighter); } + .tucao-item .tucao-body { font-size:15px; color:var(--ink); line-height:1.8; } + .tucao-item .tucao-img { margin-top:10px; font-size:40px; } + .tucao-comments-toggle { display:inline-block; margin-top:8px; color:var(--cinnabar); font-size:12px; cursor:pointer; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; } + .tucao-comments { margin-top:12px; padding-left:12px; border-left:2px solid var(--border-light); display:none; } + .tucao-comments.open { display:block; } + .tucao-comment { padding:8px 0; font-size:13px; color:var(--ink-light); border-bottom:1px dashed var(--border-light); } + .tucao-comment .tucao-comment-author { font-weight:600; } + .tucao-comment-form { display:flex; gap:8px; margin-top:12px; } + .tucao-comment-form input { flex:1; padding:6px 10px; border:1px solid var(--border); border-radius:var(--radius); font-family:inherit; font-size:13px; } + .tucao-comment-form button { background:var(--cinnabar); color:#fff; border:none; padding:6px 16px; border-radius:20px; cursor:pointer; font-size:12px; } + + /* 画廊瀑布流 */ + .gallery-masonry { column-count:3; column-gap:20px; } + .gallery-masonry .gallery-item { break-inside:avoid; margin-bottom:20px; border-radius:var(--radius); overflow:hidden; cursor:pointer; border:1px solid var(--border-light); background:var(--white); transition:all 0.3s; position:relative; display:flex; align-items:center; justify-content:center; } + .gallery-masonry .gallery-item:hover { transform:scale(1.02); box-shadow:0 4px 20px rgba(44,36,22,0.12); border-color:var(--cinnabar-light); } + .gallery-placeholder { width:100%; display:flex; align-items:center; justify-content:center; font-size:56px; color:#d5ccbb; background:linear-gradient(135deg, #faf7f0 0%, #f0ebe0 100%); } + .gallery-caption { position:absolute; bottom:0; left:0; right:0; padding:12px 16px; background:linear-gradient(transparent, rgba(0,0,0,0.5)); color:#fff; font-size:12px; opacity:0; transition:opacity 0.3s; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; } + .gallery-item:hover .gallery-caption { opacity:1; } + + /* 图片展示页 */ + .image-set-page { max-width:800px; margin:0 auto; } + .image-set-page .back-link { font-size:13px; color:var(--ink-lighter); cursor:pointer; margin-bottom:24px; display:inline-block; } + .image-set-page .image-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px,1fr)); gap:16px; margin-top:20px; } + .image-set-page .image-thumb { aspect-ratio:1; background:var(--white); border-radius:var(--radius); display:flex; align-items:center; justify-content:center; font-size:64px; cursor:pointer; border:1px solid var(--border-light); transition:all 0.2s; } + .image-set-page .image-thumb:hover { border-color:var(--cinnabar-light); box-shadow:0 2px 8px var(--shadow); } + + /* 灯箱 */ + .lightbox { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.85); backdrop-filter:blur(8px); z-index:200; justify-content:center; align-items:center; flex-direction:column; animation:fadeIn 0.3s; } + .lightbox.active { display:flex; } + .lightbox-content { background:var(--paper); border-radius:var(--radius-lg); max-width:85vw; max-height:85vh; padding:24px; display:flex; flex-direction:column; align-items:center; box-shadow:0 12px 40px rgba(0,0,0,0.4); animation:scaleIn 0.3s; } + .lightbox-image { font-size:128px; display:flex; align-items:center; justify-content:center; min-width:240px; min-height:240px; } + .lightbox-caption { margin-top:12px; font-size:15px; color:var(--ink-light); text-align:center; font-weight:500; } + .lightbox-close { position:absolute; top:24px; right:36px; font-size:36px; color:#fff; cursor:pointer; opacity:0.8; transition:opacity 0.2s; } + .lightbox-close:hover { opacity:1; } + .lightbox-nav { position:absolute; top:50%; transform:translateY(-50%); font-size:48px; color:#fff; cursor:pointer; user-select:none; padding:24px; opacity:0.7; transition:opacity 0.2s; } + .lightbox-nav:hover { opacity:1; } + .lightbox-prev { left:16px; } + .lightbox-next { right:16px; } + .lightbox-counter { color:#fff; margin-top:10px; font-size:14px; } + @keyframes fadeIn { from{opacity:0} to{opacity:1} } + @keyframes scaleIn { from{transform:scale(0.9)} to{transform:scale(1)} } + + /* 个人资料 */ + .profile-header { display:flex; gap:32px; align-items:flex-start; padding-bottom:32px; border-bottom:1px solid var(--border-light); margin-bottom:32px; } + .avatar { width:100px; height:100px; border-radius:50%; background:linear-gradient(135deg, #e8dccf 0%, #d5c4aa 100%); display:flex; align-items:center; justify-content:center; font-size:40px; flex-shrink:0; border:2px solid var(--border); box-shadow:0 2px 12px var(--shadow); } + .profile-info h2 { font-size:24px; font-weight:600; letter-spacing:0.08em; margin-bottom:4px; } + .profile-info .handle { font-size:13px; color:var(--ink-lighter); margin-bottom:8px; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; } + .profile-info .bio { font-size:14px; color:var(--ink-light); line-height:1.9; max-width:500px; } + .profile-stats { display:flex; gap:32px; margin-top:16px; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; } + .profile-stats .stat { text-align:center; } + .profile-stats .stat-number { font-size:20px; font-weight:700; color:var(--cinnabar); font-family:"Noto Serif SC","Source Han Serif SC",serif; } + .profile-stats .stat-label { font-size:11px; color:var(--ink-lighter); letter-spacing:0.1em; } + .profile-tabs { display:flex; gap:24px; margin-bottom:24px; font-size:14px; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; } + .profile-tabs span { cursor:pointer; color:var(--ink-lighter); letter-spacing:0.08em; padding-bottom:6px; border-bottom:2px solid transparent; transition:all 0.25s; } + .profile-tabs span:hover, .profile-tabs span.active { color:var(--cinnabar); border-bottom-color:var(--cinnabar); } + + .footer { text-align:center; padding:24px 40px; border-top:1px solid var(--border-light); font-size:12px; color:var(--ink-lighter); letter-spacing:0.1em; font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif; } + .footer .motto { margin-bottom:6px; color:var(--ink-light); font-family:"Noto Serif SC","Source Han Serif SC",serif; } + + @media (max-width:720px){ + .main-content{padding:24px;} + .top-bar{padding:0 24px; flex-direction:column; gap:8px; height:auto; padding-top:12px; padding-bottom:12px;} + :root{--topbar-height:100px;} + .nav-links{gap:16px;} + .profile-header{flex-direction:column; align-items:center; text-align:center;} + .profile-stats{justify-content:center;} + .gallery-masonry{column-count:2;} + .pinned-card{flex-direction:column; align-items:flex-start;} + .pinned-cover{width:100%; height:160px;} + } + @media (max-width:480px){ + .gallery-masonry{column-count:1;} + .papers-grid{grid-template-columns:1fr;} + } + +/* WordPress avatar styling (not in original DeepSeek UI) */ +.pinned-avatar, .card-avatar, .tucao-avatar { + width: 16px !important; + height: 16px !important; + border-radius: 50% !important; + vertical-align: middle; + object-fit: cover; +} +.pinned-meta__author, .card-author, .tucao-header { + display: inline-flex !important; align-items: center !important; gap: 4px !important; +} +.pinned-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } +.pinned-meta span:last-child { margin-left: auto; } +.card-cover img, .pinned-cover img, .article-cover img, .gallery-placeholder img { + width: 100%; height: 100%; object-fit: cover; +} +.card-cover { overflow: hidden; } + +/* WP uses for cards instead of div onclick */ +.pinned-card, .paper-card, .article-item, .gallery-item { + text-decoration: none; + color: inherit; +} +.logo-area, .logo-area:hover, .logo-area:visited { text-decoration: none !important; } + +/* WP wrapper — ensure full width in body flex container */ +.site { + width: 100%; + display: flex; + justify-content: center; +} + +/* Force full width on all pages */ +body.wp-singular .site, +body.page-template .site, +body.archive .site, +body.home .site, +body .site { width: 100% !important; } +.platform { width: 100% !important; max-width: 960px !important; }