Skip to content

Commit d413187

Browse files
authored
Merge pull request #8 from sedici/print-certificate
#12370:Continuación.
2 parents 3706fa7 + 6f2b77c commit d413187

6 files changed

Lines changed: 70 additions & 29 deletions

File tree

src/app/item-page/sedici-item-certificate/sedici-item-certificate.html

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ <h4 class="title-alternative-content me-auto">
7272
[label]="'sedici.item.page.sedici.contributor.inscriber'">
7373
</ds-generic-item-page-field>
7474
</div>
75-
<sedici-context [object]="object"></sedici-context>
75+
<sedici-context class="sedici-context" [object]="object"></sedici-context>
7676
<div class="flex-container">
7777
<div class="item-identifiers">
7878
<ng-container *ngFor="let idValue of itemIdentifiers">
@@ -108,7 +108,7 @@ <h4 class="title-alternative-content me-auto">
108108
<div class="container">
109109
<div class="row">
110110
<div class="col-12">
111-
<app-expandable-metadata>
111+
<!-- <app-expandable-metadata> -->
112112
<div class="d-flex flex-wrap responsive-columns">
113113
<div class="metadata-column col-lg-4 col-md-12" [ngClass]="{'col-lg-12': !hasMetadata}">
114114
<ds-generic-item-page-field [item]="object"
@@ -160,35 +160,39 @@ <h4 class="title-alternative-content me-auto">
160160
[fields]="['dc.coverage.temporal']"
161161
[label]="'sedici.item.page.dc.coverage.temporal'">
162162
</ds-generic-item-page-field>
163-
<sedici-truncatable-generic-item-page-field [item]="object"
163+
<ds-generic-item-page-field [item]="object"
164+
[fields]="['dc.coverage.spatial']"
165+
[label]="'sedici.item.page.dc.coverage.spatial'">
166+
</ds-generic-item-page-field>
167+
<sedici-truncatable-generic-item-page-field [item]="object" class="no-print"
164168
[fields]="['dc.subject']"
165169
[label]="'sedici.item.page.dc.subject'"
166170
[minLines]="3">
167171
</sedici-truncatable-generic-item-page-field>
168-
<ds-generic-item-page-field [item]="object"
172+
<ds-generic-item-page-field [item]="object" class="no-print"
169173
[fields]="['sedici.subject.materias']"
170174
[separator]="'; '"
171175
[label]="'sedici.item.page.sedici.subject.materias'">
172176
</ds-generic-item-page-field>
173-
<ds-generic-item-page-field [item]="object"
177+
<ds-generic-item-page-field [item]="object" class="no-print"
174178
[fields]="['dc.publisher']"
175179
[label]="subtype === ('Discurso' || 'Entrevista') ? ('sedici.item.page.dc.publisher.production') : ('sedici.item.page.dc.publisher.editorial')">
176180
</ds-generic-item-page-field>
177-
<ds-generic-item-page-field [item]="object"
181+
<ds-generic-item-page-field class="no-print" [item]="object"
178182
[fields]="['dc.relation.ispartof']"
179183
[label]="'sedici.item.page.dc.relation.ispartof'">
180184
</ds-generic-item-page-field>
181-
<ds-item-page-uri-field [item]="object"
185+
<ds-item-page-uri-field class="no-print" [item]="object"
182186
[fields]="['sedici.identifier.uri']"
183187
[label]="'sedici.item.page.sedici.identifier.uri'">
184188
</ds-item-page-uri-field>
185-
<ds-item-page-uri-field [item]="object"
189+
<ds-item-page-uri-field class="no-print"[item]="object"
186190
[fields]="['sedici.relation.isRelatedWith']"
187191
[label]="'sedici.item.page.sedici.relation.isRelatedWith'">
188192
</ds-item-page-uri-field>
189193
</div>
190194
<div class="metadata-column col-lg-8 col-md-12" *ngIf="hasMetadata">
191-
<ds-generic-item-page-field [item]="object"
195+
<ds-generic-item-page-field class="no-print" [item]="object"
192196
[fields]="['sedici.description.note']"
193197
[separator]="'<br/>'"
194198
[label]="'sedici.item.page.sedici.description.note'">
@@ -205,7 +209,7 @@ <h4 class="title-alternative-content me-auto">
205209
</ds-generic-item-page-field>
206210
</div>
207211
</div>
208-
</app-expandable-metadata>
212+
<!-- </app-expandable-metadata> -->
209213
</div>
210214
</div>
211215
<p class="texto-handler">Puede acceder a la obra a través del siguiente <a [href]="itemIdentifiers[0].url">enlace</a> o a través del qr a continuación:</p>

src/app/item-page/sedici-item-certificate/sedici-item-certificate.scss

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,21 @@
55

66
// Ajustes específicos para impresión
77
body, html {
8-
// font-size: 1.2rem !important; // Reducir tamaño base
98
font-family: Verdana, Geneva, Tahoma, sans-serif !important;
10-
font-size: 12px !important;
9+
// font-size: 12px !important;
1110
line-height: 1.4 !important;
1211
}
1312

1413
.container {
15-
font-size: 1rem !important; // Más pequeño que .75rem
14+
font-size: 0.75em !important; // Más pequeño que .75rem
1615
margin: 0 !important;
1716
max-width: 100% !important;
17+
18+
.texto-imprimir{
19+
margin-top: 0em !important;
20+
margin-bottom: 0.4em;
21+
font-size: 1.1em;
22+
}
1823
}
1924

