Refactor background-position logic in header component
This commit is contained in:
@@ -41,4 +41,12 @@ export class HeaderComponent {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public getBackgroundPosition() {
|
||||
if (this.current_page === 'home') {
|
||||
return 'center ' + this.inverseYPos + 'px'
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user