DreamLife
+这是我的网站首页,主页代码正在完善中
+-
+
- 此网站将用于个人经历展示,个人技术分析 +
- 目前网站工具箱以基本完善 +
- 工具箱网站dreamlife.top/toolbox +
您的当前区域时间
-加载中...
- -DeepSeek 聊天界面
- - - + +此处预留未来内容
+From df0830a2ad28394f39444d5f28aa81c2517845c2 Mon Sep 17 00:00:00 2001 From: Cx330 <1487537121@qq.com> Date: Sat, 5 Apr 2025 22:17:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=95=8C=E9=9D=A2=E4=B8=BA?= =?UTF-8?q?=E5=B7=A6=E5=8F=B3=E5=B8=83=E5=B1=80=E3=80=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=E6=A1=86=E6=A0=B7=E5=BC=8F=E3=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=83=A8=E5=88=86=E5=8A=A8=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/body.css | 55 ++++++++++++++++----------- css/chat.css | 85 +++++++++++++++++++++++++++++++++++------- css/max_width.css | 37 ++++++++++++++++++ css/time.css | 16 ++++++++ index.html | 68 ++++++++++++++++++++++----------- javascape/ai_api.js | 10 +---- javascape/chat.js | 43 +++++++++++++++++++++ javascape/max_width.js | 10 +++++ javascape/time.js | 23 ++++++++++-- 9 files changed, 279 insertions(+), 68 deletions(-) create mode 100644 css/time.css create mode 100644 javascape/chat.js create mode 100644 javascape/max_width.js diff --git a/css/body.css b/css/body.css index a04685c..4e457a5 100644 --- a/css/body.css +++ b/css/body.css @@ -1,32 +1,43 @@ -/* 基本样式重置 */ -body, html { +body { margin: 0; - padding: 0; - font-family: Arial, sans-serif; /* 默认字体 */ - background-color:#f4f4f4; -} - -/*主内容区test*/ -.container { - width: 60%; - margin: 4% auto 0; - background-color: #f0f0f0; - padding: 2% 5%; - border-radius: 10px + font-family: "Arial", sans-serif; } -ul { - padding-left: 20px; +.main-layout { + display: flex; + flex-direction: row; + height: calc(100vh - 100px); + padding-bottom: 100px; } - ul li { - line-height: 2.3 - } +.left-panel, .right-panel { + width: 50%; + display: flex; + justify-content: center; /* 水平居中 */ + align-items: center; /* 垂直居中 */ + flex-direction: column; /* 内容垂直排列 */ + padding: 20px; + box-sizing: border-box; + height: 100%; +} -a { - color: #20a53a +.logo { + margin-top: 40px; + font-size: 32px; +} + +.intro a { + display: block; + margin: 5px 0; } .logo { font-family: 'Pacifico', cursive; -} \ No newline at end of file +} + +/* 默认隐藏 */ +.mobile-toggle { + display: none; + margin: 10px; + text-align: center; +} diff --git a/css/chat.css b/css/chat.css index dee71db..616e0e3 100644 --- a/css/chat.css +++ b/css/chat.css @@ -1,27 +1,84 @@ -/* 简单样式,仅用于展示 */ -#chatContainer { - border: 1px solid #ccc; +.chat-container { + position: fixed; + bottom: 50px; + left: 0; + width: 100%; + background: #fff; padding: 10px; - height: 50px; + box-shadow: 0 -2px 5px #fff; + display: flex; + flex-direction: column; + align-items: center; +} + +.chat-box { + width: 90%; + max-height: 50vh; overflow-y: auto; + background: #f5f5f5; margin-bottom: 10px; + padding: 10px; + border-radius: 8px; + position: relative; + z-index: 10; } -.message { - margin: 5px 0; - padding: 5px; +.chat-box.show { + animation: slideUp 0.3s ease-out forwards; } -.user { - color: blue; - text-align: right; +.chat-box.hide { + animation: slideDown 0.3s ease-in forwards; } -.bot { - color: green; - text-align: left; + +.input-row { + display: flex; + justify-content: center; + width: 90%; + gap: 10px; } #userInput { - width: 93%; + flex: 1; + padding: 10px; + font-size: 16px; + border: 1px solid #ccc; + border-radius: 6px; } + +button { + padding: 10px 16px; + font-size: 16px; + border: none; + background-color: #007BFF; + color: white; + border-radius: 6px; + cursor: pointer; +} + +button:hover { + background-color: #0056b3; +} + +@keyframes slideUp { + from { + transform: translateY(100%); + opacity: 0; + } + to { + transform: translateY(0); + opacity: 1; + } +} + +@keyframes slideDown { + from { + transform: translateY(0); + opacity: 1; + } + to { + transform: translateY(100%); + opacity: 0; + } +} \ No newline at end of file diff --git a/css/max_width.css b/css/max_width.css index e69de29..a715c97 100644 --- a/css/max_width.css +++ b/css/max_width.css @@ -0,0 +1,37 @@ +@media screen and (max-width: 768px) { + .main-layout { + flex-direction: column; + } + + .left-panel, .right-panel { + width: 100%; + display: none; + } + + .chat-container { + bottom: 0; + } + + footer { + padding-bottom: 60px; + } + + .mobile-toggle { + display: block; + } + + .mobile-toggle button { + margin: 0 5px; + padding: 8px 16px; + font-size: 14px; + border: none; + background-color: #007BFF; + color: white; + border-radius: 4px; + cursor: pointer; + } + + .mobile-toggle button:hover { + background-color: #0056b3; + } +} \ No newline at end of file diff --git a/css/time.css b/css/time.css new file mode 100644 index 0000000..f8ce5d5 --- /dev/null +++ b/css/time.css @@ -0,0 +1,16 @@ +.datetime { + text-align: center; + margin-bottom: 20px; +} + +.time { + font-size: 36px; + font-weight: bold; + color: #333; +} + +.date { + font-size: 16px; + color: #666; + margin-top: 5px; +} \ No newline at end of file diff --git a/index.html b/index.html index f441e21..75eff51 100644 --- a/index.html +++ b/index.html @@ -8,38 +8,64 @@ + +
- -加载中...
- -此处预留未来内容
+