]> source.dussan.org Git - gitea.git/commitdiff
Align language menu icon and fit the footer area (#25556) (#25563)
authorGiteabot <teabot@gitea.io>
Wed, 28 Jun 2023 15:51:24 +0000 (11:51 -0400)
committerGitHub <noreply@github.com>
Wed, 28 Jun 2023 15:51:24 +0000 (11:51 -0400)
Backport #25556 by @wxiaoguang

Close #25551

## Before

![image](https://github.com/go-gitea/gitea/assets/2114189/f35aebeb-9c86-4632-8c1f-1c90aa757640)

## After

![image](https://github.com/go-gitea/gitea/assets/2114189/4a623687-6c6d-442a-a4f9-07dadeb9fc6d)

----

![image](https://github.com/go-gitea/gitea/assets/2114189/6a4e5ecf-b88b-4c22-98c3-21898bd41bc5)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
templates/base/footer_content.tmpl
web_src/css/home.css

index f5272744846cdd507819fa32fb236d1024cbefa7..3b87f25d6378666efacf8cab3123e7a9432cf2f0 100644 (file)
@@ -16,7 +16,7 @@
        </div>
        <div class="right-links" role="group" aria-label="{{.locale.Tr "aria.footer.links"}}">
                <div class="ui dropdown upward language">
-                       <span>{{svg "octicon-globe"}} {{.locale.LangName}}</span>
+                       <span class="flex-text-inline">{{svg "octicon-globe" 14}} {{.locale.LangName}}</span>
                        <div class="menu language-menu">
                                {{range .AllLangs}}
                                        <a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}" class="item {{if eq $.locale.Lang .Lang}}active selected{{end}}">{{.Name}}</a>
index a46c46ffde0ade4f9834bbb14f77452b69a34684..55caf4cb27166cd0b72886f411168202c8af6b31 100644 (file)
 
 .page-footer {
   display: flex;
+  justify-content: space-between;
   background-color: var(--color-footer);
   border-top: 1px solid var(--color-secondary);
-  line-height: 39px;
-  padding: 0 20px;
+  padding: 8px 20px;
 }
 
 .page-footer .left-links {
-  flex: 1;
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  justify-content: center;
+  gap: 0.25em;
 }
 
 .page-footer .right-links {
   min-width: 180px; /* make sure the menu dropdown doesn't overflow horizontally when language name is short */
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  justify-content: center;
 }
 
 .page-footer .right-links > a {
@@ -74,7 +82,7 @@
 
 @media (max-width: 880px) {
   .page-footer {
-    display: block;
-    text-align: center;
+    flex-direction: column;
+    gap: 0.5em;
   }
 }