Color and Style enhancements (#21784, #21799) (#21868)

Backport #21784
Backport #21799

These PRs provide tweaks and simplification to the less/css selectors, simplifying text color selectors and tweak arc-green colors with a follow-up to adjust the timeline 

See the original PRs for more details
tokarchuk/v1.18
silverwind 2 years ago committed by GitHub
parent 7a004ad7eb
commit ef08998bf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      templates/explore/repo_list.tmpl
  2. 4
      templates/org/home.tmpl
  3. 2
      templates/repo/diff/comments.tmpl
  4. 4
      templates/repo/issue/view_content.tmpl
  5. 20
      templates/repo/issue/view_content/comments.tmpl
  6. 2
      templates/repo/issue/view_content/sidebar.tmpl
  7. 2
      templates/shared/issuelist.tmpl
  8. 4
      templates/shared/user/authorlink.tmpl
  9. 4
      templates/shared/user/avatarlink.tmpl
  10. 4
      templates/shared/user/namelink.tmpl
  11. 91
      web_src/less/_base.less
  12. 18
      web_src/less/_repository.less
  13. 8
      web_src/less/shared/issuelist.less
  14. 45
      web_src/less/themes/theme-arc-green.less

@ -38,10 +38,10 @@
{{end}} {{end}}
</div> </div>
</div> </div>
<div class="metas df ac"> <div class="metas df ac text grey">
{{if .PrimaryLanguage}} {{if .PrimaryLanguage}}
<a href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}"> <a class="muted" href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}">
<span class="text grey df ac mr-3"><i class="color-icon mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span> <span class="df ac mr-3"><i class="color-icon mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span>
</a> </a>
{{end}} {{end}}
{{if not $.DisableStars}} {{if not $.DisableStars}}

@ -68,8 +68,8 @@
<div class="item"> <div class="item">
<a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong class="team-name">{{.Name}}</strong></a> <a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong class="team-name">{{.Name}}</strong></a>
<p class="text grey"> <p class="text grey">
<a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.NumMembers}}</strong> {{$.locale.Tr "org.lower_members"}}</a> · <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.NumMembers}}</strong> {{$.locale.Tr "org.lower_members"}}</a> ·
<a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories"><strong>{{.NumRepos}}</strong> {{$.locale.Tr "org.lower_repositories"}}</a> <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories"><strong>{{.NumRepos}}</strong> {{$.locale.Tr "org.lower_repositories"}}</a>
</p> </p>
</div> </div>
{{end}} {{end}}

@ -11,7 +11,7 @@
<div class="ui top attached header comment-header df ac sb"> <div class="ui top attached header comment-header df ac sb">
<div class="comment-header-left df ac"> <div class="comment-header-left df ac">
{{if .OriginalAuthor}} {{if .OriginalAuthor}}
<span class="text black mr-2"> <span class="text black bold mr-2">
{{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}} {{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}} {{.OriginalAuthor}}
</span> </span>

@ -30,7 +30,7 @@
<div class="ui top attached header comment-header df ac sb"> <div class="ui top attached header comment-header df ac sb">
<div class="comment-header-left df ac"> <div class="comment-header-left df ac">
{{if .Issue.OriginalAuthor}} {{if .Issue.OriginalAuthor}}
<span class="text black"> <span class="text black bold">
{{svg (MigrationIcon .Repository.GetOriginalURLHostname)}} {{svg (MigrationIcon .Repository.GetOriginalURLHostname)}}
{{.Issue.OriginalAuthor}} {{.Issue.OriginalAuthor}}
</span> </span>
@ -45,7 +45,7 @@
{{avatar .Issue.Poster}} {{avatar .Issue.Poster}}
</a> </a>
<span class="text grey"> <span class="text grey">
<a class="author"{{if gt .Issue.Poster.ID 0}} href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.GetDisplayName}}</a> {{template "shared/user/authorlink" .Issue.Poster}}
{{.locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr | Safe}} {{.locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr | Safe}}
</span> </span>
{{end}} {{end}}

