[develop]: Use is bottom intersecting in about and update libraries
This commit is contained in:
parent
4058c047e2
commit
1ad1a2c4eb
|
@ -9,6 +9,7 @@ import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.compo
|
||||||
import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties";
|
import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties";
|
||||||
import {properties} from "../../environments/environment";
|
import {properties} from "../../environments/environment";
|
||||||
import {StakeholderEntities} from "../openaireLibrary/monitor/entities/stakeholder";
|
import {StakeholderEntities} from "../openaireLibrary/monitor/entities/stakeholder";
|
||||||
|
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'about',
|
selector: 'about',
|
||||||
|
@ -583,11 +584,7 @@ import {StakeholderEntities} from "../openaireLibrary/monitor/entities/stakehold
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
styles: [`
|
styleUrls: ['about.component.less']
|
||||||
.custom-translate-bottom-left {
|
|
||||||
transform: translate(-20%, 20%);
|
|
||||||
}
|
|
||||||
`]
|
|
||||||
})
|
})
|
||||||
export class AboutComponent {
|
export class AboutComponent {
|
||||||
public url: string = null;
|
public url: string = null;
|
||||||
|
@ -607,6 +604,7 @@ export class AboutComponent {
|
||||||
private _title: Title,
|
private _title: Title,
|
||||||
private seoService: SEOService,
|
private seoService: SEOService,
|
||||||
private _piwikService: PiwikService,
|
private _piwikService: PiwikService,
|
||||||
|
private layoutService: LayoutService,
|
||||||
private helper: HelperService,
|
private helper: HelperService,
|
||||||
private cdr: ChangeDetectorRef) {
|
private cdr: ChangeDetectorRef) {
|
||||||
}
|
}
|
||||||
|
@ -621,10 +619,14 @@ export class AboutComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
|
this.subscriptions.push(this.layoutService.isBottomIntersecting.subscribe(isBottomIntersecting => {
|
||||||
|
this.shouldSticky = !isBottomIntersecting;
|
||||||
|
this.cdr.detectChanges();
|
||||||
|
}));
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--header-height'));
|
this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--header-height'));
|
||||||
this.cdr.detectChanges();
|
this.cdr.detectChanges();
|
||||||
this.observeBottom();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -636,20 +638,6 @@ export class AboutComponent {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private observeBottom() {
|
|
||||||
let bottom = document.getElementById('bottom');
|
|
||||||
if (bottom) {
|
|
||||||
let bottomObs = new IntersectionObserver(entries => {
|
|
||||||
entries.forEach(entry => {
|
|
||||||
this.shouldSticky = !entry.isIntersecting;
|
|
||||||
this.cdr.detectChanges();
|
|
||||||
})
|
|
||||||
});
|
|
||||||
this.subscriptions.push(bottomObs);
|
|
||||||
bottomObs.observe(bottom);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private updateDescription(description: string) {
|
private updateDescription(description: string) {
|
||||||
this._meta.updateTag({content: description}, "name='description'");
|
this._meta.updateTag({content: description}, "name='description'");
|
||||||
this._meta.updateTag({content: description}, "property='og:description'");
|
this._meta.updateTag({content: description}, "property='og:description'");
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5db039ea0d23fba297af306d24e4a74ea5050ca3
|
Subproject commit 9ae1ee928a7c467540cefe3ffea96efe54a91456
|
|
@ -1 +1 @@
|
||||||
Subproject commit e48bf941bcdc567a3d09826b5686e70d43fafd46
|
Subproject commit c5ba8700be5b8fcf98522fe167246281545d7985
|
Loading…
Reference in New Issue