Skip to content

Commit

Permalink
pages
Browse files Browse the repository at this point in the history
  • Loading branch information
fe222004 committed Jul 24, 2024
1 parent 5393c8b commit 7a49071
Show file tree
Hide file tree
Showing 7 changed files with 224 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/app/constants/routes.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const RoutesConstants = {
home: '',
dashboard: '/pages/:userId/home',
form: '/pages/:userId/form',
product: '/pages/:userId/product',
root: '/',
};

8 changes: 4 additions & 4 deletions src/app/pages/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ <h3 class="text-lg font-semibold leading-6 text-gray-900 group-hover:text-gray-6
<div class="p-4">
<div class="flex items-center gap-x-4 text-xs">
<time datetime="2024-07-18" class="text-gray-500">Jul 18, 2024</time>
<a href="#"
<a [routerLink]="goProduct()"
class="relative z-10 rounded-full bg-gray-50 px-3 py-1.5 font-medium text-gray-600 hover:bg-gray-100">historial</a>
</div>
<div class="group relative mt-3">
<h3 class="text-lg font-semibold leading-6 text-gray-900 group-hover:text-gray-600">
<a href="#">
<a [routerLink]="goProduct()">
<span class="absolute inset-0"></span>
{{ 'dashboard.articles.tracking.title' | translate }}
</a>
Expand All @@ -85,7 +85,7 @@ <h3 class="text-lg font-semibold leading-6 text-gray-900 group-hover:text-gray-6
<img [src]="avatar" alt="Avatar" class="h-10 w-10 rounded-full bg-gray-100">
<div class="text-sm leading-5">
<p class="font-semibold text-gray-900">
<a href="#">
<a [routerLink]="goProduct()">
<span class="absolute inset-0"></span>
{{ userName }} {{ userLastName }}
</a>
Expand All @@ -95,7 +95,7 @@ <h3 class="text-lg font-semibold leading-6 text-gray-900 group-hover:text-gray-6
</div>
</div>
<br>
<a href="/registro-electrodomestico"
<a [routerLink]="goProduct()"
class="block w-full py-2 text-center text-sm font-medium text-white bg-blue-500 hover:bg-blue-600">
Ver detalles
</a>
Expand Down
8 changes: 8 additions & 0 deletions src/app/pages/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,12 @@ export class HomeComponent {
return [RoutesConstants.home];
}
}

goProduct(): string[] {
if (this.userId) {
return [RoutesConstants.product.replace(':userId', this.userId)];
} else {
return [RoutesConstants.home];
}
}
}
6 changes: 6 additions & 0 deletions src/app/pages/pages-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { ApplianceRegistrationComponent } from './appliance-registration/appliance-registration.component';
import { ProductComponent } from './product/product.component';

