mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
style fixes for viewer (#2858)
* style fixes for viewer * use theme colors * initial theme support for PDF viewer
This commit is contained in:
committed by
Eugenio Romano
parent
a401ebd35d
commit
0ea7259988
@@ -19,6 +19,7 @@
|
|||||||
@import '../viewer/components/viewer.component';
|
@import '../viewer/components/viewer.component';
|
||||||
@import '../form/components/form.component';
|
@import '../form/components/form.component';
|
||||||
@import '../sidebar/sidebar-action-menu.component';
|
@import '../sidebar/sidebar-action-menu.component';
|
||||||
|
@import '../viewer/components/pdfViewer.component';
|
||||||
|
|
||||||
@mixin adf-core-theme($theme) {
|
@mixin adf-core-theme($theme) {
|
||||||
@include adf-colors-theme($theme);
|
@include adf-colors-theme($theme);
|
||||||
@@ -38,6 +39,7 @@
|
|||||||
@include adf-toolbar-theme($theme);
|
@include adf-toolbar-theme($theme);
|
||||||
@include adf-userinfo-theme($theme);
|
@include adf-userinfo-theme($theme);
|
||||||
@include adf-viewer-theme($theme);
|
@include adf-viewer-theme($theme);
|
||||||
|
@include adf-pdf-viewer-theme($theme);
|
||||||
@include adf-form-component-theme($theme);
|
@include adf-form-component-theme($theme);
|
||||||
@include adf-sidebar-action-menu-theme($theme);
|
@include adf-sidebar-action-menu-theme($theme);
|
||||||
}
|
}
|
||||||
|
@@ -34,15 +34,14 @@
|
|||||||
<mat-icon>keyboard_arrow_down</mat-icon>
|
<mat-icon>keyboard_arrow_down</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div>
|
<div class="adf-pdf-viewer__toolbar-page-selector">
|
||||||
{{ 'ADF_VIEWER.PAGE_LABEL.SHOWING' | translate }}
|
<span>{{ 'ADF_VIEWER.PAGE_LABEL.SHOWING' | translate }}</span>
|
||||||
<input #page
|
<input #page
|
||||||
class="adf-pdf-viewer__toolbar-page-selector"
|
|
||||||
type="text"
|
type="text"
|
||||||
pattern="-?[0-9]*(\.[0-9]+)?"
|
pattern="-?[0-9]*(\.[0-9]+)?"
|
||||||
value="{{ displayPage }}"
|
value="{{ displayPage }}"
|
||||||
(keyup.enter)="inputPage(page.value)">
|
(keyup.enter)="inputPage(page.value)">
|
||||||
{{ 'ADF_VIEWER.PAGE_LABEL.OF' | translate }} {{ totalPages }}
|
<span>{{ 'ADF_VIEWER.PAGE_LABEL.OF' | translate }} {{ totalPages }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<adf-toolbar-divider></adf-toolbar-divider>
|
<adf-toolbar-divider></adf-toolbar-divider>
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
@mixin adf-pdf-viewer-theme($theme) {
|
||||||
.adf-pdf-viewer {
|
.adf-pdf-viewer {
|
||||||
.loader-container {
|
.loader-container {
|
||||||
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
|
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
|
||||||
@@ -19,20 +20,34 @@
|
|||||||
|
|
||||||
&__toolbar {
|
&__toolbar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 5px;
|
||||||
|
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
|
||||||
|
.adf-toolbar .mat-toolbar {
|
||||||
|
max-height: 48px;
|
||||||
|
background-color: mat-color($primary, default-contrast, 1);
|
||||||
|
border-width: 0;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.24), 0 0 2px 0 rgba(0, 0, 0, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
&-page-selector {
|
&-page-selector {
|
||||||
font-size: 16px;
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
& > input {
|
||||||
|
font-size: 14px;
|
||||||
padding: 4px 0;
|
padding: 4px 0;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
width: 33px;
|
width: 33px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
height: 20px;
|
|
||||||
outline-width: 1px;
|
outline-width: 1px;
|
||||||
outline-color: gray;
|
outline-color: gray;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -165,6 +165,11 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.removePageBorders {
|
&.removePageBorders {
|
||||||
@@ -202,10 +207,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hidden, [hidden] {
|
.hidden, [hidden] {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
|
@@ -3,5 +3,4 @@
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
margin-bottom: 42px;
|
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
<mat-icon>arrow_back</mat-icon>
|
<mat-icon>arrow_back</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<img class="adf-viewer__mimeicon" [src]="mimeType | adfMimeTypeIcon">
|
<img class="adf-viewer__mimeicon" [src]="mimeType | adfMimeTypeIcon">
|
||||||
<span id="adf-viewer-display-name">{{ displayName }}</span>
|
<span class="adf-viewer__display-name" id="adf-viewer-display-name">{{ displayName }}</span>
|
||||||
</adf-toolbar-title>
|
</adf-toolbar-title>
|
||||||
|
|
||||||
<ng-container *ngIf="mnuOpenWith">
|
<ng-container *ngIf="mnuOpenWith">
|
||||||
|
@@ -13,6 +13,24 @@
|
|||||||
|
|
||||||
&__mimeicon {
|
&__mimeicon {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
height: 18px;
|
||||||
|
width: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-toolbar {
|
||||||
|
.mat-toolbar {
|
||||||
|
background-color: mat-color($primary, default-contrast)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__display-name {
|
||||||
|
font-size: 16px;
|
||||||
|
opacity: 0.87;
|
||||||
|
line-height: 1.5;
|
||||||
|
letter-spacing: -0.4px;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-stretch: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-container {
|
&-container {
|
||||||
@@ -22,6 +40,7 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
background-color: mat-color($background, background);
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
Reference in New Issue
Block a user