From 28099afe1a8cac0bc46d3f878f0ee5edcc42abae Mon Sep 17 00:00:00 2001 From: Sashikumar Yadav Date: Thu, 13 Jun 2024 22:17:32 +0800 Subject: [PATCH] feat(home-module): initial UI redesign (#30) * feat(home-module): initial UI redesign * chore: updated icon with primeng class --- pdf/src/app/app.component.ts | 14 ++- pdf/src/app/pages/(home).page.ts | 81 ++++++------ pdf/src/app/pages/pdf-to-images.page.ts | 74 ++++++----- .../components/footer/footer.component.ts | 23 ++-- .../components/header/header.component.ts | 119 +++++++++++++----- .../newsletter/newsletter.component.ts | 4 +- pdf/src/styles.scss | 38 +++++- 7 files changed, 241 insertions(+), 112 deletions(-) diff --git a/pdf/src/app/app.component.ts b/pdf/src/app/app.component.ts index 6211895..56e2fd5 100644 --- a/pdf/src/app/app.component.ts +++ b/pdf/src/app/app.component.ts @@ -8,12 +8,14 @@ import { NewsletterComponent } from './shared/components/newsletter/newsletter.c selector: 'pdf-root', standalone: true, template: ` - -
- -
- - +
+ +
+ +
+ + +
`, imports: [ RouterOutlet, diff --git a/pdf/src/app/pages/(home).page.ts b/pdf/src/app/pages/(home).page.ts index b79db89..4c601b0 100644 --- a/pdf/src/app/pages/(home).page.ts +++ b/pdf/src/app/pages/(home).page.ts @@ -25,43 +25,54 @@ export const routeMeta: RouteMeta = { template: ` -

Resize your PDF file

- - - - - - @if(loading()) { -

Your file is uploaded and processing. Please wait for a moment ;)

- } @if(errorMessage()) { -

{{ errorMessage() }}

- } @if(downloadUrl$ | async; as downloadUrl) { - - - @if(this.newFileSize() > this.currentFileSize()) { -

- Congratulations! Your file is reduced by - {{ this.newFileSize() - this.currentFileSize() }} bytes! -

- } +
+

Resize your PDF file

+ + + + + + @if(loading()) { +
+

Your file is uploaded and processing. Please wait for a moment ;)

+
+ } @if(errorMessage()) { +

{{ errorMessage() }}

+ } @if(downloadUrl$ | async; as downloadUrl) { + + + @if(this.newFileSize() < this.currentFileSize()) { +

+ Congratulations! Your file is reduced by + {{ this.currentFileSize() - this.newFileSize() }} bytes! +

+ } - Download PDF - - } + + + Download PDF + + + + } - + +
`, imports: [ CommonModule, diff --git a/pdf/src/app/pages/pdf-to-images.page.ts b/pdf/src/app/pages/pdf-to-images.page.ts index 42a249a..d3a4746 100644 --- a/pdf/src/app/pages/pdf-to-images.page.ts +++ b/pdf/src/app/pages/pdf-to-images.page.ts @@ -34,35 +34,53 @@ export const routeMeta: RouteMeta = { template: ` -

Convert your PDF file to Images

- - - - - - @if(loading()) { -

Your file is uploaded and processing. Please wait for a moment ;)

- } @if(errorMessage()) { -

{{ errorMessage() }}

- } @if(downloadUrl$ | async; as downloadUrl) { - - Download Images - - } +
+

+ Convert your PDF file to Images +

+ + + + + + @if(loading()) { +
+
+ +
+ Your file is uploaded and processing. Please wait for a moment. +
+ } @if(errorMessage()) { +

{{ errorMessage() }}

+ } @if(downloadUrl$ | async; as downloadUrl) { + + + + Download Images + + + + } - + +
`, }) export default class PdfToImagesComponent extends PdfHandlerBase { diff --git a/pdf/src/app/shared/components/footer/footer.component.ts b/pdf/src/app/shared/components/footer/footer.component.ts index 6cfa5f2..a809641 100644 --- a/pdf/src/app/shared/components/footer/footer.component.ts +++ b/pdf/src/app/shared/components/footer/footer.component.ts @@ -1,20 +1,29 @@ import { CommonModule } from '@angular/common' import { Component } from '@angular/core' +import { RouterLink } from '@angular/router' @Component({ selector: 'pdf-footer', standalone: true, - imports: [CommonModule], + imports: [CommonModule, RouterLink], template: ` -