2025
.jumbotron {
@@ -46,7 +51,7 @@
4651

4752

4853
.title-content {
49-
font-size: 1.4em !important; // Reducido de 1.75em
54+
font-size: 1.2em !important; // Reducido de 1.75em
5055
line-height: 1.2 !important;
5156
//margin-bottom: 0.5rem !important;
5257
font-weight: bold !important;
@@ -58,11 +63,10 @@
5863
line-height: 1.2 !important;
5964
}
6065

61-
.generic-item-page-field {
62-
font-size: 1em !important; // Reducido de 1.25em
63-
}
6466

6567
.author-container {
68+
font-size: 1.25em !important; // Reducido de 1.2em
69+
6670
::ng-deep span, ::ng-deep a {
6771
font-size: 0.9em !important; // Reducido de 1.33333em
6872
line-height: 1.3 !important;
@@ -75,7 +79,7 @@
7579
margin-bottom: 0rem !important; // Espacio entre campos
7680
margin-top: 0rem !important;
7781
padding: 0rem !important;
78-
font-size: 0.9em !important; // Reducido de 1.2em
82+
font-size: 0.8em !important; // Esto afecta a los autores
7983
}
8084

8185
::ng-deep h6 {
@@ -90,37 +94,58 @@
9094

9195
.metadata-column{
9296
padding-left: 0 !important;
93-
font-size: 0.5em !important; // Reducido de 1.25em
97+
font-size: 0.9em !important; // Reducido de 1.25em
9498
}
9599

100+
// Esto afecta a los campos del item abajo del handle
96101
.metadata-column {
97-
::ng-deep ds-generic-item-page-field
102+
::ng-deep ds-generic-item-page-field,
98103
::ng-deep sedici-truncatable-generic-item-page-field,
99104
::ng-deep ds-item-page-uri-field {
100105

101106
h6 {
102-
font-size: 0.9em !important; // Labels más pequeños
107+
font-size: 0.7rem !important;
103108
font-weight: bold !important;
104109
}
105110

106111
span, a {
107-
font-size: 0.9em !important; // Contenido de metadatos más pequeño
112+
font-size: 0.7rem !important; // Contenido de metadatos más pequeño
108113
line-height: 1.3 !important;
109114
font-weight: normal !important;
110115
}
116+
117+
.no-print, .no-print * {
118+
display: none !important;
119+
}
111120
}
112121

113122
}
123+
124+
.sedici-context{
125+
display: none !important;
126+
}
114127

115128
.item-identifiers {
116129
margin: 0.25rem 0 !important;
117-
130+
font-size: 0.4rem !important; // Reducido de 1em
131+
118132
::ng-deep .badge {
119-
font-size: 0.85em !important; // Badges más pequeños
133+
// font-size: 0.85em !important; // Badges más pequeños
120134
font-weight: normal !important;
121135
}
122136
}
123137

138+
.contenedor-qr{
139+
text-align: center !important;
140+
141+
142+
qrcode {
143+
width: 75% !important; // Reduce QR size to 75% of original
144+
height: auto !important;
145+
transform: scale(0.8); // Alternative scaling approach
146+
}
147+
}
148+
124149
.texto-qr{
125150
font-size: 0.85rem !important; // Reducido de 1em
126151
}
@@ -237,7 +262,6 @@
237262
}
238263
}
239264

240-
sedici-context,
241265
.author-container {
242266
::ng-deep span, ::ng-deep a {
243267
font-size: 1.2em;
@@ -280,16 +304,18 @@ sedici-context,
280304
.metadata-column {
281305
padding: 0 .5rem ;
282306

307+
// Esto afecta a los campos del item abajo del handle
283308
::ng-deep ds-generic-item-page-field,
284309
::ng-deep sedici-truncatable-generic-item-page-field,
285310
::ng-deep ds-item-page-uri-field {
311+
286312
h6 {
287313
font-size: 1.2em;
288314
font-weight: var(--font-weight-bold);
289315
}
290316

291317
span, a {
292-
font-size: 1.25em;
318+
font-size: 1.2em;
293319
font-weight: var(--font-weight-regular);
294320
}
295321
}
@@ -366,4 +392,4 @@ app-expandable-metadata {
366392
// Modifico todos los botones que están incluidos en el componente
367393
:host ::ng-deep .btn:focus {
368394
outline-style: none !important;
369-
}
395+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
span {
22
line-height: 1.5;
3+
font-size: 1.2em;
4+
}
5+
6+
@media print{
7+
span {
8+
font-size: 1em;
9+
}
310
}

src/themes/custom/app/item-page/simple/item-types/untyped-item/sedici-truncatable-generic-item-page-field.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[id]="label"
55
[minLines]="minLines"
66
[showCollapseButton]="false">
7-
<h6 class="label">{{ label | translate }}</h6>
7+
<h6>{{ label | translate }}</h6>
88
<span [innerHTML]="metadataTextValue"></span>
99
</sedici-truncatable-part>
1010
}

src/themes/custom/app/item-page/simple/item-types/untyped-item/sedici-truncatable-generic-item-page-field.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.label {
1+
h6 {
22
display: inline;
33
margin-right: 0.5em;
44
font-weight: bold;

src/themes/custom/app/shared/truncatable/truncatable-part/sedici-truncatable-part.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
.clamp-default-#{$i} {
1515
margin-bottom: .5rem;
1616

17+
@media print{
18+
margin-bottom: 0;
19+
}
20+
1721
.content {
1822
&:after {
1923
background: linear-gradient(to right, rgba(255, 255, 255, 0), #f6f6f6 70%);

0 commit comments

Comments
 (0)