Skip to content

Commit

Permalink
optimizaciones
Browse files Browse the repository at this point in the history
  • Loading branch information
figonzal1 committed Aug 2, 2024
1 parent 155ffd6 commit 0e4da9e
Show file tree
Hide file tree
Showing 28 changed files with 33 additions and 8,559 deletions.
8,523 changes: 0 additions & 8,523 deletions package-lock.json

This file was deleted.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"version": "1.0.0",
"scripts": {
"dev": "astro dev",
"format": "npx prettier --write . --plugin=prettier-plugin-astro",
"lint": "npx oxlint",
"format": "pnpm dlx prettier --write . --plugin=prettier-plugin-astro",
"lint": "pnpm dlx oxlint",
"start": "astro dev",
"build": "npm run format && npm run lint && astro check && astro build",
"build": "pnpm format && pnpm lint && astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
Expand All @@ -32,6 +32,7 @@
"embla-carousel-autoplay": "^8.1.7",
"embla-carousel-react": "^8.1.7",
"lucide-react": "^0.408.0",
"postcss": "^8.4.40",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.2.1",
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed public/nav/adulto.jpg
Binary file not shown.
Binary file removed public/nav/amai_logo_full_white.png
Binary file not shown.
Binary file removed public/nav/pediatria.jpg
Binary file not shown.
Binary file removed src/assets/images/about.jpg
Binary file not shown.
Binary file added src/assets/images/about.webp
Binary file not shown.
Binary file removed src/assets/images/amai_logo.png
Binary file not shown.
Binary file added src/assets/images/amai_logo.webp
Binary file not shown.
Binary file removed src/assets/images/amai_logo_full.png
Binary file not shown.
Binary file added src/assets/images/amai_logo_full.webp
Binary file not shown.
Binary file removed src/assets/images/amai_logo_full_white.png
Binary file not shown.
Binary file added src/assets/images/amai_logo_full_white.webp
Binary file not shown.
Binary file removed src/assets/images/amai_logo_simplificado.jpg
Binary file not shown.
Binary file added src/assets/images/amai_logo_simplificado.webp
Binary file not shown.
Binary file modified src/assets/images/carousel/portada_1.webp
Binary file not shown.
Binary file modified src/assets/images/carousel/portada_2.webp
Binary file not shown.
Binary file modified src/assets/images/carousel/portada_3.webp
Binary file not shown.
Binary file added src/assets/images/nav/adulto.webp
Binary file not shown.
Binary file added src/assets/images/nav/pediatria.webp
Binary file not shown.
12 changes: 3 additions & 9 deletions src/components/common/footer/footer_content/Rrss.astro
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
---
import logo from "@assets/images/amai_logo.png";
import { Picture } from "astro:assets";
import logo from "@assets/images/amai_logo.webp";
import { Image } from "astro:assets";
import SocialButtons from "./SocialButtons.astro";
---

<div class="w-full md:w-1/3 p-5 xl:p-10 flex flex-col items-center">
<Picture
src={logo}
alt="Centro amai logo"
formats={["webp", "png"]}
fallbackFormat="png"
class="w-52 py-2"
/>
<Image src={logo} alt="Centro amai logo" loading={"lazy"} class="w-52 py-2" />

<div class="text-center">
<p class="text-black text-xs lg:text-sm xl:text-base px-14 md:px-0">
Expand Down
7 changes: 5 additions & 2 deletions src/components/common/navigation/NavMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import {
import { navServicesChild } from "@/utils/servicesSeed";
import NavContentItem from "./item/NavContentItem";

import pediatria from "@assets/images/nav/pediatria.webp";
import adulto from "@assets/images/nav/adulto.webp";

const NavMenu = () => {
const itemClass: string = "px-2";

Expand All @@ -35,7 +38,7 @@ const NavMenu = () => {
<NavContentItem
imageItem={{
title: "Pediatría",
image: "nav/pediatria.jpg",
image: pediatria.src,
imageAlt: "Fondo pediatría",
}}
services={navServicesChild}
Expand All @@ -51,7 +54,7 @@ const NavMenu = () => {
<NavContentItem
imageItem={{
title: "Adulto",
image: "nav/adulto.jpg",
image: adulto.src,
imageAlt: "Fondo adulto",
}}
services={navServicesChild}
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/navigation/NavSection.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";

import LogoNormal from "@assets/images/amai_logo_full.png";
import LogoWhite from "@assets/images/amai_logo_full_white.png";
import LogoNormal from "@assets/images/amai_logo_full.webp";
import LogoWhite from "@assets/images/amai_logo_full_white.webp";

import NavMenu from "./NavMenu";
import SheetHamb from "./SheetHamb";
Expand Down
9 changes: 4 additions & 5 deletions src/components/home/about/AboutSection.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { Picture } from "astro:assets";
import { Image, Picture } from "astro:assets";
import about from "@assets/images/about.jpg";
import about from "@assets/images/about.webp";
---

<!-- Sobre nosotros -->
Expand Down Expand Up @@ -41,11 +41,10 @@ import about from "@assets/images/about.jpg";
</div>

<div class="lg:w-1/2">
<Picture
<Image
src={about}
alt="Acerca de nosotros"
formats={["webp", "jpg"]}
fallbackFormat="jpg"
loading={"lazy"}
class="object-cover 2xl:w-full rounded-t-3xl z-10 md:rounded-3xl mx-auto"
/>
</div>
Expand Down
19 changes: 8 additions & 11 deletions src/components/home/front_carousel/FooterCarousel.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { FaWhatsapp } from "react-icons/fa";
import camila from "@assets/images/equipo/camila_eguiluz.jpg";
import karla from "@assets/images/equipo/karla_lopez.jpg";
import logo from "@assets/images/amai_logo.png";
import logo from "@assets/images/amai_logo.webp";
import { RxDoubleArrowDown } from "react-icons/rx";
import { Picture } from "astro:assets";
import { Image, Picture } from "astro:assets";
---

<div class="flex justify-center md:px-10 xl:px-28 relative">
Expand All @@ -32,23 +32,21 @@ import { Picture } from "astro:assets";
<div
class="w-11 h-11 overflow-hidden rounded-full border-2 border-caqua"
>
<Picture
<Image
src={camila}
alt="Imagen camila"
formats={["webp", "jpg"]}
fallbackFormat="jpg"
loading={"eager"}
class="object-cover"
/>
</div>

<div
class="w-11 h-11 overflow-hidden rounded-full border-2 border-caqua -translate-x-3"
>
<Picture
<Image
src={karla}
alt="Imagen karla"
formats={["webp", "jpg"]}
fallbackFormat="jpg"
loading={"eager"}
class="object-cover h-full"
/>
</div>
Expand All @@ -65,11 +63,10 @@ import { Picture } from "astro:assets";
</div>

<div class="text-center py-5 md:py-0">
<Picture
<Image
src={logo}
alt="Centro amai logo"
formats={["webp", "png"]}
fallbackFormat="png"
loading={"eager"}
class="w-28 md:w-14 m-auto"
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/front_carousel/FrontCarouselItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const FrontCarouselItem = ({ item }: { item: CarouselItemType }) => (
<img
src={item.image.src}
alt="Home"
loading="lazy"
loading="eager"
className="object-cover w-full h-[80vh] opacity-90 blur-sm rounded-b-3xl"
/>
<div className="absolute inset-0 bg-gradient-to-br from-cbackground to-transparent opacity-100 rounded-b-3xl"></div>
Expand Down
6 changes: 3 additions & 3 deletions src/components/home/team/Person.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { SocialLinkType } from "@/utils/types";
import Picture from "astro/components/Picture.astro";
import { FaCircle } from "react-icons/fa6";
import SocialLink from "./PersonSocialLink.astro";
import { Image } from "astro:assets";
interface Props {
name: string;
Expand All @@ -21,11 +22,10 @@ const { name, position, photo, socials } = Astro.props;
<div
class="relative hover:scale-105 transition-transform duration-300 ease-in-out w-full h-full"
>
<Picture
<Image
src={photo}
alt=`Foto perfil ${name}`
formats={["webp", "jpg"]}
fallbackFormat="jpg"
loading={"lazy"}
class="object-cover rounded-3xl w-full h-full transform"
/>

Expand Down

0 comments on commit 0e4da9e

Please sign in to comment.