Skip to content

Commit

Permalink
updated meta tag, gallery banner
Browse files Browse the repository at this point in the history
  • Loading branch information
imayushsaini committed Jul 15, 2023
1 parent fb48db6 commit ade564a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
8 changes: 7 additions & 1 deletion src/app/pages/gallery/gallery.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ <h1>BombSquad Gallery</h1>
<mat-icon (click)="scrollUp()" *ngIf="startPoint!=0">keyboard_arrow_up</mat-icon>
</div>
<div class="gallery">
<div *ngFor="let image of currentimages" class="gallery-item">
<div *ngFor="let image of currentimages.slice(0, currentimages.length/2); let i = index" class="gallery-item">
<img [src]="CDN+image.url" [alt]="image.alt" (click)="openOverlay(image)" loading="lazy">
</div>
<div class="gallery-item">
<app-banner [banner]="banner"></app-banner>
</div>
<div *ngFor="let image of currentimages.slice(currentimages.length/2); let i = index" class="gallery-item">
<img [src]="CDN+image.url" [alt]="image.alt" (click)="openOverlay(image)" loading="lazy">
</div>
</div>
Expand Down
18 changes: 15 additions & 3 deletions src/app/pages/gallery/gallery.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { HttpClient } from "@angular/common/http";
import { CommonModule } from "@angular/common";
import { MatIconModule } from '@angular/material/icon';
import { images } from './image_map';
import { BannerModule } from "src/app/shared/banner/banner.component";
import { Banner } from "src/app/models/model";
@Component({
selector: 'app-Gallery',
templateUrl: './gallery.component.html',
Expand All @@ -19,8 +21,17 @@ export class GalleryComponent implements OnInit {
endPoint = 12;
showOverlay = false;
selectedImage!: { url: string; alt: string; };
banner: Banner;
CDN = "https://scintillating-creponne-d386aa.netlify.app";
constructor(private http: HttpClient, private _seoService: SEOServiceService, private activatedRoute: ActivatedRoute) { }
constructor(private http: HttpClient, private _seoService: SEOServiceService, private activatedRoute: ActivatedRoute) {
this.banner = new Banner(
'ca-pub-7561471327972639',
1688169659,
'fluid',
'-6t+ed+2i-1n-4w',
true
)
}

ngOnInit(): void {
var rt = this.getChild(this.activatedRoute)
Expand Down Expand Up @@ -71,10 +82,11 @@ const routes: Routes = [{path: '', component: GalleryComponent}];

@NgModule({
imports: [
CommonModule,
CommonModule,
RouterModule.forChild(routes),
MatButtonModule,
MatIconModule
MatIconModule,
BannerModule,
],
exports: [GalleryComponent],
declarations: [GalleryComponent],
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/mods/mods.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1> Mods Repository</h1>
<mat-spinner></mat-spinner>
</div>
<div class="mod" *ngFor="let mod of mods; let i = index" (click)="openModPage(mod)">
<div class="ads" *ngIf="i%4==0">
<div class="ads" *ngIf="i%4==0 && i!=0">
<app-banner [banner]="banner"></app-banner>
</div>
<div class="card">
Expand Down
2 changes: 2 additions & 0 deletions src/app/services/seoservice.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export class SEOServiceService {

updateTitle(title: string) {
this.title.setTitle(title);
this.meta.updateTag({ name: 'og:title', content: title })
this.meta.updateTag({ name: 'title', content: title })
}

updateOgUrl(url: string) {
Expand Down

0 comments on commit ade564a

Please sign in to comment.