Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature/18987 - Swedish National Archives' logotype in UV4 #29

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ type PagingHeaderPanelOptions = HeaderPanelOptions & {
pageModeEnabled: boolean;
/** Determines if paging toggle is enabled */
pagingToggleEnabled: boolean;
/** Determines if logotype (in left upper corner of header) is set to visible */
showLogo: boolean
};

type PagingHeaderPanelContent = HeaderPanelContent & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@
"localeToggleEnabled": false,
"settingsButtonEnabled": true,
"helpEnabled": true,
"modeOptionsEnabled": true
"modeOptionsEnabled": true,
"showLogo": true
},
"content": {
"close": "$close",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class PagingHeaderPanel extends HeaderPanel<
Config["modules"]["pagingHeaderPanel"]
> {
$autoCompleteBox: JQuery;
$logoElement: JQuery;
$firstButton: JQuery;
$galleryButton: JQuery;
$imageModeLabel: JQuery;
Expand Down Expand Up @@ -77,6 +78,8 @@ export class PagingHeaderPanel extends HeaderPanel<
this.closeGallery();
}
);

this.$logoElement = $('.uv .headerPanel .options');

this.$prevOptions = $('<div class="prevOptions"></div>');
this.$centerOptions.append(this.$prevOptions);
Expand Down Expand Up @@ -420,6 +423,10 @@ export class PagingHeaderPanel extends HeaderPanel<
this.$centerOptions.addClass("modeOptionsDisabled");
}

if (this.options.showLogo === false) {
this.$logoElement.css('background-image', 'none');
}

// Search is shown as default
if (
this.options.imageSelectionBoxEnabled === true &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

color: @text-secondary-color;

.options {
background-image: url('../img/logo.svg');
background-repeat: no-repeat;
background-size: contain;
}

button.btn.imageBtn {
padding-left: 2px;
padding-right: 2px;
Expand Down
Loading