-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from Apes2getherStrong/wtg-45-enhance-map-loc…
…ations-details-layout-in-modal Wtg 45 enhance map locations details layout in modal
- Loading branch information
Showing
12 changed files
with
72 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 6 additions & 82 deletions
88
src/app/map-location/map-location-modal/map-location-modal.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,7 @@ | ||
.map-location-grid-container { | ||
display: grid; | ||
grid-template-columns: 1fr 1fr; | ||
gap: 10px; | ||
grid-template-areas: | ||
"photo-wrap audio-list" | ||
"info-wrap audio-list"; | ||
} | ||
|
||
.photo-wrap { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
grid-area: photo-wrap; | ||
} | ||
|
||
.photo { | ||
width: 200px; | ||
height: 200px; | ||
background-color: cadetblue; | ||
overflow: hidden; | ||
} | ||
|
||
.photo img { | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
.info-wrap { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
grid-area: info-wrap; | ||
background-color: white; | ||
border: #10898d 1px solid; | ||
padding: 10px; | ||
} | ||
|
||
.animation { | ||
animation: background-change 1s; | ||
animation-duration: 1s; | ||
} | ||
|
||
.audio-list { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
grid-area: audio-list; | ||
padding: 10px; | ||
} | ||
|
||
.audio-file { | ||
width: 325px; | ||
} | ||
|
||
@media (max-width: 1200px) { | ||
.map-location-grid-container { | ||
display: grid; | ||
grid-template-columns: 1fr 1fr; | ||
gap: 10px; | ||
grid-template-areas: | ||
"photo-wrap info-wrap" | ||
"audio-list audio-list"; | ||
} | ||
} | ||
|
||
|
||
@media (max-width: 600px) { | ||
.map-location-grid-container { | ||
grid-template-columns: 1fr; | ||
grid-template-areas: | ||
"photo-wrap" | ||
"info-wrap" | ||
"audio-list"; | ||
} | ||
|
||
.audio-file { | ||
width: 225px; | ||
} | ||
|
||
.map-location-modal-image { | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
max-width: 40vw; | ||
max-height: 40vh; | ||
object-fit: contain; | ||
} |
50 changes: 27 additions & 23 deletions
50
src/app/map-location/map-location-modal/map-location-modal.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
<div class="map-location-grid-container"> | ||
<div class="photo-wrap"> | ||
<div class="photo"> | ||
<img *ngIf="mapLocationImageUrl" [src]="mapLocationImageUrl"> | ||
<div> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<h2>Map location details</h2> | ||
</div> | ||
</div> | ||
<div class="info-wrap"> | ||
<p style="text-align: center"><strong>Map Location info: </strong></p> | ||
<p>Name: {{mapLocation.name}}</p> | ||
<p>Description: {{mapLocation.description}}</p> | ||
</div> | ||
<div class="audio-list"> | ||
<div *ngFor="let audioItem of audioData"> | ||
<!--<audio controls *ngIf="audioItem.url">--> | ||
<audio class="audio-file" controls> | ||
<source [src]="audioItem.url" type="audio/mpeg"/> | ||
Your browser does not support the audio element. | ||
</audio> | ||
<p>{{audioItem.audio.name}} | ||
</p> | ||
<div class="card-body d-flex flex-column align-items-center"> | ||
<img *ngIf="mapLocationImageUrl" [src]="mapLocationImageUrl" class="card-img-top map-location-modal-image" alt="map location image"> | ||
<img *ngIf="!mapLocationImageUrl" src="https://loyaltystarter.io/wp-content/themes/unbound/images/No-Image-Found-400x264.png" class="card-img-top map-location-modal-image" alt="map location image"> | ||
<h5 class="card-title">{{mapLocation.name}}</h5> | ||
<p class="card-text">{{mapLocation.description}}</p> | ||
<a (click)="onCalculateRoute()" class="btn btn-primary" style="background-color: #10898d"><i class="fa fa-location-arrow"></i> Navigate</a> | ||
</div> | ||
<ul class="list-group list-group-flush"> | ||
<li class="list-group-item" *ngFor="let audioItem of audioData"> | ||
<div class="card"> | ||
<div class="card-header d-flex align-items-center"> | ||
{{ audioItem.audio.name }} | ||
</div> | ||
<div class="card-body d-flex justify-content-center"> | ||
<div class="col-12 col-md-6"> | ||
<audio class="w-100" controls> | ||
<source [src]="audioItem.url" type="audio/mpeg"/> | ||
Your browser does not support the audio element. | ||
</audio> | ||
</div> | ||
</div> | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="route-button-container"> | ||
<button (click)="onCalculateRoute()">Trace</button> | ||
</div> | ||
<button (click)="tmpOnClick()">snackbar</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
<div class="modal-container"> | ||
<div class="modal-content"> | ||
<button class="close-btn" (click)="closeModal()">X</button> | ||
<div class="d-flex justify-content-end align-items-center" style="background-color: #046169; width: 100%; "> | ||
<button class="close-btn" (click)="closeModal()"> | ||
<i class="fa fa-close"></i> | ||
</button> | ||
</div> | ||
|
||
<div class="modal-filling" style="overflow: auto; padding: 20px"> | ||
|
||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters