Skip to content

Commit

Permalink
#18987 - Logotype in header
Browse files Browse the repository at this point in the history
  • Loading branch information
rafeili committed Sep 23, 2024
1 parent 99216d0 commit 6d9389a
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 2 deletions.
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

0 comments on commit 6d9389a

Please sign in to comment.