Skip to content

Commit 89b8243

Browse files
authored
BXC-4807/4757/4799 - Thumbnail size, linking, and pagination. Admin spacing (#1856)
* Add asLink attribute for thumbnails to allow thumbnails to not be links, set this attribute for full record thumbnails * Change thumbnail sizes from 64px and 128px to 160px and 250px. Thumbnail component now defaults to medium size, where both medium and small use the 'small' thumbnail image size. Only the gallery view uses large at the moment, whereas before everything used large * Convert pagination to bulma. Always shows 7 pages now, if there are at least 7 pages * Admin ui spacing fixes. Also cleaned up some dead code * Update pagination colors to meet accessability requirements * Review updates
1 parent 50e9f23 commit 89b8243

File tree

22 files changed

+317
-288
lines changed

22 files changed

+317
-288
lines changed

static/css/admin/admin_forms.css

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
}
122122

123123
.edit_form p {
124-
padding-top: 7px;
124+
margin: 10px 0;
125125
text-align: left;
126126
}
127127

@@ -382,12 +382,6 @@
382382
color: #555;
383383
}
384384

385-
#run_enhancements_form #run_enhancements_force {
386-
margin-left: 0;
387-
margin-right: 0.5em;
388-
}
389-
390-
391385

392386
.file_browse_dialog {
393387
text-align: left;

static/css/admin/cdradmin.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ body {
1111
width: inherit;
1212
}
1313

14+
.contentarea {
15+
margin: 20px;
16+
}
17+
1418
.contentarea.nobottom {
1519
margin-bottom: 0;
1620
}
@@ -26,6 +30,10 @@ h1 {
2630
padding: 0 0 1em 0;
2731
}
2832

33+
p {
34+
line-height: 1.3rem;
35+
}
36+
2937
.fullwidth {
3038
width: 100%;
3139
}

static/css/cdrui_styles.css

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,24 @@
2929
background-position: top center;
3030
background-repeat: no-repeat;
3131
background-size: contain;
32-
width: 64px;
33-
height: 64px;
32+
width: 100px;
33+
height: 100px;
3434
margin: 0 auto;
3535
}
3636

3737
.thumbnail.thumbnail-size-medium .thumbnail-viewer {
38-
width: 112px;
39-
height: 112px;
38+
width: 160px;
39+
height: 160px;
40+
41+
@media screen and (max-width: 768px) {
42+
width: 125px;
43+
height: 125px;
44+
}
4045
}
4146

4247
.thumbnail.thumbnail-size-large .thumbnail-viewer {
43-
width: 128px;
44-
height: 128px;
48+
width: 250px;
49+
height: 250px;
4550
margin-top: .25rem;
4651
}
4752

@@ -75,15 +80,15 @@
7580
}
7681

7782
.thumbnail .placeholder {
78-
font-size: 64px;
83+
font-size: 100px;
7984
}
8085

8186
.thumbnail.thumbnail-size-medium .placeholder {
82-
font-size: 112px;
87+
font-size: 160px;
8388
}
8489

8590
.thumbnail.thumbnail-size-large .placeholder {
86-
font-size: 128px;
91+
font-size: 250px;
8792
}
8893

8994
.thumbnail-badge .background {

static/css/sass/cdr_ui_styles.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ p.spacing {
271271
}
272272

273273
img.data-thumb {
274-
max-width: 60px;
274+
max-width: 100px;
275275
}
276276

277277
.child-records {
@@ -455,6 +455,11 @@ table.dataTable {
455455
top: 0;
456456
}
457457
}
458+
459+
img + .thumbnail-badge {
460+
margin-left: 85px !important;
461+
margin-top: -20px !important;
462+
}
458463
}
459464

