Skip to content

Commit 52da922

Browse files
committed
fix
1 parent 0150095 commit 52da922

File tree

8 files changed

+43
-55
lines changed

8 files changed

+43
-55
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,7 @@ watchers = Watchers
10621062
stargazers = Stargazers
10631063
stars_remove_warning = This will remove all stars from this repository.
10641064
forks = Forks
1065+
stars = Stars
10651066
reactions_more = and %d more
10661067
unit_disabled = The site administrator has disabled this repository section.
10671068
language_other = Other

templates/base/head_navbar.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</a>
1212

1313
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
14-
<div class="ui secondary menu item navbar-mobile-right">
14+
<div class="ui secondary menu item navbar-mobile-right mobile-only">
1515
{{if .IsSigned}}
1616
<a id="mobile-notifications-icon" class="item tw-w-auto gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
1717
<div class="tw-relative">

templates/explore/repo_list.tmpl

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,23 @@
3030
{{end}}
3131
</span>
3232
</div>
33-
<div class="flex-item-trailing">
33+
<div class="flex-item-trailing muted-links">
3434
{{if .PrimaryLanguage}}
35-
<a class="muted" href="?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}{{if $.TabName}}&tab={{$.TabName}}{{end}}">
36-
<span class="flex-text-inline"><i class="color-icon gt-mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span>
35+
<a class="flex-text-inline" href="?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}{{if $.TabName}}&tab={{$.TabName}}{{end}}">
36+
<i class="color-icon gt-mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>
37+
{{.PrimaryLanguage.Language}}
3738
</a>
3839
{{end}}
3940
{{if not $.DisableStars}}
40-
<a class="text grey flex-text-inline" href="{{.Link}}/stars">{{svg "octicon-star" 16}}{{.NumStars}}</a>
41+
<a class="flex-text-inline" href="{{.Link}}/stars">
42+
<span aria-label="{{ctx.Locale.Tr "repo.stars"}}">{{svg "octicon-star" 16}}</span>
43+
<span {{if ge .NumStars 1000}}data-tooltip-content="{{.NumStars}}"{{end}}>{{CountFmt .NumStars}}</span>
44+
</a>
4145
{{end}}
42-
<a class="text grey flex-text-inline" href="{{.Link}}/forks">{{svg "octicon-git-branch" 16}}{{.NumForks}}</a>
46+
<a class="flex-text-inline" href="{{.Link}}/forks">
47+
<span aria-label="{{ctx.Locale.Tr "repo.forks"}}">{{svg "octicon-git-branch" 16}}</span>
48+
<span {{if ge .NumForks 1000}}data-tooltip-content="{{.NumForks}}"{{end}}>{{CountFmt .NumForks}}</span>
49+
</a>
4350
</div>
4451
</div>
4552
{{$description := .DescriptionHTML $.Context}}

