Browse Source

修改样式冲突 上标

main
pd 5 days ago
parent
commit
ff6ccb20ac
  1. 62
      deepsearcher/templates/html/index.html
  2. 20
      deepsearcher/templates/static/css/styles.css
  3. 2
      deepsearcher/templates/static/data/test.txt
  4. 8
      deepsearcher/templates/static/js/app.js
  5. 4
      deepsearcher/templates/static/themes/github.css
  6. 4
      deepsearcher/templates/static/themes/latex.css
  7. 7
      deepsearcher/templates/static/themes/light.css
  8. 4
      deepsearcher/templates/static/themes/newsprint.css
  9. 4
      deepsearcher/templates/static/themes/pixyll.css
  10. 4
      deepsearcher/templates/static/themes/whitey.css

62
deepsearcher/templates/html/index.html

@ -26,7 +26,7 @@
<body>
<div class="container">
<header>
<h1>DeepSearcher 智能深度搜索系统</h1>
<h1 class="search-title">DeepSearcher 智能深度搜索系统</h1>
<p class="app-description">
基于大型语言模型和向量数据库的知识管理系统,支持私有数据搜索和在线内容整合,提供准确答案和综合报告。
</p>
@ -102,12 +102,13 @@
id="queryResult"
class="result-container"
>
<h3>查询结果:</h3>
<h3 class="query-result-h3">查询结果:</h3>
<div
class="query-result markdown-body"
id="resultText"
></div>
<div class="themes-btns">
<button
class="theme-button"
onclick="changeTheme('static/themes/light.css')"
@ -154,12 +155,13 @@
下载
</button>
</div>
</div>
<div
id="processResult"
class="result-container"
>
<h3>处理过程:</h3>
<h3 class="process-result-h3">处理过程:</h3>
<div
id="messageStream"
class="message-stream"
@ -172,11 +174,13 @@
</div>
</div>
<!-- <div class="card">
<div class="card">
<div
class="query-result markdown-body"
id="test"
></div>
<div class="themes-btns">
<button
class="theme-button"
onclick="changeTheme('static/themes/light.css')"
@ -221,7 +225,8 @@
>
下载
</button>
</div> -->
</div>
</div>
</main>
<footer>
@ -231,34 +236,33 @@
<script src="../static/js/app.js"></script>
<script>
// fetch('../static/data/test.txt').then((res) => {
// res.text().then((text) => {
// console.log(text);
// document.getElementById('test').innerHTML = md.render(text);
// });
// });
fetch('../static/data/test.txt').then((res) => {
res.text().then((text) => {
document.getElementById('test').innerHTML = md.render(text);
});
});
function changeTheme(url) {
document.getElementById('md-theme').setAttribute('href', url);
}
function downloadPdf1() {
const element = document.getElementById('test');
// function downloadPdf1() {
// const element = document.getElementById('test');
const opt = {
margin: 12,
filename: '内容.pdf',
image: { type: 'jpeg', quality: 0.98 },
enableLinks: true,
html2canvas: { scale: 2, logging: true, useCORS: true }, // 提高清晰度
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' },
pagebreak: {
mode: ['avoid-all', 'css', 'legacy']
}
};
// const opt = {
// margin: 12,
// filename: '内容.pdf',
// image: { type: 'jpeg', quality: 0.98 },
// enableLinks: true,
// html2canvas: { scale: 2, logging: true, useCORS: true }, // 提高清晰度
// jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' },
// pagebreak: {
// mode: ['avoid-all', 'css', 'legacy']
// }
// };
html2pdf().set(opt).from(element).save();
}
// html2pdf().set(opt).from(element).save();
// }
function changeTheme(url) {
document.getElementById('md-theme').setAttribute('href', url);
}
function downloadPdf() {
const element = document.getElementById('resultText');

20
deepsearcher/templates/static/css/styles.css

@ -47,7 +47,8 @@ header {
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
h1 {
/* h1 */
.search-title {
color: var(--primary-color);
margin-bottom: 10px;
}
@ -221,12 +222,25 @@ button:disabled {
margin-top: 16px;
}
#processResult h3 {
.themes-btns {
margin-top: 20px;
display: flex;
align-items: center;
}
.theme-button {
height: 40px;
padding: 0 20px;
margin-right: 10px;
}
/* #processResult h3 */
.process-result-h3 {
color: var(--text-secondary);
font-size: 1rem;
}
#queryResult h3 {
/* #queryResult h3 */
.query-result-h3 {
color: var(--text-secondary);
font-size: 1rem;
}

2
deepsearcher/templates/static/data/test.txt

@ -164,7 +164,7 @@ Zilliz Cloud作为托管服务,在开源版基础上增加了智能扩缩容
Milvus通过C++引擎与Python服务的异步通信机制(基于gRPC和ZeroMQ),实现了微秒级响应延迟[^1]。其独特的Partition Key特性相比传统分库分表,在分区粒度上可细化到字段层级,支持数百万级别的动态分区管理[^5]。随着向量数据规模持续增长,Milvus的云原生架构和硬件感知优化使其成为处理超大规模AI应用场景的关键基础设施。未来在文本类型支持和分布式事务处理方面的改进,将进一步强化其在多模态数据处理领域的竞争优势。
[^1]: [file:///G:/deep-searcher/docs/intro_docs/what_is_milvus.md](docs/intro_docs/what_is_milvus.md)
[^1]: [12133](docs/intro_docs/what_is_milvus.md)
[^2]: file:///G:/deep-searcher/docs/intro_docs/milvus_and_others.md
[^3]: file:///G:/deep-searcher/docs/intro_docs/milvus_application.md
[^4]: file:///G:/deep-searcher/docs/intro_docs/milvus_roadmap.md

8
deepsearcher/templates/static/js/app.js

@ -7,7 +7,15 @@ const md = window.markdownit({
linkify: true, // 自动识别链接
typographer: true
});
md.use(window.markdownitFootnote);
md.renderer.rules.footnote_ref = (tokens, idx, options, env, slf) => {
const n = Number(tokens[idx].meta.id + 1); // 获取编号
const href = `#fn${n}`;
const id = `fnref${n}`;
return `<sup class="footnote-ref">[^<a href="${href}" id="${id}">${n}</a>]</sup>`;
};
// 工具函数:显示状态信息
function showStatus(elementId, message, type) {

4
deepsearcher/templates/static/themes/github.css

@ -453,3 +453,7 @@ body {
line-height: 0;
padding: 10px 0;
}
.markdown-body .footnotes .footnote-item .footnote-backref {
display: none;
}

4
deepsearcher/templates/static/themes/latex.css

@ -417,6 +417,10 @@ h6.md-focus.md-heading:before {
padding: 10px 0;
}
.markdown-body .footnotes .footnote-item .footnote-backref {
display: none;
}
/* 参考文献(脚注)上标 */
.markdown-body sup.md-footnote {
display: inline;

7
deepsearcher/templates/static/themes/light.css

@ -554,13 +554,13 @@
margin-bottom: 0;
}
.markdown-body sup > a::before {
/* .markdown-body sup > a::before {
content: '[';
}
.markdown-body sup > a::after {
content: ']';
}
} */
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
@ -919,6 +919,9 @@
line-height: 0;
padding: 10px 0;
}
.markdown-body .footnotes .footnote-item .footnote-backref {
display: none;
}
.markdown-body .task-list-item {
list-style-type: none;

4
deepsearcher/templates/static/themes/newsprint.css

@ -644,3 +644,7 @@
line-height: 0;
padding: 10px 0;
}
.markdown-body .footnotes .footnote-item .footnote-backref {
display: none;
}

4
deepsearcher/templates/static/themes/pixyll.css

@ -406,6 +406,10 @@ p,
padding-left: 34px;
}
.markdown-body .footnotes .footnote-item .footnote-backref {
display: none;
}
.markdown-body .md-task-list-item > input {
width: 1.25rem;
height: 1.25rem;

4
deepsearcher/templates/static/themes/whitey.css

@ -300,3 +300,7 @@
line-height: 0;
padding: 10px 0;
}
.markdown-body .footnotes .footnote-item .footnote-backref {
display: none;
}

Loading…
Cancel
Save