Skip to content

Commit 3260e15

Browse files
authored
Dashboard search tweaks (#14008)
- Fix color of inactive pagination parts caused by overreaching CSS selector. - Slightly reduce horizontal padding on list items - Add spacing around pagination and move it outside of <ul>
1 parent 8af9df0 commit 3260e15

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

templates/user/dashboard/repolist.tmpl

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
<div v-if="repos.length" class="ui attached table segment rounded-bottom">
120120
<ul class="repo-owner-name-list">
121121
<li v-for="repo in repos" :class="{'private': repo.private || repo.internal}">
122-
<a class="df ac sb" :href="suburl + '/' + repo.full_name">
122+
<a class="repo-list-link df ac sb" :href="suburl + '/' + repo.full_name">
123123
<div class="f1">
124124
<component v-bind:is="repoIcon(repo)" size="16"></component>
125125
<strong class="text truncate item-name">${repo.full_name}</strong>
@@ -129,34 +129,32 @@
129129
</div>
130130
<div class="text light grey df ac">
131131
${repo.stars_count}
132-
{{svg "octicon-star" 16 "rear ml-2"}}
132+
{{svg "octicon-star" 16 "ml-2"}}
133133
</div>
134134
</a>
135135
</li>
136-
<li v-if="showMoreReposLink">
137-
<div class="center">
138-
<div class="ui borderless pagination menu narrow">
139-
<a class="item navigation" :class="{'disabled': page === 1}"
140-
@click="changePage(1)" title="{{$.i18n.Tr "admin.first_page"}}">
141-
{{svg "gitea-double-chevron-left" 16 "mr-2"}}
142-
</a>
143-
<a class="item navigation" :class="{'disabled': page === 1}"
144-
@click="changePage(page - 1)" title="{{$.i18n.Tr "repo.issues.previous"}}">
145-
{{svg "octicon-chevron-left" 16 "mr-2"}}
146-
</a>
147-
<a class="active item">${page}</a>
148-
<a class="item navigation" :class="{'disabled': page === finalPage}"
149-
@click="changePage(page + 1)" title="{{$.i18n.Tr "repo.issues.next"}}">
150-
{{svg "octicon-chevron-right" 16 "ml-2"}}
151-
</a>
152-
<a class="item navigation" :class="{'disabled': page === finalPage}"
153-
@click="changePage(finalPage)" title="{{$.i18n.Tr "admin.last_page"}}">
154-
{{svg "gitea-double-chevron-right" 16 "ml-2"}}
155-
</a>
156-
</div>
157-
</div>
158-
</li>
159136
</ul>
137+
<div v-if="showMoreReposLink" class="center py-3 border-secondary-top">
138+
<div class="ui borderless pagination menu narrow">
139+
<a class="item navigation py-2" :class="{'disabled': page === 1}"
140+
@click="changePage(1)" title="{{$.i18n.Tr "admin.first_page"}}">
141+
{{svg "gitea-double-chevron-left" 16 "mr-2"}}
142+
</a>
143+
<a class="item navigation py-2" :class="{'disabled': page === 1}"
144+
@click="changePage(page - 1)" title="{{$.i18n.Tr "repo.issues.previous"}}">
145+
{{svg "octicon-chevron-left" 16 "mr-2"}}
146+
</a>
147+
<a class="active item py-2">${page}</a>
148+
<a class="item navigation" :class="{'disabled': page === finalPage}"
149+
@click="changePage(page + 1)" title="{{$.i18n.Tr "repo.issues.next"}}">
150+
{{svg "octicon-chevron-right" 16 "ml-2"}}
151+
</a>
152+
<a class="item navigation py-2" :class="{'disabled': page === finalPage}"
153+
@click="changePage(finalPage)" title="{{$.i18n.Tr "admin.last_page"}}">
154+
{{svg "gitea-double-chevron-right" 16 "ml-2"}}
155+
</a>
156+
</div>
157+
</div>
160158
</div>
161159
</div>
162160
<div v-if="!isOrganization" v-show="tab === 'organizations'" class="ui tab active list dashboard-orgs">
@@ -173,14 +171,14 @@
173171
<div v-if="organizations.length" class="ui attached table segment rounded-bottom">
174172
<ul class="repo-owner-name-list">
175173
<li v-for="org in organizations">
176-
<a class="df ac sb" :href="suburl + '/' + org.name">
174+
<a class="repo-list-link df ac sb" :href="suburl + '/' + org.name">
177175
<div class="f1">
178176
{{svg "octicon-organization" 16 "mr-2"}}
179177
<strong class="text truncate item-name">${org.name}</strong>
180178
</div>
181179
<div class="text light grey df ac">
182180
${org.num_repos}
183-
{{svg "octicon-repo" 16 "rear ml-2 mt-1"}}
181+
{{svg "octicon-repo" 16 "ml-2 mt-1"}}
184182
</div>
185183
</a>
186184
</li>

web_src/less/_dashboard.less

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,12 @@
156156
background-color: #fcf8e9;
157157
}
158158

159-
a {
160-
padding: 6px 1.2em;
159+
.repo-list-link {
160+
padding: 6px 1em;
161161
display: block;
162162

163163
.svg {
164-
color: var(--color-secondary-dark-6);
165-
166-
&.rear {
167-
font-size: 15px;
168-
}
164+
color: var(--color-text-light-2);
169165
}
170166

171167
.star-num {

web_src/less/helpers.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
.rounded-left { border-radius: var(--border-radius) 0 0 var(--border-radius) !important; }
3333
.rounded-right { border-radius: 0 var(--border-radius) var(--border-radius) 0 !important; }
3434

35+
.border-secondary { border: 1px solid var(--color-secondary) !important; }
36+
.border-secondary-top { border-top: 1px solid var(--color-secondary) !important; }
37+
.border-secondary-bottom { border-bottom: 1px solid var(--color-secondary) !important; }
38+
.border-secondary-left { border-left: 1px solid var(--color-secondary) !important; }
39+
.border-secondary-right { border-right: 1px solid var(--color-secondary) !important; }
40+
3541
.no-transition { transition: none !important; }
3642

3743
.bg-red { background: var(--color-red) !important; }

0 commit comments

Comments
 (0)