Skip to content

Commit 04bfb57

Browse files
authored
Merge pull request #238 from surmind/master
添加搜索框,并为顶部内容添加标志类 preheader 以便索引前清理文档
2 parents 88d756e + 5f8f276 commit 04bfb57

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tools/add_edit_link.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@
99
import html2sgml_map
1010

1111
patternInsertPos=re.compile(r'.*<body>',re.S)
12-
InsertHTML="""<div style="text-align:right">
12+
InsertHTML="""<div class="preheader"><div style="position: relative; overflow: hidden; margin: 10px 0;">
13+
<form method="GET" action="/v2/doc_search" style="float: right; width: 400px; max-width: 100%;">
14+
<input type="hidden" name="u" value="/docs/11" />
15+
<input style="width: 80%; height: 40px; font-size: 1.0em; padding: 0 10px; margin: 0; border: 1px solid #ccc; box-sizing: border-box;" type="text" placeholder="在文档中查找..." name="q"
16+
/><button style="width: 20%; height: 40px; font-size: 1.0em; padding: 0; margin: 0; border: 1px solid #ccc; box-sizing: border-box; border-left: 0; cursor: pointer;" type="submit" id="#submit">搜索</button>
17+
</form></div>
18+
<div style="text-align:right">
1319
<a style="margin : 0px 0px 0px 10px;" href="https://github.com/postgres-cn/pgdoc-cn/issues/new" target="_blank" title="在Github上报告问题(请注明问题内容及所在章节)">问题报告</a>
1420
<a style="margin : 0px 0px 0px 10px;" href="https://github.com/postgres-cn/pgdoc-cn/edit/master/postgresql/doc/src/sgml/{0}" target="_blank" title="直接在Github上纠错本页面">纠错本页面</a>
15-
</div>"""
21+
</div></div>"""
1622

1723
sgmlDir="../build/doc/src/sgml"
1824
htmlDir=os.path.join(sgmlDir,"html")

0 commit comments

Comments
 (0)