templates/repo/header.tmpl

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,31 @@
33
<div class="ui container">
44
<div class="repo-header">
55
<div class="flex-item gt-ac">
6-
<div class="flex-item-leading">{{template "repo/icon" .}}</div>
6+
<div class="flex-item-leading">
7+
{{template "repo/icon" .}}
8+
</div>
79
<div class="flex-item-main">
810
<div class="flex-item-title gt-font-18">
9-
<a class="muted gt-font-normal" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/
10-
<a class="muted" href="{{$.RepoLink}}">{{.Name}}</a></div>
11+
<a class="muted gt-font-normal" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/<a class="muted" href="{{$.RepoLink}}">{{.Name}}</a>
12+
</div>
1113
</div>
1214
<div class="flex-item-trailing">
1315
{{if .IsArchived}}
14-
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
15-
<div class="repo-icon" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.archived"}}">{{svg "octicon-archive" 18}}</div>
16+
<span class="ui basic label not-mobile">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
17+
<div class="repo-icon mobile-only" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.archived"}}">{{svg "octicon-archive" 18}}</div>
1618
{{end}}
1719
{{if .IsPrivate}}
18-
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
19-
<div class="repo-icon" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.private"}}">{{svg "octicon-lock" 18}}</div>
20+
<span class="ui basic label not-mobile">{{ctx.Locale.Tr "repo.desc.private"}}</span>
21+
<div class="repo-icon mobile-only" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.private"}}">{{svg "octicon-lock" 18}}</div>
2022
{{else}}
2123
{{if .Owner.Visibility.IsPrivate}}
22-
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
23-
<div class="repo-icon" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.internal"}}">{{svg "octicon-shield-lock" 18}}</div>
24+
<span class="ui basic label not-mobile">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
25+
<div class="repo-icon mobile-only" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.internal"}}">{{svg "octicon-shield-lock" 18}}</div>
2426
{{end}}
2527
{{end}}
2628
{{if .IsTemplate}}
27-
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span>
28-
<div class="repo-icon" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.template"}}">{{svg "octicon-repo-template" 18}}</div>
29+
<span class="ui basic label not-mobile">{{ctx.Locale.Tr "repo.desc.template"}}</span>
30+
<div class="repo-icon mobile-only" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.template"}}">{{svg "octicon-repo-template" 18}}</div>
2931
{{end}}
3032
{{if eq .ObjectFormatName "sha256"}}
3133
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.sha256"}}</span>
@@ -76,18 +78,18 @@
7678
<a class="ui compact{{if $.ShowForkModal}} show-modal{{end}} small basic button"
7779
{{if not $.CanSignedUserFork}}
7880
{{if gt (len $.UserAndOrgForks) 1}}
79-
data-modal="#fork-repo-modal"
81+
href="#" data-modal="#fork-repo-modal"
8082
{{else if eq (len $.UserAndOrgForks) 1}}
8183
href="{{AppSubUrl}}/{{(index $.UserAndOrgForks 0).FullName}}"
8284
{{/*else is not required here, because the button shouldn't link to any site if you can't create a fork*/}}
8385
{{end}}
8486
{{else if not $.UserAndOrgForks}}
8587
href="{{$.RepoLink}}/fork"
8688
{{else}}
87-
data-modal="#fork-repo-modal"
89+
href="#" data-modal="#fork-repo-modal"
8890
{{end}}
8991
>
90-
{{svg "octicon-repo-forked"}}<span class="text">{{ctx.Locale.Tr "repo.fork"}}</span>
92+
{{svg "octicon-repo-forked"}}<span class="text not-mobile">{{ctx.Locale.Tr "repo.fork"}}</span>
9193
</a>
9294
<div class="ui small modal" id="fork-repo-modal">
9395
<div class="header">

web_src/css/base.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,13 +1266,6 @@ strong.attention-caution, svg.attention-caution {
12661266
text-align: center;
12671267
}
12681268

1269-
@media (max-width: 767.98px) {
1270-
/* double selector so it wins over .gt-df etc */
1271-
.not-mobile.not-mobile {
1272-
display: none !important;
1273-
}
1274-
}
1275-
12761269
overflow-menu {
12771270
margin-bottom: 15px !important;
12781271
border-bottom: 1px solid var(--color-secondary) !important;

web_src/css/helpers.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,14 @@ only use:
199199
* showElem/hideElem/toggleElem functions in "utils/dom.js"
200200
*/
201201
.gt-hidden.gt-hidden { display: none !important; }
202+
203+
@media (max-width: 767.98px) {
204+
.not-mobile.not-mobile {
205+
display: none !important;
206+
}
207+
}
208+
@media (min-width: 767.98px) {
209+
.mobile-only.mobile-only {
210+
display: none !important;
211+
}
212+
}

web_src/css/modules/navbar.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,6 @@
108108
}
109109
}
110110

111-
@media (min-width: 767.98px) {
112-
#navbar .navbar-mobile-right,
113-
#navbar .mobile-only {
114-
display: none;
115-
}
116-
}
117-
118111
#navbar a.item .notification_count {
119112
color: var(--color-nav-bg);
120113
padding: 0 3.75px;

web_src/css/repo/header.css

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.fork-flag {
1+
.header-wrapper .fork-flag {
22
margin-top: 0.5rem;
33
font-size: 12px;
44
}
@@ -15,22 +15,15 @@
1515
padding: 0;
1616
}
1717

18-
.repo-header .btn.interact-bg:hover {
19-
text-decoration: none;
20-
}
21-
2218
.repo-header .flex-item-main {
19+
flex: 0;
2320
flex-basis: unset;
2421
}
2522

2623
.repo-header .flex-item-trailing {
2724
flex-wrap: nowrap;
2825
}
2926

30-
.repo-header .flex-item-trailing .repo-icon {
31-
display: none;
32-
}
33-
3427
.repo-buttons {
3528
align-items: center;
3629
display: flex;
@@ -75,15 +68,3 @@
7568
padding-top: 12px;
7669
background-color: var(--color-header-wrapper);
7770
}
78-
79-
@media (max-width: 767.98px) {
80-
.repo-header .flex-item {
81-
flex-grow: 1;
82-
}
83-
.repo-header .flex-item-trailing .label {
84-
display: none;
85-
}
86-
.repo-header .flex-item-trailing .repo-icon {
87-
display: initial;
88-
}
89-
}

0 commit comments

Comments
 (0)