更新已访问地点列表,添加马来西亚、印度尼西亚和泰国;

修复bug
手机路径过长显示问题
用行内代码块过长不会自动换行
This commit is contained in:
lsy 2025-03-20 10:50:31 +08:00
parent 1094b7cfc5
commit 1700c1bc44
2 changed files with 28 additions and 10 deletions

View File

@ -15,7 +15,7 @@ export const ICP = '渝ICP备2022009272号';
export const PSB_ICP = '渝公网安备50011902000520号';
export const PSB_ICP_URL = 'http://www.beian.gov.cn/portal/registerSystemInfo';
export const VISITED_PLACES = ['黑龙江', '吉林', '辽宁', '北京', '天津', '广东', '西藏', '河北', '山东', '湖南', '重庆', '四川'];
export const VISITED_PLACES = ['黑龙江', '吉林', '辽宁', '北京', '天津', '广东', '西藏', '河北', '山东', '湖南', '重庆', '四川', "马来西亚", "印度尼西亚", "泰国"];
export const DOUBAN_ID = 'lsy22';

View File

@ -111,14 +111,16 @@ function getArticleUrl(articleId: string) {
<header class="mb-8">
<!-- 导航区域 -->
<div class="bg-white dark:bg-dark-card rounded-xl p-4 mb-6 shadow-lg border border-gray-200 dark:border-gray-700">
<div class="flex items-center justify-between">
<Breadcrumb
pageType="article"
pathSegments={breadcrumbs}
articleTitle={article.data.title}
/>
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3">
<div class="overflow-x-auto">
<Breadcrumb
pageType="article"
pathSegments={breadcrumbs}
articleTitle={article.data.title}
/>
</div>
<div class="flex items-center gap-3">
<div class="flex items-center shrink-0">
{/* 返回按钮 */}
<a href={`/articles${view ? `/${view}` : ''}`} class="text-secondary-500 dark:text-secondary-400 hover:text-primary-600 dark:hover:text-primary-400 transition-colors flex items-center text-sm">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
@ -143,10 +145,10 @@ function getArticleUrl(articleId: string) {
{/* 显示文章所在目录 */}
{section && (
<span class="flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" />
</svg>
<a href={`/articles?path=${encodeURIComponent(section)}`} class="hover:text-indigo-600 transition-colors">
<a href={`/articles?path=${encodeURIComponent(section)}`} class="hover:text-indigo-600 transition-colors break-all">
{section}
</a>
</span>
@ -171,6 +173,22 @@ function getArticleUrl(articleId: string) {
<Content />
</article>
<!-- 添加全局样式 -->
<style is:global>
/* 代码块样式 */
.prose pre {
overflow-x: auto;
white-space: pre-wrap;
word-wrap: break-word;
}
/* 行内代码样式 */
.prose :not(pre) > code {
white-space: pre-wrap;
word-wrap: break-word;
}
</style>
<!-- 固定目录面板 - 脱离文档流 -->
<div class="hidden 2xl:block fixed right-[calc(50%-48rem)] top-20 w-64 z-30">
<div class="bg-white dark:bg-dark-card rounded-lg shadow-lg p-4 max-h-[calc(100vh-8rem)] overflow-y-auto border border-gray-200 dark:border-gray-700">