| @@ -11,6 +11,10 @@ const routes: Routes = [ | |||||
| redirectTo: 'home', | redirectTo: 'home', | ||||
| pathMatch: 'full' | pathMatch: 'full' | ||||
| }, | }, | ||||
| { | |||||
| path: 'story-details', | |||||
| loadChildren: () => import('./story-details/story-details.module').then( m => m.StoryDetailsPageModule) | |||||
| }, | |||||
| ]; | ]; | ||||
| @NgModule({ | @NgModule({ | ||||
| @@ -1,6 +1,6 @@ | |||||
| <ion-content [fullscreen]="true"> | <ion-content [fullscreen]="true"> | ||||
| <h5> Namaskaram! </h5> | <h5> Namaskaram! </h5> | ||||
| <ul class="stories"> | |||||
| <ul class="stories" (click)="showStoryDetails()"> | |||||
| <li> | <li> | ||||
| <img src="assets/sample-images/golden-temple-icon.webp" alt="golden-temple-icon"> | <img src="assets/sample-images/golden-temple-icon.webp" alt="golden-temple-icon"> | ||||
| </li> | </li> | ||||
| @@ -86,6 +86,11 @@ | |||||
| <img src="assets/sample-images/merch/incense-2.jpeg" alt=""> | <img src="assets/sample-images/merch/incense-2.jpeg" alt=""> | ||||
| </figure> | </figure> | ||||
| </li> | </li> | ||||
| <li> | |||||
| <figure> | |||||
| <img src="assets/sample-images/merch/kunkum.webp" alt=""> | |||||
| </figure> | |||||
| </li> | |||||
| </ul> | </ul> | ||||
| </section> | </section> | ||||
| </ion-content> | </ion-content> | ||||
| @@ -1,4 +1,5 @@ | |||||
| import { Component } from '@angular/core'; | import { Component } from '@angular/core'; | ||||
| import { Router } from '@angular/router'; | |||||
| @Component({ | @Component({ | ||||
| selector: 'app-home', | selector: 'app-home', | ||||
| @@ -7,6 +8,10 @@ import { Component } from '@angular/core'; | |||||
| }) | }) | ||||
| export class HomePage { | export class HomePage { | ||||
| constructor() {} | |||||
| constructor(private router: Router) {} | |||||
| showStoryDetails(){ | |||||
| this.router.navigate(['/story-details']) | |||||
| } | |||||
| } | } | ||||
| @@ -0,0 +1,17 @@ | |||||
| import { NgModule } from '@angular/core'; | |||||
| import { Routes, RouterModule } from '@angular/router'; | |||||
| import { StoryDetailsPage } from './story-details.page'; | |||||
| const routes: Routes = [ | |||||
| { | |||||
| path: '', | |||||
| component: StoryDetailsPage | |||||
| } | |||||
| ]; | |||||
| @NgModule({ | |||||
| imports: [RouterModule.forChild(routes)], | |||||
| exports: [RouterModule], | |||||
| }) | |||||
| export class StoryDetailsPageRoutingModule {} | |||||
| @@ -0,0 +1,20 @@ | |||||
| import { NgModule } from '@angular/core'; | |||||
| import { CommonModule } from '@angular/common'; | |||||
| import { FormsModule } from '@angular/forms'; | |||||
| import { IonicModule } from '@ionic/angular'; | |||||
| import { StoryDetailsPageRoutingModule } from './story-details-routing.module'; | |||||
| import { StoryDetailsPage } from './story-details.page'; | |||||
| @NgModule({ | |||||
| imports: [ | |||||
| CommonModule, | |||||
| FormsModule, | |||||
| IonicModule, | |||||
| StoryDetailsPageRoutingModule | |||||
| ], | |||||
| declarations: [StoryDetailsPage] | |||||
| }) | |||||
| export class StoryDetailsPageModule {} | |||||
| @@ -0,0 +1,24 @@ | |||||
| <ion-content [fullscreen]="true"> | |||||
| <button class="close-button" (click)="back()"> | |||||
| <ion-icon name="close"></ion-icon> | |||||
| </button> | |||||
| <figure> | |||||
| <img src="assets/sample-images/swarnalakshmi-icon.jpeg" alt="" /> | |||||
| </figure> | |||||
| <div class="info"> | |||||
| <div class="container"> | |||||
| <h5>Swarnalakshmi Abhishekam</h5> | |||||
| <p> | |||||
| Enjoy the pleasent abhishekam of Swarnalakshmi Devi Lorem, ipsum dolor | |||||
| sit amet consectetur adipisicing elit. In alias vero corrupti deleniti, | |||||
| blanditiis modi quisquam ut quis facere! Consequatur tempore maiores | |||||
| possimus labore officia cumque. Unde harum quidem fuga. | |||||
| </p> | |||||
| </div> | |||||
| </div> | |||||
| <div class="action-items"> | |||||
| <button> | |||||
| <ion-icon name="share-social-outline"></ion-icon> | |||||
| </button> | |||||
| </div> | |||||
| </ion-content> | |||||
| @@ -0,0 +1,72 @@ | |||||
| ion-content { | |||||
| --padding-top: 0rem; | |||||
| --padding-start: 0rem; | |||||
| --padding-end: 0rem; | |||||
| --padding-bottom: 0rem; | |||||
| } | |||||
| $standard-vertical-spacing-between-sections: 1.5rem; | |||||
| figure { | |||||
| height: 60vh; | |||||
| img { | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| object-fit: cover; | |||||
| } | |||||
| } | |||||
| .info { | |||||
| padding: 2rem; | |||||
| background-color: var(--brand-cream-shade1); | |||||
| height: 40vh; | |||||
| text-align: center; | |||||
| display: flex; | |||||
| align-items: center; | |||||
| justify-content: center; | |||||
| } | |||||
| h5 { | |||||
| font-weight: 700; | |||||
| font-size: 2rem; | |||||
| margin-bottom: $standard-vertical-spacing-between-sections; | |||||
| } | |||||
| p { | |||||
| font-size: 1.8rem; | |||||
| font-style: italic; | |||||
| } | |||||
| .action-items { | |||||
| position: absolute; | |||||
| right: 0; | |||||
| bottom: 0; | |||||
| width: 100%; | |||||
| display: flex; | |||||
| align-items: center; | |||||
| justify-content: flex-start; | |||||
| padding: 1rem; | |||||
| button { | |||||
| margin-left: auto; | |||||
| background-color: transparent; | |||||
| ion-icon { | |||||
| font-size: 2rem; | |||||
| color: var(--brand-red); | |||||
| } | |||||
| } | |||||
| } | |||||
| .close-button { | |||||
| background-color: transparent; | |||||
| position: absolute; | |||||
| right: 0; | |||||
| top: 0; | |||||
| padding: 1rem; | |||||
| ion-icon { | |||||
| color: white; | |||||
| font-size: 3rem; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,17 @@ | |||||
| import { ComponentFixture, TestBed } from '@angular/core/testing'; | |||||
| import { StoryDetailsPage } from './story-details.page'; | |||||
| describe('StoryDetailsPage', () => { | |||||
| let component: StoryDetailsPage; | |||||
| let fixture: ComponentFixture<StoryDetailsPage>; | |||||
| beforeEach(async(() => { | |||||
| fixture = TestBed.createComponent(StoryDetailsPage); | |||||
| component = fixture.componentInstance; | |||||
| fixture.detectChanges(); | |||||
| })); | |||||
| it('should create', () => { | |||||
| expect(component).toBeTruthy(); | |||||
| }); | |||||
| }); | |||||
| @@ -0,0 +1,18 @@ | |||||
| import { Component } from '@angular/core'; | |||||
| import { Location } from '@angular/common' | |||||
| @Component({ | |||||
| selector: 'app-story-details', | |||||
| templateUrl: './story-details.page.html', | |||||
| styleUrls: ['./story-details.page.scss'], | |||||
| }) | |||||
| export class StoryDetailsPage { | |||||
| constructor(private location: Location) { } | |||||
| back() { | |||||
| this.location.back() | |||||
| } | |||||
| } | |||||