const routes: Routes = [
{
Expand All @@ -12,6 +13,11 @@ const routes: Routes = [
path: 'form',
component: ApplianceRegistrationComponent,
},
{
path: 'product',
component: ProductComponent,
},

];

@NgModule({
Expand Down
5 changes: 5 additions & 0 deletions src/app/pages/product/product.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
body {
background: linear-gradient(to right, rgba(0, 0, 255, 0.5), rgba(255, 255, 0, 0.5));
margin: 0;
font-family: Arial, sans-serif;
}
190 changes: 189 additions & 1 deletion src/app/pages/product/product.component.html
Original file line number Diff line number Diff line change
@@ -1 +1,189 @@
<p>product works!</p>
<body>

<div class="relative overflow-hidden bg-white" style="margin-left: 50px; margin-right: 50px;">
<div class="pb-80 pt-16 sm:pb-40 sm:pt-24 lg:pb-48 lg:pt-40">
<div class="relative mx-auto max-w-7xl px-4 sm:static sm:px-6 lg:px-8">
<div class="sm:max-w-lg">
<h1 class="text-4xl font-bold tracking-tight text-gray-900 sm:text-6xl">Summer styles are finally here</h1>
<p class="mt-4 text-xl text-gray-500">This year, our new summer collection will shelter you from the harsh elements of a world that doesn't care if you live or die.</p>
</div>
<div>
<div class="mt-10">
<!-- Decorative image grid -->
<div aria-hidden="true" class="pointer-events-none lg:absolute lg:inset-y-0 lg:mx-auto lg:w-full lg:max-w-7xl">
<div class="absolute transform sm:left-1/2 sm:top-0 sm:translate-x-8 lg:left-1/2 lg:top-1/2 lg:-translate-y-1/2 lg:translate-x-8">
<div class="flex items-center space-x-6 lg:space-x-8">
<div class="grid flex-shrink-0 grid-cols-1 gap-y-6 lg:gap-y-8">
<div class="h-64 w-44 overflow-hidden rounded-lg sm:opacity-0 lg:opacity-100">
<img src="https://tailwindui.com/img/ecommerce-images/home-page-03-hero-image-tile-01.jpg" alt="" class="h-full w-full object-cover object-center">
</div>
<div class="h-64 w-44 overflow-hidden rounded-lg">
<img src="https://tailwindui.com/img/ecommerce-images/home-page-03-hero-image-tile-02.jpg" alt="" class="h-full w-full object-cover object-center">
</div>
</div>
<div class="grid flex-shrink-0 grid-cols-1 gap-y-6 lg:gap-y-8">
<div class="h-64 w-44 overflow-hidden rounded-lg">
<img src="https://tailwindui.com/img/ecommerce-images/home-page-03-hero-image-tile-03.jpg" alt="" class="h-full w-full object-cover object-center">
</div>
<div class="h-64 w-44 overflow-hidden rounded-lg">
<img src="https://tailwindui.com/img/ecommerce-images/home-page-03-hero-image-tile-04.jpg" alt="" class="h-full w-full object-cover object-center">
</div>
<div class="h-64 w-44 overflow-hidden rounded-lg">
<img src="https://tailwindui.com/img/ecommerce-images/home-page-03-hero-image-tile-05.jpg" alt="" class="h-full w-full object-cover object-center">
</div>
</div>
<div class="grid flex-shrink-0 grid-cols-1 gap-y-6 lg:gap-y-8">
<div class="h-64 w-44 overflow-hidden rounded-lg">
<img src="https://tailwindui.com/img/ecommerce-images/home-page-03-hero-image-tile-06.jpg" alt="" class="h-full w-full object-cover object-center">
</div>
<div class="h-64 w-44 overflow-hidden rounded-lg">
<img src="https://tailwindui.com/img/ecommerce-images/home-page-03-hero-image-tile-07.jpg" alt="" class="h-full w-full object-cover object-center">
</div>
</div>
</div>
</div>
</div>

<a href="#" class="inline-block rounded-md border border-transparent bg-indigo-600 px-8 py-3 text-center font-medium text-white hover:bg-indigo-700">Shop Collection</a>
</div>
</div>
</div>
</div>
</div>

<div class="bg-white py-24 sm:py-32">
<div class="mx-auto max-w-7xl px-6 lg:px-8">
<dl class="grid grid-cols-1 gap-x-8 gap-y-16 text-center lg:grid-cols-3">
<div class="mx-auto flex max-w-xs flex-col gap-y-4">
<dt class="text-base leading-7 text-gray-600">Transactions every 24 hours</dt>
<dd class="order-first text-3xl font-semibold tracking-tight text-gray-900 sm:text-5xl">44 million</dd>
</div>
<div class="mx-auto flex max-w-xs flex-col gap-y-4">
<dt class="text-base leading-7 text-gray-600">Assets under holding</dt>
<dd class="order-first text-3xl font-semibold tracking-tight text-gray-900 sm:text-5xl">$119 trillion</dd>
</div>
<div class="mx-auto flex max-w-xs flex-col gap-y-4">
<dt class="text-base leading-7 text-gray-600">New users annually</dt>
<dd class="order-first text-3xl font-semibold tracking-tight text-gray-900 sm:text-5xl">46,000</dd>
</div>
</dl>
</div>
</div>

<div class="bg-white py-24 sm:py-32">
<div class="mx-auto max-w-7xl px-6 lg:px-8">
<h2 class="text-center text-lg font-semibold leading-8 text-gray-900">Trusted by the world’s most innovative teams</h2>
<div class="mx-auto mt-10 grid max-w-lg grid-cols-4 items-center gap-x-8 gap-y-10 sm:max-w-xl sm:grid-cols-6 sm:gap-x-10 lg:mx-0 lg:max-w-none lg:grid-cols-5">
<img class="col-span-2 max-h-12 w-full object-contain lg:col-span-1" src="https://tailwindui.com/img/logos/158x48/transistor-logo-gray-900.svg" alt="Transistor" width="158" height="48">
<img class="col-span-2 max-h-12 w-full object-contain lg:col-span-1" src="https://tailwindui.com/img/logos/158x48/reform-logo-gray-900.svg" alt="Reform" width="158" height="48">
<img class="col-span-2 max-h-12 w-full object-contain lg:col-span-1" src="https://tailwindui.com/img/logos/158x48/tuple-logo-gray-900.svg" alt="Tuple" width="158" height="48">
<img class="col-span-2 max-h-12 w-full object-contain sm:col-start-2 lg:col-span-1" src="https://tailwindui.com/img/logos/158x48/savvycal-logo-gray-900.svg" alt="SavvyCal" width="158" height="48">
<img class="col-span-2 col-start-2 max-h-12 w-full object-contain sm:col-start-auto lg:col-span-1" src="https://tailwindui.com/img/logos/158x48/statamic-logo-gray-900.svg" alt="Statamic" width="158" height="48">
</div>
</div>
</div>

<div class="bg-white">
<div class="mx-auto max-w-2xl px-4 py-16 sm:px-6 sm:py-24 lg:max-w-7xl lg:px-8">
<h2 class="text-2xl font-bold tracking-tight text-gray-900">Customers also purchased</h2>

<div class="mt-6 grid grid-cols-1 gap-x-6 gap-y-10 sm:grid-cols-2 lg:grid-cols-4 xl:gap-x-8">
<div class="group relative">
<div class="aspect-h-1 aspect-w-1 w-full overflow-hidden rounded-md bg-gray-200 lg:aspect-none group-hover:opacity-75 lg:h-80">
<img src="https://tailwindui.com/img/ecommerce-images/product-page-01-related-product-01.jpg" alt="Front of men&#039;s Basic Tee in black." class="h-full w-full object-cover object-center lg:h-full lg:w-full">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<a href="#">
<span aria-hidden="true" class="absolute inset-0"></span>
Basic Tee
</a>
</h3>
<p class="mt-1 text-sm text-gray-500">Black</p>
</div>
<p class="text-sm font-medium text-gray-900">$35</p>
</div>
</div>

<div class="group relative">
<div class="aspect-h-1 aspect-w-1 w-full overflow-hidden rounded-md bg-gray-200 lg:aspect-none group-hover:opacity-75 lg:h-80">
<img src="https://tailwindui.com/img/ecommerce-images/product-page-01-related-product-01.jpg" alt="Front of men&#039;s Basic Tee in black." class="h-full w-full object-cover object-center lg:h-full lg:w-full">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<a href="#">
<span aria-hidden="true" class="absolute inset-0"></span>
Basic Tee
</a>
</h3>
<p class="mt-1 text-sm text-gray-500">Black</p>
</div>
<p class="text-sm font-medium text-gray-900">$35</p>
</div>
</div>

<div class="group relative">
<div class="aspect-h-1 aspect-w-1 w-full overflow-hidden rounded-md bg-gray-200 lg:aspect-none group-hover:opacity-75 lg:h-80">
<img src="https://tailwindui.com/img/ecommerce-images/product-page-01-related-product-01.jpg" alt="Front of men&#039;s Basic Tee in black." class="h-full w-full object-cover object-center lg:h-full lg:w-full">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<a href="#">
<span aria-hidden="true" class="absolute inset-0"></span>
Basic Tee
</a>
</h3>
<p class="mt-1 text-sm text-gray-500">Black</p>
</div>
<p class="text-sm font-medium text-gray-900">$35</p>
</div>
</div>

<div class="group relative">
<div class="aspect-h-1 aspect-w-1 w-full overflow-hidden rounded-md bg-gray-200 lg:aspect-none group-hover:opacity-75 lg:h-80">
<img src="https://tailwindui.com/img/ecommerce-images/product-page-01-related-product-01.jpg" alt="Front of men&#039;s Basic Tee in black." class="h-full w-full object-cover object-center lg:h-full lg:w-full">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<a href="#">
<span aria-hidden="true" class="absolute inset-0"></span>
Basic Tee
</a>
</h3>
<p class="mt-1 text-sm text-gray-500">Black</p>
</div>
<p class="text-sm font-medium text-gray-900">$35</p>
</div>
</div>

<div class="group relative">
<div class="aspect-h-1 aspect-w-1 w-full overflow-hidden rounded-md bg-gray-200 lg:aspect-none group-hover:opacity-75 lg:h-80">
<img src="https://tailwindui.com/img/ecommerce-images/product-page-01-related-product-01.jpg" alt="Front of men&#039;s Basic Tee in black." class="h-full w-full object-cover object-center lg:h-full lg:w-full">
</div>
<div class="mt-4 flex justify-between">
<div>
<h3 class="text-sm text-gray-700">
<a href="#">
<span aria-hidden="true" class="absolute inset-0"></span>
Basic Tee
</a>
</h3>
<p class="mt-1 text-sm text-gray-500">Black</p>
</div>
<p class="text-sm font-medium text-gray-900">$35</p>
</div>
</div>

<!-- More products... -->
</div>
</div>
</div>
<div style="margin-top: 100px;">

</div>
</body>

14 changes: 11 additions & 3 deletions src/app/pages/product/product.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { ProductRoutingModule } from './product-routing.module';
import { MenuModule } from '../components/menu/menu.module';
import { FooterModule } from '../components/footer/footer.module';
import { TranslateModule } from '@ngx-translate/core';
import { ProductComponent } from './product.component';


@NgModule({
declarations: [],
declarations: [ProductComponent],
imports: [
CommonModule,
ProductRoutingModule
]
ProductRoutingModule,
MenuModule,
FooterModule,
TranslateModule
],
exports: [ProductComponent]
})
export class ProductModule { }

0 comments on commit 7a49071

Please sign in to comment.