Skip to content

Commit 18974e0

Browse files
committed
More tweaks for alignment, scrolling and gradient
1 parent 8dd1405 commit 18974e0

File tree

3 files changed

+83
-38
lines changed

3 files changed

+83
-38
lines changed

templates/repo/header.tmpl

+9-7
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
{{else}}
1313
{{template "repo/icon" .}}
1414
{{end}}
15-
<div class="df ac fw">
15+
<div class="df fw">
1616
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
1717
<div class="mx-2">/</div>
1818
</div>
19-
<div class="df ac fw">
19+
<div class="di fw">
2020
<a href="{{$.RepoLink}}">{{.Name}}</a>
21-
{{if $.PageIsSettings}}
22-
<div class="mx-2">/</div><span>{{$.i18n.Tr "repo.settings"}}</span>
23-
{{else}}
24-
<div class="labels df ac fw">
21+
{{- if $.PageIsSettings -}}
22+
<div class="di mx-2">/</div><span class="mr-2">{{$.i18n.Tr "repo.settings"}}</span>
23+
{{- else -}}
24+
<div class="labels dif ac fw vm">
2525
{{if .IsTemplate}}
2626
{{if .IsPrivate}}
2727
<span class="ui basic label">{{$.i18n.Tr "repo.desc.private_template"}}</span>
@@ -115,7 +115,7 @@
115115

116116
{{if .Permission.CanRead $.UnitTypeExternalTracker}}
117117
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer">
118-
{{svg "octicon-link-external"}} {{.i18n.Tr "repo.issues"}} </span>
118+
{{svg "octicon-link-external"}} {{.i18n.Tr "repo.issues"}}
119119
</a>
120120
{{end}}
121121

@@ -159,6 +159,8 @@
159159
{{end}}
160160

161161
{{template "custom/extra_tabs" .}}
162+
163+
<div class="spacer"></div>
162164
</div>
163165
{{end}}
164166
</div>

web_src/less/_base.less

+66-25
Original file line numberDiff line numberDiff line change
@@ -1260,20 +1260,8 @@ footer {
12601260
}
12611261
}
12621262

1263-
.ui.menu.new-menu::after {
1264-
position: absolute;
1265-
display: block;
1266-
background: linear-gradient(to right, transparent, var(--color-navbar) 100%);
1267-
content: '';
1268-
right: 0;
1269-
height: 39px;
1270-
width: 60px;
1271-
visibility: visible;
1272-
pointer-events: none;
1273-
}
1274-
12751263
.ui.menu.new-menu.shadow-body::after {
1276-
background: linear-gradient(to right, transparent, var(--color-body) 100%);
1264+
background: linear-gradient(to right, #ffffff00, var(--color-body) 100%);
12771265
}
12781266

12791267
.ui.menu.new-menu .item {
@@ -1290,21 +1278,73 @@ footer {
12901278
padding-right: 30px !important;
12911279
}
12921280

1293-
.ui.menu.new-menu::-webkit-scrollbar {
1294-
height: 6px;
1295-
display: none;
1296-
}
1281+
.ui.tabs.container .ui.menu {
1282+
margin: auto -1em;
1283+
padding-left: 1em;
1284+
overflow-x: scroll;
1285+
overflow-y: hidden;
12971286

1298-
.ui.menu.new-menu::-webkit-scrollbar-track {
1299-
background: none !important;
1300-
}
1287+
.spacer:last-child {
1288+
min-width: 1em;
1289+
}
13011290

1302-
.ui.menu.new-menu::-webkit-scrollbar-thumb {
1303-
box-shadow: none !important;
1291+
&::before,
1292+
&::after {
1293+
height: 40px !important;
1294+
margin-top: 1px;
1295+
border-bottom: 1px solid #d8d8d8;
1296+
}
1297+
1298+
&::before {
1299+
left: auto !important;
1300+
margin-left: -1em;
1301+
}
1302+
1303+
&::after {
1304+
position: sticky !important;
1305+
}
13041306
}
13051307

1306-
.ui.menu.new-menu:hover::-webkit-scrollbar {
1307-
display: block;
1308+
.ui.tabs.container .ui.menu,
1309+
.ui.menu.new-menu {
1310+
&::before,
1311+
&::after {
1312+
content: "";
1313+
position: absolute;
1314+
display: block;
1315+
min-width: 1em;
1316+
height: 38px;
1317+
visibility: visible;
1318+
pointer-events: none;
1319+
}
1320+
1321+
&::before {
1322+
background: linear-gradient(to left, #ffffff33, var(--color-navbar) 62.5%);
1323+
left: 0;
1324+
z-index: 1;
1325+
}
1326+
1327+
&::after {
1328+
background: linear-gradient(to right, #ffffff33, var(--color-navbar) 62.5%);
1329+
right: 0;
1330+
}
1331+
1332+
&::-webkit-scrollbar {
1333+
height: 6px;
1334+
display: none;
1335+
}
1336+
1337+
&::-webkit-scrollbar-track {
1338+
background: none !important;
1339+
}
1340+
1341+
&::-webkit-scrollbar-thumb {
1342+
box-shadow: none !important;
1343+
}
1344+
1345+
&:hover::-webkit-scrollbar {
1346+
display: block;
1347+
}
13081348
}
13091349

13101350
[v-cloak] {
@@ -1326,7 +1366,7 @@ footer {
13261366
display: flex;
13271367
align-items: center;
13281368
flex: 1;
1329-
word-break: break-all;
1369+
word-break: break-word;
13301370
color: var(--color-text-light);
13311371

13321372
.avatar {
@@ -1335,6 +1375,7 @@ footer {
13351375
}
13361376

13371377
.labels {
1378+
margin-top: -.25rem;
13381379
margin-left: .5rem;
13391380

13401381
> * + * {

web_src/less/_repository.less

+8-6
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
.tabs {
3232
.navbar {
3333
justify-content: initial;
34-
overflow-x: scroll;
35-
overflow-y: hidden;
3634
}
3735
}
3836

@@ -44,10 +42,10 @@
4442
margin-left: 7px;
4543
padding: 3px 5px;
4644
}
45+
}
4746

48-
.active.item {
49-
margin-bottom: 0 !important;
50-
}
47+
.menu.new-menu.navbar {
48+
margin-top: -8px !important;
5149
}
5250

5351
.owner.dropdown {
@@ -2849,14 +2847,18 @@ tbody.commit-list {
28492847
align-items: center;
28502848
justify-content: space-between;
28512849
word-break: break-word;
2852-
line-height: 32px;
2850+
line-height: 40px;
28532851
margin: -7px 0;
28542852

28552853
> * {
28562854
margin: 7px 0;
28572855
}
28582856
}
28592857

2858+
.repo-icon .svg {
2859+
margin-top: -4px;
2860+
}
2861+
28602862
.repo-buttons {
28612863
display: flex;
28622864
align-items: center;

0 commit comments

Comments
 (0)