summaryrefslogtreecommitdiffstats
path: root/templates/package
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-05-04 02:32:10 +0800
committerGitHub <noreply@github.com>2023-05-03 14:32:10 -0400
commit48e3e38ee040c9cfec6ea2adea2da49a7f21f2c7 (patch)
tree7c61c108166247f7c1a1e299dcce2d7bd00afdaf /templates/package
parente9b39250b285f1b9cbf9739f33c06fc57401f314 (diff)
downloadgitea-48e3e38ee040c9cfec6ea2adea2da49a7f21f2c7.tar.gz
gitea-48e3e38ee040c9cfec6ea2adea2da49a7f21f2c7.zip
Clean up polluted styles and remove dead CSS code (#24497)
Follow #24393 The funny history: * At the beginning, `.ui.message` was polluted by `text-align: center` * Then people do `<div class="ui ... message text left">` * But `.ui.left` is polluted by `float: left` * Then people do `#xxx .ui.message { width: 100% !important;}` The code just becomes more and more hacky. After removing the pollution, everything becomes clear and straight. And, this PR also does: 1. Remove the `package.css`, its styles could be provided by `top aligned` 2. Remove `#avatar-arrow`, dead code Screenshot: ![image](https://user-images.githubusercontent.com/2114189/235862130-a9eb5d8f-7d01-457c-99f7-21d0abc3075e.png) ![image](https://user-images.githubusercontent.com/2114189/235862222-139709a7-95c2-4f89-a40f-100b2d76d9bb.png) Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates/package')
-rw-r--r--templates/package/content/container.tmpl6
-rw-r--r--templates/package/settings.tmpl2
2 files changed, 4 insertions, 4 deletions
diff --git a/templates/package/content/container.tmpl b/templates/package/content/container.tmpl
index 3370ebca3f..d928b36e60 100644
--- a/templates/package/content/container.tmpl
+++ b/templates/package/content/container.tmpl
@@ -69,7 +69,7 @@
{{if .PackageDescriptor.Metadata.Labels}}
<h4 class="ui top attached header">{{.locale.Tr "packages.container.labels"}}</h4>
<div class="ui attached segment">
- <table class="ui very basic compact table container-labels">
+ <table class="ui very basic compact table">
<thead>
<tr>
<th>{{.locale.Tr "packages.container.labels.key"}}</th>
@@ -79,8 +79,8 @@
<tbody>
{{range $key, $value := .PackageDescriptor.Metadata.Labels}}
<tr>
- <td>{{$key}}</td>
- <td>{{$value}}</td>
+ <td class="top aligned">{{$key}}</td>
+ <td class="gt-word-break">{{$value}}</td>
</tr>
{{end}}
</tbody>
diff --git a/templates/package/settings.tmpl b/templates/package/settings.tmpl
index 7beb3da062..205d875c3e 100644
--- a/templates/package/settings.tmpl
+++ b/templates/package/settings.tmpl
@@ -51,7 +51,7 @@
{{.locale.Tr "packages.settings.delete"}}
</div>
<div class="content">
- <div class="ui warning message text left gt-word-break">
+ <div class="ui warning message gt-word-break">
{{.locale.Tr "packages.settings.delete.notice" .PackageDescriptor.Package.Name .PackageDescriptor.Version.Version}}
</div>
<form class="ui form" action="{{.Link}}" method="post">