460465
/* MODs display for work and file pages, plus modalMetadata.vue component */
@@ -492,7 +497,7 @@ table.dataTable {
492497
.relateditem {
493498
.thumbnail {
494499
.thumbnail-badge {
495-
right: 40px;
500+
right: 10px;
496501
}
497502

498503
.thumbnail-viewer {

static/js/admin/vue-cdr-admin/src/components/chompb/preIngest.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,18 @@ export default {
140140
#chompb-preingest-ui {
141141
width: 96%;
142142
margin: 25px auto;
143-
}
144143
145-
p {
146-
text-align: center;
147-
margin-top: 50px;
148-
}
144+
p {
145+
text-align: center;
146+
margin-top: 50px;
147+
}
149148
150-
#copy-msg {
151-
padding: 15px;
152-
position: absolute;
153-
right: 25px;
154-
top: 0;
155-
width: auto;
149+
#copy-msg {
150+
padding: 15px;
151+
position: absolute;
152+
right: 25px;
153+
top: 0;
154+
width: auto;
155+
}
156156
}
157157
</style>

static/js/vue-cdr-access/src/components/full_record/adminUnit.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="full_record pb-4">
33
<div class="columns is-6-desktop browse-top container is-mobile is-1-mobile">
44
<div class="column is-narrow">
5-
<thumbnail :thumbnail-data="recordData"></thumbnail>
5+
<thumbnail :thumbnail-data="recordData" :as-link="false"></thumbnail>
66
</div>
77
<div class="column content is-medium">
88
<h2 :class="isDeleted" class="title is-2 is-text-unc-blue">

static/js/vue-cdr-access/src/components/full_record/aggregateRecord.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="full_record">
33
<div class="columns is-6-desktop browse-top container is-mobile is-1-mobile">
44
<div class="column is-narrow-desktop is-5-mobile" :class="isDeleted">
5-
<thumbnail :thumbnail-data="recordData"></thumbnail>
5+
<thumbnail :thumbnail-data="recordData" :as-link="false"></thumbnail>
66
<div class="download-jump mt-5 has-text-centered">
77
<a class="button action is-primary is-responsive" :href="filesLink">
88
<span class="icon"><i class="fa fa-download" aria-hidden="true"></i></span><span>Skip to Download</span>

static/js/vue-cdr-access/src/components/full_record/collectionRecord.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="full_record">
33
<div class="columns is-6-desktop browse-top container is-mobile is-1-mobile">
44
<div class="column is-narrow-desktop is-5-mobile" :class="{restrictedContent: 'is-8'}">
5-
<thumbnail :thumbnail-data="recordData"></thumbnail>
5+
<thumbnail :thumbnail-data="recordData" :as-link="false"></thumbnail>
66
</div>
77
<div class="column content is-7-mobile pb-4">
88
<h2 :class="isDeleted" class="title is-3 is-text-unc-blue">

static/js/vue-cdr-access/src/components/full_record/fileList.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ export default {
149149
150150
if ('thumbnail_url' in row && this.hasPermission(row,'viewAccessCopies')) {
151151
const thumbnail_title = this.$t('full_record.thumbnail_title', { title: row.title })
152-
img = `<img class="data-thumb" loading="lazy" src="${row.thumbnail_url}"` +
152+
const thumbnail_url = row.thumbnail_url.replace('/large', '/small');;
153+
img = `<img class="data-thumb" loading="lazy" src="${thumbnail_url}"` +
153154
` alt="${thumbnail_title}">`;
154155
} else {
155156
const thumbnail_default = this.$t('full_record.thumbnail_default');

static/js/vue-cdr-access/src/components/full_record/fileRecord.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="full_record">
33
<div class="columns is-6-desktop browse-top container is-mobile is-1-mobile">
44
<div class="column is-narrow" :class="isDeleted">
5-
<thumbnail :thumbnail-data="recordData"></thumbnail>
5+
<thumbnail :thumbnail-data="recordData" :as-link="false"></thumbnail>
66
</div>
77
<div class="column content">
88
<h2 :class="isDeleted" class="title is-3 is-text-unc-blue">

0 commit comments

Comments
 (0)