1
0
Fork 0
forked from forgejo/forgejo

Replace fomantic divider module with our own (#25539)

Should look exactly like before for normal dividers. "Horizontal" ones
look better because they no longer use image backgrounds.

<img width="917" alt="Screenshot 2023-06-27 at 19 07 56"
src="d97d8dec-6859-44a8-85ba-e4549b4dd9df">

<img width="914" alt="Screenshot 2023-06-27 at 19 05 58"
src="8bf98544-2d82-4ebf-ac68-d6dc237bd6b2">

<img width="1246" alt="Screenshot 2023-06-27 at 19 00 42"
src="36a6bb21-6029-4f53-8bee-535f55c66fed">

<img width="344" alt="Screenshot 2023-06-27 at 18 58 15"
src="a9e70aee-8e6b-4ea1-9e93-19c9f96aec6e">
<img width="823" alt="Screenshot 2023-06-27 at 18 56 22"
src="e7a497cd-f262-4683-8872-23c3c8cce32f">

<img width="330" alt="Screenshot 2023-06-27 at 19 21 11"
src="42f24149-a655-4c7e-bd26-8ab52db6446b">
This commit is contained in:
silverwind 2023-06-29 14:24:22 +02:00 committed by GitHub
parent 72b3af74be
commit 64f2d70262
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 190 additions and 471 deletions

View file

@ -50,5 +50,5 @@
</div>
</div>
<div class="ui divider"></div>
<div class="divider"></div>
{{end}}

View file

@ -6,7 +6,7 @@
<div class="navbar">
{{template "repo/issue/navbar" .}}
</div>
<div class="ui divider"></div>
<div class="divider"></div>
{{range .IssueTemplates}}
<div class="ui attached segment">
<div class="ui two column grid">

View file

@ -22,10 +22,10 @@
<div class="ui attached segment">
{{if and (not $.PageIsOrgSettingsLabels) (or $.CanWriteIssues $.CanWritePulls) (eq .NumLabels 0) (not $.Repository.IsArchived)}}
{{template "repo/issue/labels/label_load_template" .}}
<div class="ui divider"></div>
<div class="divider"></div>
{{else if and ($.PageIsOrgSettingsLabels) (eq .NumLabels 0)}}
{{template "repo/issue/labels/label_load_template" .}}
<div class="ui divider"></div>
<div class="divider"></div>
{{end}}
<ul class="issue-label-list">

View file

@ -18,18 +18,18 @@
{{range .Labels}}
{{$exclusiveScope := .ExclusiveScope}}
{{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
<div class="ui divider"></div>
<div class="divider"></div>
{{end}}
{{$previousExclusiveScope = $exclusiveScope}}
<a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}" data-scope="{{$exclusiveScope}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}</span>&nbsp;&nbsp;{{RenderLabel $.Context .}}
{{if .Description}}<br><small class="desc">{{.Description | RenderEmoji $.Context}}</small>{{end}}</a>
{{end}}
<div class="ui divider"></div>
<div class="divider"></div>
{{$previousExclusiveScope := "_no_scope"}}
{{range .OrgLabels}}
{{$exclusiveScope := .ExclusiveScope}}
{{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
<div class="ui divider"></div>
<div class="divider"></div>
{{end}}
{{$previousExclusiveScope = $exclusiveScope}}
<a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}" data-scope="{{$exclusiveScope}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}</span>&nbsp;&nbsp;{{RenderLabel $.Context .}}

View file

@ -102,14 +102,14 @@
<input type="text" placeholder="{{.locale.Tr "repo.issues.filter_label"}}">
</div>
<span class="info">{{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}</span>
<div class="ui divider"></div>
<div class="divider"></div>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels=0&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_select_no_label"}}</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_no_select"}}</a>
{{$previousExclusiveScope := "_no_scope"}}
{{range .Labels}}
{{$exclusiveScope := .ExclusiveScope}}
{{if and (ne $previousExclusiveScope $exclusiveScope)}}
<div class="ui divider"></div>
<div class="divider"></div>
{{end}}
{{$previousExclusiveScope = $exclusiveScope}}
<a class="item label-filter-item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.QueryString}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}" data-label-id="{{.ID}}">{{if .IsExcluded}}{{svg "octicon-circle-slash"}}{{else if .IsSelected}}{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}{{end}} {{RenderLabel $.Context .}}</a>
@ -306,7 +306,7 @@
{{range .Labels}}
{{$exclusiveScope := .ExclusiveScope}}
{{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
<div class="ui divider"></div>
<div class="divider"></div>
{{end}}
{{$previousExclusiveScope = $exclusiveScope}}
<div class="item issue-action" data-action="toggle" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/labels">

View file

@ -48,7 +48,7 @@
<div class="gt-mr-3">{{.locale.Tr "repo.milestones.completeness" .Milestone.Completeness | Safe}}</div>
</div>
</div>
<div class="ui divider"></div>
<div class="divider"></div>
<div id="issue-filters" class="issue-list-toolbar">
<div class="issue-list-toolbar-left">

View file

@ -10,7 +10,7 @@
</div>
{{end}}
</div>
<div class="ui divider"></div>
<div class="divider"></div>
<h2 class="ui dividing header">
{{if .PageIsEditMilestone}}
{{.locale.Tr "repo.milestones.edit"}}
@ -41,7 +41,7 @@
</div>
</div>
<div class="ui container">
<div class="ui divider"></div>
<div class="divider"></div>
<div class="ui right">
{{if .PageIsEditMilestone}}
<a class="ui primary basic button" href="{{.RepoLink}}/milestones">

View file

@ -55,7 +55,7 @@
{{template "repo/issue/labels/labels_selector_field" .}}
{{template "repo/issue/labels/labels_sidebar" dict "root" $}}
<div class="ui divider"></div>
<div class="divider"></div>
<input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}">
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-milestone dropdown">
@ -82,7 +82,7 @@
</div>
{{if .IsProjectsEnabled}}
<div class="ui divider"></div>
<div class="divider"></div>
<input id="project_id" name="project_id" type="hidden" value="{{.project_id}}">
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-project dropdown">
@ -141,7 +141,7 @@
</div>
</div>
{{end}}
<div class="ui divider"></div>
<div class="divider"></div>
<input id="assignee_ids" name="assignee_ids" type="hidden" value="{{.assignee_ids}}">
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating jump select-assignees dropdown">
<span class="text">
@ -177,7 +177,7 @@
{{end}}
</div>
{{if and .PageIsComparePull (not (eq .HeadRepo.FullName .BaseCompareRepo.FullName)) .CanWriteToHeadRepo}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="inline field">
<div class="ui checkbox">
<label data-tooltip-content="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"><strong>{{.locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label>

View file

@ -1,6 +1,6 @@
<div class="dropzone-attachments">
{{if .Attachments}}
<div class="ui divider"></div>
<div class="divider"></div>
{{end}}
{{$hasThumbnails := false}}
{{- range .Attachments -}}
@ -25,7 +25,7 @@
{{end -}}
{{if $hasThumbnails}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="ui small thumbnails">
{{- range .Attachments -}}
{{if FilenameIsImage .Name}}

View file

@ -179,7 +179,7 @@
{{end}}
{{template "repo/issue/view_content/update_branch_by_merge" $}}
{{if .Issue.PullRequest.IsEmpty}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="item">
{{svg "octicon-alert"}}
@ -196,7 +196,7 @@
{{$createdPRMergeStr := TimeSinceUnix .PendingPullRequestMerge.CreatedUnix $.locale}}
{{$hasPendingPullRequestMergeTip = $.locale.Tr "repo.pulls.auto_merge_has_pending_schedule" .PendingPullRequestMerge.Doer.Name $createdPRMergeStr}}
{{end}}
<div class="ui divider"></div>
<div class="divider"></div>
<script type="module">
const issueUrl = window.location.origin + {{$.Issue.Link}};
const defaultMergeTitle = {{.DefaultMergeMessage}};
@ -276,7 +276,7 @@
<div id="pull-request-merge-form"></div>
{{else}}
{{/* no merge style was set in repo setting: not or ($prUnit.PullRequestsConfig.AllowMerge ...) */}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="item text red">
{{svg "octicon-x"}}
{{$.locale.Tr "repo.pulls.no_merge_desc"}}
@ -288,7 +288,7 @@
{{end}} {{/* end if the repo was set to use any merge style */}}
{{else}}
{{/* user is not allowed to merge */}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="item">
{{svg "octicon-info"}}
{{$.locale.Tr "repo.pulls.no_merge_access"}}
@ -358,7 +358,7 @@
* Then the Manually Merged form will be shown to repo admin users
*/}}
{{if and $.StillCanManualMerge (not $showGeneralMergeForm)}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="ui form">
<form action="{{.Link}}/merge" method="post">
{{.CsrfTokenHtml}}

View file

@ -1,4 +1,4 @@
<div class="ui divider"></div>
<div class="divider"></div>
<div class="instruct-toggle"> {{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div>
<div class="instruct-content gt-mt-3 gt-hidden">
<div><h3 class="gt-di">{{$.locale.Tr "step1"}} </h3>{{$.locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div>

View file

@ -29,7 +29,7 @@
{{end}}
{{end}}
{{if .TeamReviewers}}
<div class="ui divider"></div>
<div class="divider"></div>
{{range .TeamReviewers}}
{{if .Team}}
<a class="{{if not .CanChange}}ui{{end}} item {{if .Checked}}checked{{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_team_{{.Team.ID}}" {{if not .CanChange}} data-tooltip-content="{{$.locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}>
@ -118,13 +118,13 @@
</a>
</div>
{{end}}
<div class="ui divider"></div>
<div class="divider"></div>
{{end}}
{{template "repo/issue/labels/labels_selector_field" .}}
{{template "repo/issue/labels/labels_sidebar" dict "root" $}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown">
<a class="text gt-df gt-ac muted">
@ -150,7 +150,7 @@
</div>
{{if .IsProjectsEnabled}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown">
<a class="text gt-df gt-ac muted">
@ -203,7 +203,7 @@
</div>
{{end}}
<div class="ui divider"></div>
<div class="divider"></div>
<input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
<div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown">
@ -251,7 +251,7 @@
</div>
</div>
<div class="ui divider"></div>
<div class="divider"></div>
{{if .Participants}}
<span class="text"><strong>{{.locale.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span>
@ -265,7 +265,7 @@
{{end}}
{{if and $.IssueWatch (not .Repository.IsArchived)}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="ui watching">
<span class="text"><strong>{{.locale.Tr "notification.notifications"}}</strong></span>
@ -288,7 +288,7 @@
{{end}}
{{if .Repository.IsTimetrackerEnabled $.Context}}
{{if and .CanUseTimetracker (not .Repository.IsArchived)}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="ui timetrack">
<span class="text"><strong>{{.locale.Tr "repo.issues.tracker"}}</strong></span>
<div class="gt-mt-3">
@ -328,7 +328,7 @@
</div>
{{end}}
{{if gt (len .WorkingUsers) 0}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="ui comments">
<span class="text"><strong>{{.locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time) | Safe}}</strong></span>
<div>
@ -350,7 +350,7 @@
{{end}}
{{end}}
<div class="ui divider"></div>
<div class="divider"></div>
<span class="text"><strong>{{.locale.Tr "repo.issues.due_date"}}</strong></span>
<div class="ui form" id="deadline-loader">
<div class="ui negative message gt-hidden" id="deadline-err-invalid-date">
@ -394,7 +394,7 @@
</div>
{{if .Repository.IsDependenciesEnabled $.Context}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="ui depending">
{{if (and (not .BlockedByDependencies) (not .BlockedByDependenciesNotPermitted) (not .BlockingDependencies) (not .BlockingDependenciesNotPermitted))}}
@ -543,7 +543,7 @@
{{end}}
{{end}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="ui equal width compact grid">
{{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}}
<div class="row gt-ac" data-tooltip-content="{{$issueReferenceLink}}">
@ -553,7 +553,7 @@
</div>
{{if and .IsRepoAdmin (not .Repository.IsArchived)}}
<div class="ui divider"></div>
<div class="divider"></div>
{{if or .PinEnabled .Issue.IsPinned}}
<form class="gt-mt-2 form-fetch-action single-button-form" method="post" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{.locale.Tr "repo.issues.max_pinned"}}"{{end}}>
@ -673,7 +673,7 @@
{{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}}
{{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="inline field">
<div class="ui checkbox" id="allow-edits-from-maintainers"
data-url="{{.Issue.Link}}"

View file

@ -1,5 +1,5 @@
{{if and (gt $.Issue.PullRequest.CommitsBehind 0) (not $.Issue.IsClosed) (not $.Issue.PullRequest.IsChecking) (not $.IsPullFilesConflicted) (not $.IsPullRequestBroken)}}
<div class="ui divider"></div>
<div class="divider"></div>
<div class="item item-section">
<div class="item-section-left flex-text-inline">
{{svg "octicon-alert"}}