Skip to content

Commit

Permalink
Improve dropdown menus, remove inline styles (#24954)
Browse files Browse the repository at this point in the history
Before:

<img width="190" alt="Screenshot 2023-05-27 at 10 46 43"
src="https://github.com/go-gitea/gitea/assets/115237/b9331fcd-db1d-476e-87f0-f79bae48b1a5">

After:

<img width="154" alt="Screenshot 2023-05-28 at 19 29 03"
src="https://github.com/go-gitea/gitea/assets/115237/8b7f99a2-01a8-4665-9342-a6201b51d30f">

---------

Co-authored-by: Giteabot <teabot@gitea.io>
  • Loading branch information
silverwind and GiteaBot authored May 29, 2023
1 parent 0018b0a commit 73b57c2
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 17 deletions.
5 changes: 0 additions & 5 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1302,28 +1302,23 @@ issues.filter_reviewers = Filter Reviewer
issues.new = New Issue
issues.new.title_empty = Title cannot be empty
issues.new.labels = Labels
issues.new.add_labels_title = Apply labels
issues.new.no_label = No Label
issues.new.clear_labels = Clear labels
issues.new.projects = Projects
issues.new.add_project_title = Set Project
issues.new.clear_projects = Clear projects
issues.new.no_projects = No project
issues.new.open_projects = Open Projects
issues.new.closed_projects = Closed Projects
issues.new.no_items = No items
issues.new.milestone = Milestone
issues.new.add_milestone_title = Set milestone
issues.new.no_milestone = No Milestone
issues.new.clear_milestone = Clear milestone
issues.new.open_milestone = Open Milestones
issues.new.closed_milestone = Closed Milestones
issues.new.assignees = Assignees
issues.new.add_assignees_title = Assign users
issues.new.clear_assignees = Clear assignees
issues.new.no_assignees = No Assignees
issues.new.no_reviewers = No reviewers
issues.new.add_reviewer_title = Request review
issues.choose.get_started = Get Started
issues.choose.open_external_link = Open
issues.choose.blank = Default
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}">
{{range .Topics}}
{{/* keey the same layout as Fomantic UI generated labels */}}
<a class="ui label transition visible gt-cursor-default" data-value="{{.Name}}" style="display: inline-block !important;">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a>
<a class="ui label transition visible gt-cursor-default gt-dib" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a>
{{end}}
<div class="text"></div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions templates/repo/issue/labels/labels_selector_field.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
{{end}}
</span>
<div class="filter menu" {{if .Issue}}data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/labels"{{else}}data-id="#label_ids"{{end}}>
<div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_labels_title"}}</div>
{{if or .Labels .OrgLabels}}
<div class="ui icon search input">
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
Expand Down Expand Up @@ -37,7 +36,7 @@
{{if .Description}}<br><small class="desc">{{.Description | RenderEmoji $.Context}}</small>{{end}}</a>
{{end}}
{{else}}
<div class="header" style="text-transform: none;font-size:14px;">{{.locale.Tr "repo.issues.new.no_items"}}</div>
<div class="disabled item">{{.locale.Tr "repo.issues.new.no_items"}}</div>
{{end}}
</div>
</div>
3 changes: 1 addition & 2 deletions templates/repo/issue/milestone/select_menu.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_milestone_title"}}</div>
{{if or .OpenMilestones .ClosedMilestones}}
<div class="ui icon search input">
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
Expand All @@ -8,7 +7,7 @@
{{end}}
<div class="no-select item">{{.locale.Tr "repo.issues.new.clear_milestone"}}</div>
{{if and (not .OpenMilestones) (not .ClosedMilestones)}}
<div class="header" style="text-transform: none;font-size:14px;">
<div class="disabled item">
{{.locale.Tr "repo.issues.new.no_items"}}
</div>
{{else}}
Expand Down
4 changes: 1 addition & 3 deletions templates/repo/issue/new_form.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
{{end}}
</span>
<div class="menu">
<div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_project_title"}}</div>
{{if or .OpenProjects .ClosedProjects}}
<div class="ui icon search input">
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
Expand All @@ -102,7 +101,7 @@
{{end}}
<div class="no-select item">{{.locale.Tr "repo.issues.new.clear_projects"}}</div>
{{if and (not .OpenProjects) (not .ClosedProjects)}}
<div class="header" style="text-transform: none;font-size:14px;">
<div class="disabled item">
{{.locale.Tr "repo.issues.new.no_items"}}
</div>
{{else}}
Expand Down Expand Up @@ -152,7 +151,6 @@
{{end}}
</span>
<div class="filter menu" data-id="#assignee_ids">
<div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_assignees_title"}}</div>
<div class="ui icon search input">
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
<input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignees"}}">
Expand Down
3 changes: 0 additions & 3 deletions templates/repo/issue/view_content/sidebar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
{{end}}
</a>
<div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/request_review">
<div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_reviewer_title"}}</div>
{{if .Reviewers}}
<div class="ui icon search input">
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
Expand Down Expand Up @@ -161,7 +160,6 @@
{{end}}
</a>
<div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/projects">
<div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_project_title"}}</div>
{{if or .OpenProjects .ClosedProjects}}
<div class="ui icon search input">
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
Expand Down Expand Up @@ -216,7 +214,6 @@
{{end}}
</a>
<div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/assignee">
<div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_assignees_title"}}</div>
<div class="ui icon search input">
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
<input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignees"}}">
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/wiki/revision.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</div>
</div>
<h2 class="ui top header">{{.locale.Tr "repo.wiki.wiki_page_revisions"}}</h2>
<div style="margin-top: 1rem;">
<div class="gt-mt-4">
<h4 class="ui top attached header">
<div class="ui stackable grid">
<div class="sixteen wide column">
Expand Down

0 comments on commit 73b57c2

Please sign in to comment.