@@ -32,6 +36,7 @@
class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
+ (click)="switchModal()"
>
diff --git a/src/app/modules/public/discover/components/modal-site/modal-site.component.scss b/src/app/modules/public/discover/components/modal-site/modal-site.component.scss
index a0d83af..b1730db 100644
--- a/src/app/modules/public/discover/components/modal-site/modal-site.component.scss
+++ b/src/app/modules/public/discover/components/modal-site/modal-site.component.scss
@@ -39,3 +39,18 @@
max-height: 14rem;
}
}
+
+/* .backdrop{
+ background-color:rgba(0,0,0,0.6);
+ position:absolute;
+ top:0;
+ left:0;
+ width:100%;
+ height:100vh;
+} */
+
+.modal-header .btn-close{
+ position: absolute;
+ top: 1rem;
+ right: 1rem;
+}
diff --git a/src/app/modules/public/discover/components/modal-site/modal-site.component.ts b/src/app/modules/public/discover/components/modal-site/modal-site.component.ts
index 8137702..f4a20c9 100644
--- a/src/app/modules/public/discover/components/modal-site/modal-site.component.ts
+++ b/src/app/modules/public/discover/components/modal-site/modal-site.component.ts
@@ -12,20 +12,27 @@
url = environment.BASE_URL_API;
loading = true;
+ @Input() isOpenModal: boolean = false;
@Input() allyId!: number;
+ display = 'none';
ally!: Site;
- constructor(private queryService: QueryService) { }
+ constructor() { }
ngOnInit(): void {
- this.queryService.query(`${this.url}/allys/${this.allyId}/`, 'GET')?.subscribe(
- (data) => {
- console.log(data);
- },
- (error) => {
- console.log(error);
- }
- );
+ }
+
+ switchModal(){
+ const modal = document.getElementById('staticBackdrop');
+ if(this.isOpenModal == false){
+ modal?.classList.add("show")
+ this.display = 'block';
+ this.isOpenModal = true
+ }else{
+ this.display = 'none';
+ modal?.classList.remove("show")
+ this.isOpenModal = false;
+ }
}
}
diff --git a/src/app/modules/public/discover/components/modal-site/modal-site.component.html b/src/app/modules/public/discover/components/modal-site/modal-site.component.html
index 298553d..160404b 100644
--- a/src/app/modules/public/discover/components/modal-site/modal-site.component.html
+++ b/src/app/modules/public/discover/components/modal-site/modal-site.component.html
@@ -1,3 +1,4 @@
+