Skip to content

Commit

Permalink
Improve home page template, fix Sort dropdown menu flash (#23856)
Browse files Browse the repository at this point in the history
Follow #23854

Major changes:

1. The old `<div class="ui"><div class="six wide column ...">
</div></div>` doesn't have affect any more
    * So clean them, and remove other unnecessary elements/styles.
2. Add padding for narrow view.

Before

![image](https://user-images.githubusercontent.com/2114189/229262177-e8cf6c9b-b17b-482c-83fe-a84579e01e8e.png)

After:

![image](https://user-images.githubusercontent.com/2114189/229262166-d46134b0-2117-4d5c-a469-a2115cbd4b6c.png)
  • Loading branch information
wxiaoguang committed Apr 1, 2023
1 parent 053df15 commit e216585
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions templates/home.tmpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{{template "base/head" .}}
<div role="main" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}" class="page-content home">
<div class="ui middle very relaxed page gt-mb-5">
<div class="sixteen wide center aligned centered column">
<div>
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}">
</div>
<div class="gt-mb-5 gt-px-5">
<div class="center">
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}">
<div class="hero">
<h1 class="ui icon header title">
{{AppName}}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/issue/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
{{.locale.Tr "repo.issues.filter_sort"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
</span>
<div class="left menu">
<div class="menu">
<a class="{{if or (eq .SortType "latest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=latest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=oldest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=recentupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
Expand Down

0 comments on commit e216585

Please sign in to comment.