@ -25,7 +25,7 @@
<div class="ui top attached header comment-header df ac sb"> <div class="ui top attached header comment-header df ac sb">
<div class="comment-header-left df ac"> <div class="comment-header-left df ac">
{{if .OriginalAuthor}} {{if .OriginalAuthor}}
<span class="text black mr-2"> <span class="text black bold mr-2">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}} {{.OriginalAuthor}}
</span> </span>
@ -42,9 +42,7 @@
</a> </a>
{{end}} {{end}}
<span class="text grey"> <span class="text grey">
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}> {{template "shared/user/authorlink" .Poster}}
{{.Poster.GetDisplayName}}
</a>
{{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}} {{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
</span> </span>
{{end}} {{end}}
@ -151,14 +149,14 @@
<span class="badge">{{svg "octicon-bookmark"}}</span> <span class="badge">{{svg "octicon-bookmark"}}</span>
{{template "shared/user/avatarlink" .Poster}} {{template "shared/user/avatarlink" .Poster}}
{{if eq .RefAction 3}}<del>{{end}} {{if eq .RefAction 3}}<del>{{end}}
<span class="text grey"> <span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}} {{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr $refTr (.EventTag|Escape) $createdStr (.RefCommentHTMLURL|Escape) $refFrom | Safe}} {{$.locale.Tr $refTr (.EventTag|Escape) $createdStr (.RefCommentHTMLURL|Escape) $refFrom | Safe}}
</span> </span>
{{if eq .RefAction 3}}</del>{{end}} {{if eq .RefAction 3}}</del>{{end}}
<div class="detail"> <div class="detail">
<span class="text grey"><a href="{{.RefIssueHTMLURL}}"><b>{{.RefIssueTitle}}</b> {{.RefIssueIdent}}</a></span> <span class="text grey"><a class="muted" href="{{.RefIssueHTMLURL}}"><b>{{.RefIssueTitle}}</b> {{.RefIssueIdent}}</a></span>
</div> </div>
</div> </div>
{{else if eq .Type 4}} {{else if eq .Type 4}}
@ -207,7 +205,7 @@
{{if .RemovedAssignee}} {{if .RemovedAssignee}}
{{template "shared/user/avatarlink" .Assignee}} {{template "shared/user/avatarlink" .Assignee}}
<span class="text grey"> <span class="text grey">
<a class="author" {{if gt .Assignee.ID 0}}href="{{.Assignee.HomeLink}}"{{end}}>{{.Assignee.GetDisplayName}}</a> {{template "shared/user/authorlink" .Assignee}}
{{if eq .Poster.ID .Assignee.ID}} {{if eq .Poster.ID .Assignee.ID}}
{{$.locale.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}} {{$.locale.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}}
{{else}} {{else}}
@ -331,7 +329,7 @@
<div class="detail"> <div class="detail">
{{svg "octicon-plus"}} {{svg "octicon-plus"}}
<span class="text grey"> <span class="text grey">
<a href="{{.DependentIssue.HTMLURL}}"> <a class="muted" href="{{.DependentIssue.HTMLURL}}">
{{if eq .DependentIssue.RepoID .Issue.RepoID}} {{if eq .DependentIssue.RepoID .Issue.RepoID}}
#{{.DependentIssue.Index}} {{.DependentIssue.Title}} #{{.DependentIssue.Index}} {{.DependentIssue.Title}}
{{else}} {{else}}
@ -354,7 +352,7 @@
<div class="detail"> <div class="detail">
<span class="text grey">{{svg "octicon-trash"}}</span> <span class="text grey">{{svg "octicon-trash"}}</span>
<span class="text grey"> <span class="text grey">
<a href="{{.DependentIssue.HTMLURL}}"> <a class="muted" href="{{.DependentIssue.HTMLURL}}">
{{if eq .DependentIssue.RepoID .Issue.RepoID}} {{if eq .DependentIssue.RepoID .Issue.RepoID}}
#{{.DependentIssue.Index}} {{.DependentIssue.Title}} #{{.DependentIssue.Index}} {{.DependentIssue.Title}}
{{else}} {{else}}
@ -408,7 +406,7 @@
<div class="comment-header-left df ac"> <div class="comment-header-left df ac">
<span class="text grey"> <span class="text grey">
{{if .OriginalAuthor}} {{if .OriginalAuthor}}
<span class="text black"> <span class="text black bold">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}} {{.OriginalAuthor}}
</span> </span>
@ -536,7 +534,7 @@
{{end}} {{end}}
<span class="text grey"> <span class="text grey">
{{if .OriginalAuthor}} {{if .OriginalAuthor}}
<span class="text black"> <span class="text black bold">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}} {{.OriginalAuthor}}
</span> </span>

@ -389,7 +389,7 @@
{{avatar $user}} {{avatar $user}}
</a> </a>
<div class="content"> <div class="content">
<a class="author">{{$user.DisplayName}}</a> {{template "shared/user/authorlink" $user}}
<div class="text"> <div class="text">
{{$trackedtime}} {{$trackedtime}}
</div> </div>

