From 8f271c60366ece02f44649de5f8ba57388adb854 Mon Sep 17 00:00:00 2001
From: wxiaoguang <wxiaoguang@gmail.com>
Date: Wed, 11 Dec 2024 00:41:44 +0800
Subject: [PATCH] Fix wiki ui (#32781)

Fix #32774
---
 templates/repo/wiki/view.tmpl | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl
index 781c9326ad..c8e0b4254c 100644
--- a/templates/repo/wiki/view.tmpl
+++ b/templates/repo/wiki/view.tmpl
@@ -34,26 +34,26 @@
 			</div>
 		</div>
 		<div class="ui dividing header">
-			<div class="ui stackable grid">
-				<div class="eight wide column">
+			<div class="flex-text-block tw-flex-wrap tw-justify-end">
+				<div class="flex-text-block tw-flex-1 tw-min-w-[300px]">
 					<a class="file-revisions-btn ui basic button" title="{{ctx.Locale.Tr "repo.wiki.file_revision"}}" href="{{.RepoLink}}/wiki/{{.PageURL}}?action=_revision" ><span>{{.CommitCount}}</span> {{svg "octicon-history"}}</a>
-					{{$title}}
-					<div class="ui sub header">
-						{{$timeSince := DateUtils.TimeSince .Author.When}}
-						{{ctx.Locale.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince}}
+					<div class="tw-flex-1 gt-ellipsis">
+						{{$title}}
+						<div class="ui sub header gt-ellipsis">
+							{{$timeSince := DateUtils.TimeSince .Author.When}}
+							{{ctx.Locale.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince}}
+						</div>
 					</div>
 				</div>
-				<div class="eight wide right aligned column">
+				<div class="flex-text-block tw-flex-wrap tw-justify-end">
 					{{if .EscapeStatus.Escaped}}
-						<a class="ui small button unescape-button tw-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</a>
-						<a class="ui small button escape-button">{{ctx.Locale.Tr "repo.escape_control_characters"}}</a>
+						<a class="ui small button unescape-button tw-m-0 tw-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</a>
+						<a class="ui small button escape-button tw-m-0">{{ctx.Locale.Tr "repo.escape_control_characters"}}</a>
 					{{end}}
 					{{if and .CanWriteWiki (not .Repository.IsMirror)}}
-						<div class="ui right">
-							<a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}?action=_edit">{{ctx.Locale.Tr "repo.wiki.edit_page_button"}}</a>
-							<a class="ui small primary button" href="{{.RepoLink}}/wiki?action=_new">{{ctx.Locale.Tr "repo.wiki.new_page_button"}}</a>
-							<a class="ui small red button delete-button" href="" data-url="{{.RepoLink}}/wiki/{{.PageURL}}?action=_delete" data-id="{{.PageURL}}">{{ctx.Locale.Tr "repo.wiki.delete_page_button"}}</a>
-						</div>
+						<a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}?action=_edit">{{ctx.Locale.Tr "repo.wiki.edit_page_button"}}</a>
+						<a class="ui small primary button" href="{{.RepoLink}}/wiki?action=_new">{{ctx.Locale.Tr "repo.wiki.new_page_button"}}</a>
+						<a class="ui small red button tw-m-0 delete-button" href="" data-url="{{.RepoLink}}/wiki/{{.PageURL}}?action=_delete" data-id="{{.PageURL}}">{{ctx.Locale.Tr "repo.wiki.delete_page_button"}}</a>
 					{{end}}
 				</div>
 			</div>