Skip to content

Commit 9665c70

Browse files
committed
navbar - added data-title mode
attribute data-title="" on navbar element removes the title if not blank, its value replaces the default site title text
1 parent 59a357c commit 9665c70

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

src/css/bundle.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3720,6 +3720,7 @@ blockquote {
37203720
.kroma-navbar .nav-logo img {
37213721
width: auto;
37223722
height: 100%;
3723+
min-width: min-content;
37233724
}
37243725

37253726
.kroma-navbar .nav-logo {

src/css/components/navbar.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.kroma-navbar .nav-logo img {
66
width: auto;
77
height: 100%;
8+
min-width: min-content;
89
}
910

1011
.kroma-navbar .nav-logo {

src/js/bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ export class KromaNavbar {
12741274
this.hasLogo = (this.nav.querySelector('img') && this.nav.querySelector('img').src) ? true : false;
12751275
this.logoPath = this.hasLogo ? this.nav.querySelector('img').src : undefined;
12761276
this.siteTitle = document.querySelector('head title');
1277-
this.siteTitle = siteTitle ?? (this.siteTitle.innerText ?? '');
1277+
this.siteTitle = ( this.nav.dataset.title ?? title ) ?? (this.siteTitle.innerText ?? '');
12781278

12791279

12801280
//get menu items

src/js/components/navbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class KromaNavbar {
3434
this.hasLogo = (this.nav.querySelector('img') && this.nav.querySelector('img').src) ? true : false;
3535
this.logoPath = this.hasLogo ? this.nav.querySelector('img').src : undefined;
3636
this.siteTitle = document.querySelector('head title');
37-
this.siteTitle = siteTitle ?? (this.siteTitle.innerText ?? '');
37+
this.siteTitle = ( this.nav.dataset.title ?? title ) ?? (this.siteTitle.innerText ?? '');
3838

3939

4040
//get menu items

0 commit comments

Comments
 (0)