@ -160,7 +160,7 @@
</div> </div>
<div class="issue-item-icon-right text grey"> <div class="issue-item-icon-right text grey">
{{if .NumComments}} {{if .NumComments}}
<a class="tdn" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}"> <a class="tdn muted" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
{{svg "octicon-comment" 16 "mr-2"}}{{.NumComments}} {{svg "octicon-comment" 16 "mr-2"}}{{.NumComments}}
</a> </a>
{{end}} {{end}}

@ -1,3 +1 @@
<a class="author"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}> <a class="author text black bold muted"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>
{{.GetDisplayName}}
</a>

@ -1,3 +1 @@
<a class="avatar"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}> <a class="avatar"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{avatar .}}</a>
{{avatar .}}
</a>

@ -1,3 +1 @@
<a{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}> <a{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>
{{.GetDisplayName}}
</a>

@ -79,6 +79,7 @@
--color-pink: #e03997; --color-pink: #e03997;
--color-brown: #a5673f; --color-brown: #a5673f;
--color-grey: #888888; --color-grey: #888888;
--color-black: #1b1c1d;
/* light variants - produced via Sass scale-color(color, $lightness: +25%) */ /* light variants - produced via Sass scale-color(color, $lightness: +25%) */
--color-red-light: #e45e5e; --color-red-light: #e45e5e;
--color-orange-light: #f59555; --color-orange-light: #f59555;
@ -92,9 +93,9 @@
--color-pink-light: #e86bb1; --color-pink-light: #e86bb1;
--color-brown-light: #c58b66; --color-brown-light: #c58b66;
--color-grey-light: #a6a6a6; --color-grey-light: #a6a6a6;
--color-black-light: #525558;
/* other colors */ /* other colors */
--color-gold: #a1882b; --color-gold: #a1882b;
--color-black: #1b1c1d;
--color-white: #ffffff; --color-white: #ffffff;
--color-diff-removed-word-bg: #fdb8c0; --color-diff-removed-word-bg: #fdb8c0;
--color-diff-added-word-bg: #acf2bd; --color-diff-added-word-bg: #acf2bd;
@ -293,13 +294,15 @@ a,
text-decoration-skip-ink: all; text-decoration-skip-ink: all;
} }
a.muted { a.muted,
.muted-links a {
color: inherit; color: inherit;
} }
a:hover, a:hover,
a.muted:hover, a.muted:hover,
a.muted:hover [class*="color-text"], a.muted:hover [class*="color-text"],
.muted-links a:hover,
.ui.breadcrumb a:hover { .ui.breadcrumb a:hover {
color: var(--color-primary); color: var(--color-primary);
} }
@ -1301,6 +1304,22 @@ a.ui.card:hover,
visibility: hidden; visibility: hidden;
} }
.text.red { color: var(--color-red) !important; }
.text.orange { color: var(--color-orange) !important; }
.text.yellow { color: var(--color-yellow) !important; }
.text.olive { color: var(--color-olive) !important; }
.text.green { color: var(--color-green) !important; }
.text.teal { color: var(--color-teal) !important; }
.text.blue { color: var(--color-blue) !important; }
.text.violet { color: var(--color-violet) !important; }
.text.purple { color: var(--color-purple) !important; }
.text.pink { color: var(--color-pink) !important; }
.text.brown { color: var(--color-brown) !important; }
.text.black { color: var(--color-text) !important; }
.text.grey { color: var(--color-text-light) !important; }
.text.light.grey { color: var(--color-grey-light) !important; }
.text.gold { color: var(--color-gold) !important; }
.ui { .ui {
&.left:not(.action) { &.left:not(.action) {
float: left; float: left;
@ -1370,74 +1389,6 @@ a.ui.card:hover,
} }
.text { .text {
&.red {
color: var(--color-red) !important;
a {
color: inherit !important;
&:hover {
color: var(--color-red-light) !important;
}
}
}
&.blue {
color: var(--color-blue) !important;
a {
color: inherit !important;
&:hover {
color: var(--color-blue-light) !important;
}
}
}
&.black {
color: var(--color-text);
&:hover {
color: var(--color-text-dark);
}
}
&.grey {
color: var(--color-text-light) !important;
a {
color: var(--color-text) !important;
&:hover {
color: var(--color-primary) !important;
}
}
}
&.light.grey {
color: var(--color-text-light-2) !important;
}
&.green {
color: var(--color-green) !important;
}
&.purple {
color: var(--color-purple) !important;
}
&.yellow {
color: var(--color-yellow) !important;
}
&.orange {
color: var(--color-orange) !important;
}
&.gold {
color: var(--color-gold) !important;
}
&.left { &.left {
text-align: left !important; text-align: left !important;
} }

@ -829,7 +829,7 @@
.timeline-avatar { .timeline-avatar {
position: absolute; position: absolute;
left: -72px; left: -68px;
img { img {
width: 40px !important; width: 40px !important;
@ -846,7 +846,6 @@
.avatar img { .avatar img {
width: 20px; width: 20px;
height: 20px; height: 20px;
margin: 0 .25rem;
vertical-align: middle; vertical-align: middle;
} }
@ -981,10 +980,6 @@
margin-top: 4px; margin-top: 4px;
} }
.author {
font-weight: 600;
}
.comment-form-reply .footer { .comment-form-reply .footer {
padding-bottom: 1em; padding-bottom: 1em;
} }
@ -1165,9 +1160,12 @@
padding-left: 15px; padding-left: 15px;
.detail { .detail {
font-size: .9rem; margin-top: 4px;
margin-top: 5px; margin-left: 14px;
margin-left: 8px;
.svg {
margin-right: 2px;
}
} }
.segments { .segments {
@ -2673,12 +2671,10 @@
a { a {
color: var(--color-text); color: var(--color-text);
text-decoration: none;
} }
a:hover { a:hover {
color: var(--color-primary); color: var(--color-primary);
text-decoration: none;
} }
} }

@ -91,6 +91,14 @@
border-radius: 3px; border-radius: 3px;
vertical-align: 2px !important; vertical-align: 2px !important;
} }
progress::-webkit-progress-value {
background-color: var(--color-secondary-dark-4);
}
progress::-moz-progress-bar {
background-color: var(--color-secondary-dark-4);
}
} }
.conflicting { .conflicting {

@ -56,34 +56,35 @@
--color-secondary-alpha-80: #454a57cc; --color-secondary-alpha-80: #454a57cc;
--color-secondary-alpha-90: #454a57e1; --color-secondary-alpha-90: #454a57e1;
/* colors */ /* colors */
--color-red: #7d3434; --color-red: #cc4848;
--color-orange: #cc580c; --color-orange: #cc580c;
--color-yellow: #cc9903; --color-yellow: #cc9903;
--color-olive: #91a313; --color-olive: #91a313;
--color-green: #87ab63; --color-green: #87ab63;
--color-teal: #00918a; --color-teal: #00918a;
--color-blue: #1a6aa6; --color-blue: #3a8ac6;
--color-violet: #502aa1; --color-violet: #906ae1;
--color-purple: #8229a0; --color-purple: #b259d0;
--color-pink: #c21e7b; --color-pink: #d22e8b;
--color-brown: #845232; --color-brown: #a47252;
--color-grey: #5e626a; --color-grey: #9ea2aa;
/* light variants */
--color-red-light: #984646;
--color-orange-light: #e6630d;
--color-yellow-light: #e5ac04;
--color-olive-light: #a3b816;
--color-green-light: #9fbc82;
--color-teal-light: #00a39c;
--color-blue-light: #1e78bb;
--color-violet-light: #5a30b5;
--color-purple-light: #932eb4;
--color-pink-light: #db228a;
--color-brown-light: #955d39;
--color-grey-light: #6a6e78;
/* other colors */
--color-black: #1e222e; --color-black: #1e222e;
--color-gold: #a1882b; /* light variants - produced via Sass scale-color(color, $lightness: -10%) */
--color-red-light: #c23636;
--color-orange-light: #b84f0b;
--color-yellow-light: #b88a03;
--color-olive-light: #839311;
--color-green-light: #7a9e55;
--color-teal-light: #00837c;
--color-blue-light: #347cb3;
--color-violet-light: #7b4edb;
--color-purple-light: #a742c9;
--color-pink-light: #be297d;
--color-brown-light: #94674a;
--color-grey-light: #8d919b;
--color-black-light: #1b1f29;
/* other colors */
--color-gold: #b1983b;
--color-white: #ffffff; --color-white: #ffffff;
--color-diff-removed-word-bg: #6f3333; --color-diff-removed-word-bg: #6f3333;
--color-diff-added-word-bg: #3c653c; --color-diff-added-word-bg: #3c653c;

Loading…
Cancel
Save