Skip to content

Commit 02369c7

Browse files
feat(client): unhidden top banner, hidden al-banner
1 parent 96c5b75 commit 02369c7

File tree

2 files changed

+30
-29
lines changed

2 files changed

+30
-29
lines changed

libs/blog/ad-banner/ui/src/lib/top-banner.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ import { Component } from '@angular/core';
66
<a
77
class="flex w-full flex-wrap justify-center gap-[5px] px-[10px] py-3 text-[18px] font-medium text-white"
88
style="background-image: linear-gradient(0.25turn, #fe5758, #8d52fe)"
9-
href="https://www.youtube.com/watch?v=Ygnx8eH4acg"
9+
href="https://meetup.angular.love/spring-camp-2025/?utm_source=angular.loveweb&utm_medium=baner&utm_campaign=angularspringcamp25"
1010
>
11+
<span>
12+
Free Angular Spring Camp with GDEs - 22nd May at 6 PM (CEST) Online!
13+
</span>
1114
<span class="rounded-[4px] bg-white px-[6px] text-[#b10620]">
12-
ANGULAR SPRING CAMP
15+
Register now
1316
</span>
14-
<span>&nbsp;- JOIN LIVE TODAY AT 6 PM (CEST)</span>
1517
</a>
1618
`,
1719
})

libs/blog/shell/feature-shell-web/src/lib/root-shell.component.ts

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Router, RouterOutlet } from '@angular/router';
55
import { TranslocoService } from '@jsverse/transloco';
66
import { startWith } from 'rxjs';
77

8-
import { AdBannerStore } from '@angular-love/blog/ad-banner/data-access';
98
import { AlLocalizeService } from '@angular-love/blog/i18n/util';
109
import {
1110
FooterComponent,
@@ -14,14 +13,14 @@ import {
1413
} from '@angular-love/blog/layouts/ui-layouts';
1514
import { SearchComponent } from '@angular-love/blog/search/feature-search';
1615
import {
17-
AdImageBanner,
1816
AlBannerCarouselComponent,
17+
TopBannerComponent,
1918
} from '@angular-love/blog/shared/ad-banner';
2019

2120
@Component({
2221
selector: 'al-root-shell',
2322
template: `
24-
<!-- <al-top-banner #topBanner />-->
23+
<al-top-banner #topBanner />
2524
<div class="sticky top-0 z-10 w-full">
2625
<al-header
2726
class="block w-full"
@@ -32,13 +31,13 @@ import {
3231
</al-header>
3332
</div>
3433
<al-layout class="mt-0" [ngClass]="{ 'mt-20': adBannerVisible() }">
35-
@if (slides()?.length && slides(); as slides) {
36-
<al-banner-carousel
37-
class="mb-4 inline-block"
38-
[banners]="slides"
39-
[msPerSlide]="msPerSlide()!"
40-
/>
41-
}
34+
<!-- @if (slides()?.length && slides(); as slides) {-->
35+
<!-- <al-banner-carousel-->
36+
<!-- class="mb-4 inline-block"-->
37+
<!-- [banners]="slides"-->
38+
<!-- [msPerSlide]="msPerSlide()!"-->
39+
<!-- />-->
40+
<!-- }-->
4241
<router-outlet />
4342
</al-layout>
4443
<al-footer class="mt-auto block" />
@@ -50,24 +49,24 @@ import {
5049
LayoutComponent,
5150
SearchComponent,
5251
NgClass,
53-
AlBannerCarouselComponent,
52+
TopBannerComponent,
5453
],
5554
})
5655
export class RootShellComponent {
57-
protected readonly sliderStore = inject(AdBannerStore);
58-
protected readonly slides = computed<AdImageBanner[] | undefined>(() =>
59-
this.sliderStore.slider()?.slides.map((slide) => ({
60-
url: slide.url,
61-
alt: slide.alt,
62-
action: {
63-
type: 'url',
64-
url: slide.navigateTo,
65-
},
66-
})),
67-
);
68-
protected readonly msPerSlide = computed(
69-
() => this.sliderStore.slider()?.slideDisplayTimeMs,
70-
);
56+
// protected readonly sliderStore = inject(AdBannerStore);
57+
// protected readonly slides = computed<AdImageBanner[] | undefined>(() =>
58+
// this.sliderStore.slider()?.slides.map((slide) => ({
59+
// url: slide.url,
60+
// alt: slide.alt,
61+
// action: {
62+
// type: 'url',
63+
// url: slide.navigateTo,
64+
// },
65+
// })),
66+
// );
67+
// protected readonly msPerSlide = computed(
68+
// () => this.sliderStore.slider()?.slideDisplayTimeMs,
69+
// );
7170

7271
readonly translocoService = inject(TranslocoService);
7372

@@ -99,6 +98,6 @@ export class RootShellComponent {
9998
? viewport.setOffset([0, 160])
10099
: viewport.setOffset([0, 80]);
101100
});
102-
this.sliderStore.getData();
101+
// this.sliderStore.getData();
103102
}
104103
}

0 commit comments

Comments
 (0)