ui(wiki): fix search result overflow for long lines
This commit is contained in:
parent
4e578934ab
commit
0a30f00263
2 changed files with 6 additions and 6 deletions
|
@ -1,9 +1,9 @@
|
||||||
{{if .Results}}
|
{{if .Results}}
|
||||||
{{range .Results}}
|
{{range .Results}}
|
||||||
<a class="item" href="{{$.RepoLink}}/wiki/{{.Filename}}">
|
<a class="item tw-max-w-[80vw]" href="{{$.RepoLink}}/wiki/{{.Filename}}">
|
||||||
<b class="tw-block tw-mb-2">{{.Filename}}</b>
|
<b class="tw-block tw-mb-2 tw-whitespace-break-spaces">{{.Filename}}</b>
|
||||||
{{range .LineCodes}}
|
{{range .LineCodes}}
|
||||||
<p class="tw-my-0">{{.}}</p>
|
<p class="tw-my-0 tw-whitespace-break-spaces">{{.}}</p>
|
||||||
{{end}}
|
{{end}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -28,16 +28,16 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clone-panel ui action small input">
|
<div class="clone-panel ui action small input tw-ml-auto">
|
||||||
{{template "repo/clone_buttons" .}}
|
{{template "repo/clone_buttons" .}}
|
||||||
{{template "repo/clone_script" .}}
|
{{template "repo/clone_script" .}}
|
||||||
</div>
|
</div>
|
||||||
<div class="ui floating dropdown jump">
|
<div class="ui floating dropdown jump tw-ml-auto">
|
||||||
<div class="ui icon search input">
|
<div class="ui icon search input">
|
||||||
<i class="icon">{{svg "octicon-search"}}</i>
|
<i class="icon">{{svg "octicon-search"}}</i>
|
||||||
<input type="search" name="q" hx-get="{{$.RepoLink}}/wiki/search" hx-target="#wiki-search" hx-swap="innerHTML" hx-trigger="keyup changed delay:.5s" placeholder="{{ctx.Locale.Tr "repo.wiki.search"}}..." />
|
<input type="search" name="q" hx-get="{{$.RepoLink}}/wiki/search" hx-target="#wiki-search" hx-swap="innerHTML" hx-trigger="keyup changed delay:.5s" placeholder="{{ctx.Locale.Tr "repo.wiki.search"}}..." />
|
||||||
</div>
|
</div>
|
||||||
<div id="wiki-search" class="menu tw-absolute tw-mt-3 tw-rounded right">
|
<div id="wiki-search" class="menu tw-absolute tw-max-h-[65dvh] tw-overflow-y-auto tw-mt-3 tw-rounded left">
|
||||||
<div class="item muted">{{ctx.Locale.Tr "repo.wiki.no_search_results"}}</div>
|
<div class="item muted">{{ctx.Locale.Tr "repo.wiki.no_search_results"}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue