Skip to content

Commit

Permalink
ajout de securité sur les a href
Browse files Browse the repository at this point in the history
  • Loading branch information
Bacati committed Oct 17, 2024
1 parent 78aada0 commit 8c544cf
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/components/global/Cards.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const { title, description, price, imageSrc, lien, logo, typeMotor, typeMotor1 } = Astro.props;
import { Eye } from 'lucide-astro';
---
<a href={lien}>
<a href={lien} rel="noopener noreferrer">
<div class="bg-white flex flex-col justify-center items-center w-80 lg:w-96 p-6 rounded-3xl shadow-lg card slide">
<div class="flex justify-between items-center w-full">
<p class="font-bold text-3xl w-3/4 lg:w-3/5">{title}</p>
Expand Down
2 changes: 1 addition & 1 deletion src/components/global/CardsCate.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
const { title, imageSrc, lien, entreprise } = Astro.props;
---
<a href={lien}>
<a href={lien} rel="noopener noreferrer">
<div class="flex flex-col justify-center items-center w-80 lg:w-96 shadow-lg card-prod my-16 rounded-3xl">
<img src={imageSrc} alt="" class="object-cover w-80 lg:w-96 z-0 card-prod rounded-3xl absolute">
<div class="relative w-full flex justify-end flex-col z-10 rounded-3xl card-prod-text">
Expand Down
4 changes: 2 additions & 2 deletions src/components/global/TemplateConfig.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ChevronDown, ChevronLeft, ChevronRight } from 'lucide-astro';

{images.map((imageSrc, index) => (
<div class={`carousel-item item-${index + 1} flex justify-center items-center absolute top-0 bottom-0 left-0 right-0 opacity-0`}>
<a href={`#item-${(index === 0 ? images.length : index)}`} class="z-30">
<a href={`#item-${(index === 0 ? images.length : index)}`} class="z-30" rel="noopener noreferrer">
<ChevronLeft class="w-10 h-10 cursor-pointer" />
</a>
<div class="lg:w-3/5 flex items-center justify-center">
Expand All @@ -22,7 +22,7 @@ import { ChevronDown, ChevronLeft, ChevronRight } from 'lucide-astro';
</div>
</div>
</div>
<a href={`#item-${(index + 1 === images.length ? 1 : index + 2)}`} class="z-30">
<a href={`#item-${(index + 1 === images.length ? 1 : index + 2)}`} class="z-30" rel="noopener noreferrer">
<ChevronRight class="w-10 h-10 cursor-pointer" />
</a>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/components/layouts/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export interface Props {
<footer class="w-full flex flex-col justify-center items-center py-16">
<div class="bg-white w-10/12 h-1 rounded-3xl"></div>
<div class="w-11/12 flex justify-between gap-8 text-white items-center py-8 pr-0 flex-col lg:flex-row">
<a href="/"><img src="/images/logo.svg"></a>
<a href="mailto:[email protected]"><p class="flex gap-3"><Contact />[email protected]</p></a>
<a href="/mentions-legales">Mentions légales</a>
<a href="https://paypal.me/trouvetapiece" target="_blank" title="paypal" class="flex gap-2"><BadgeEuro />Faire une donnation</a>
<a href="/" rel="noopener noreferrer"><img src="/images/logo.svg"></a>
<a href="mailto:[email protected]" rel="noopener noreferrer"><p class="flex gap-3"><Contact />[email protected]</p></a>
<a href="/mentions-legales" rel="noopener noreferrer">Mentions légales</a>
<a href="https://paypal.me/trouvetapiece" target="_blank" title="paypal" class="flex gap-2" rel="noopener noreferrer"><BadgeEuro />Faire une donnation</a>
<div class="gap-3 flex">
<a href=""><Instagram /></a>
</div>
Expand Down
44 changes: 22 additions & 22 deletions src/components/layouts/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ export interface Props {
<header class="p-8 z-20 absolute w-full">
<nav class="items-center">
<div class="hidden justify-between items-center w-11/12 fixed lg:flex">
<a href="/">
<a href="/" rel="noopener noreferrer">
<Picture src={logo} alt=""></Picture>
</a>
<div class="bg-white rounded-full items-center h-fit justify-center shadow-lg flex">
<a class="pl-4 pr-0 mx-2 text-orange-600 gap-3 flex hover:text-gray-500" href="/categorie/allDays"><Gauge />ALLDAYS</a>
<a class="border-l-2 border-orange-300 pl-4 mx-2 pr-0 text-orange-600 gap-3 flex hover:text-gray-500" href="/categorie/competition"><Trophy />Compétitions</a>
<a class="border-l-2 border-orange-300 pl-4 mx-2 pr-0 text-orange-600 gap-3 flex hover:text-gray-500" href="/categorie/esthetique"><Paintbrush />Esthetique</a>
<a class="border-l-2 border-orange-300 pl-4 mx-2 pr-0 text-orange-600 gap-3 flex hover:text-gray-500" href="/categorie/cycle"><Bike />Cycle</a>
<a class="border-l-2 border-orange-300 pl-4 mx-2 pr-0 text-orange-600 gap-3 flex hover:text-gray-500" href="/"><HardHat />Equipement</a>
<a class="border-l-2 border-orange-300 pl-4 mx-2 pr-0 text-orange-600 gap-3 flex hover:text-gray-500" href="/"><Wrench />Produit / Outillage</a>
<a class="rounded-full bg-amber-600 flex py-3 px-6 gap-3 text-white shadow-2xl hover:bg-black hover:text-white" href="/">Accueil <House /></a>
<a class="pl-4 pr-0 mx-2 text-orange-600 gap-3 flex hover:text-gray-500" href="/categorie/allDays" rel="noopener noreferrer"><Gauge />ALLDAYS</a>
<a class="border-l-2 border-orange-300 pl-4 mx-2 pr-0 text-orange-600 gap-3 flex hover:text-gray-500" href="/categorie/competition" rel="noopener noreferrer"><Trophy />Compétitions</a>
<a class="border-l-2 border-orange-300 pl-4 mx-2 pr-0 text-orange-600 gap-3 flex hover:text-gray-500" href="/categorie/esthetique" rel="noopener noreferrer"><Paintbrush />Esthetique</a>
<a class="border-l-2 border-orange-300 pl-4 mx-2 pr-0 text-orange-600 gap-3 flex hover:text-gray-500" href="/categorie/cycle" rel="noopener noreferrer"><Bike />Cycle</a>
<a class="border-l-2 border-orange-300 pl-4 mx-2 pr-0 text-orange-600 gap-3 flex hover:text-gray-500" href="/" rel="noopener noreferrer"><HardHat />Equipement</a>
<a class="border-l-2 border-orange-300 pl-4 mx-2 pr-0 text-orange-600 gap-3 flex hover:text-gray-500" href="/" rel="noopener noreferrer"><Wrench />Produit / Outillage</a>
<a class="rounded-full bg-amber-600 flex py-3 px-6 gap-3 text-white shadow-2xl hover:bg-black hover:text-white" href="/" rel="noopener noreferrer">Accueil <House /></a>
</div>
</div>
<div class="flex justify-between lg:hidden gap-6">
Expand All @@ -31,13 +31,13 @@ export interface Props {
</a>
<div class="bg-white rounded-full mobile">
<div class="relative flex flex-col items-center justify-center">
<a class="mx-4 py-4 bg-amber-600 text-white flex rounded-t-full w-full justify-center cursor-pointer" href="/" title="Accueil"><House /></a>
<a class="mx-2 text-orange-600 flex pt-4 cursor-pointer" href="/categorie/allDays" title="ALLDAYS"><Gauge /></a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 cursor-pointer" href="/categorie/competition" title="Compétitions"><Trophy /></a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 cursor-pointer" href="/categorie/esthetique" title="Esthetique"><Paintbrush /></a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 cursor-pointer" href="/categorie/cycle" title="Cycle"><Bike /></a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 cursor-pointer" href="/" title="Equipement"><HardHat /></a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 cursor-pointer" href="/" title="Produit / Outillage"><Wrench /></a>
<a class="mx-4 py-4 bg-amber-600 text-white flex rounded-t-full w-full justify-center cursor-pointer" href="/" title="Accueil" rel="noopener noreferrer"><House /></a>
<a class="mx-2 text-orange-600 flex pt-4 cursor-pointer" href="/categorie/allDays" title="ALLDAYS" rel="noopener noreferrer"><Gauge /></a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 cursor-pointer" href="/categorie/competition" title="Compétitions" rel="noopener noreferrer"><Trophy /></a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 cursor-pointer" href="/categorie/esthetique" title="Esthetique" rel="noopener noreferrer"><Paintbrush /></a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 cursor-pointer" href="/categorie/cycle" title="Cycle" rel="noopener noreferrer"><Bike /></a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 cursor-pointer" href="/" title="Equipement" rel="noopener noreferrer"><HardHat /></a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 cursor-pointer" href="/" title="Produit / Outillage" rel="noopener noreferrer"><Wrench /></a>
</div>
<input class="hidden" id="panneauDeux" name="equipe" type="radio" checked>
<div id="panneauDeux-panneau" class="flex justify-center z-20 py-4 items-center">
Expand All @@ -49,13 +49,13 @@ export interface Props {
<div class="bg-white h-screen z-50 panneau fixed top-0 right-0 invisible opacity-0" id="panneauUn-panneau">
<label for="panneauDeux" class="menu-closed">
<div class="flex flex-col justify-center">
<a class="py-4 bg-amber-600 text-white flex rounded-b-full w-full justify-center gap-2 text-xl items-center" href="/" title="Accueil"><House /> Accueil</a>
<a class="mx-2 text-orange-600 flex pt-4 gap-2 text-xl items-center" href="/categorie/allDays" title="ALLDAYS"><Gauge />ALLDAYS</a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 gap-2 text-xl items-center" href="/categorie/competition" title="Compétitions"><Trophy />Compétition</a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 gap-2 text-xl items-center" href="/categorie/esthetique" title="Esthetique"><Paintbrush />Esthétique</a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 gap-2 text-xl items-center" href="/categorie/cycle" title="Cycle"><Bike />Cycle</a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 gap-2 text-xl items-center" href="/" title="Equipement"><HardHat />Equipement</a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 gap-2 text-xl items-center" href="/" title="Produit / Outillage"><Wrench />Produit / Outillage</a>
<a class="py-4 bg-amber-600 text-white flex rounded-b-full w-full justify-center gap-2 text-xl items-center" href="/" title="Accueil" rel="noopener noreferrer"><House /> Accueil</a>
<a class="mx-2 text-orange-600 flex pt-4 gap-2 text-xl items-center" href="/categorie/allDays" title="ALLDAYS" rel="noopener noreferrer"><Gauge />ALLDAYS</a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 gap-2 text-xl items-center" href="/categorie/competition" title="Compétitions" rel="noopener noreferrer"><Trophy />Compétition</a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 gap-2 text-xl items-center" href="/categorie/esthetique" title="Esthetique" rel="noopener noreferrer"><Paintbrush />Esthétique</a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 gap-2 text-xl items-center" href="/categorie/cycle" title="Cycle" rel="noopener noreferrer"><Bike />Cycle</a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 gap-2 text-xl items-center" href="/" title="Equipement" rel="noopener noreferrer"><HardHat />Equipement</a>
<a class="mx-2 pr-0 text-orange-600 flex pt-4 gap-2 text-xl items-center" href="/" title="Produit / Outillage" rel="noopener noreferrer"><Wrench />Produit / Outillage</a>
<ChevronsRight class="text-orange-600 my-4 mx-2"/>
</div>
</label>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/categorie/allDays.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { categories } from 'libs/configurations';
class="mx-2 my-6 text-lg gap-3 flex items-center rounded-3xl py-2 px-6 justify-center categorie text-orange-600"
href={`#${category.id}`}
data-category={category.id}
rel="noopener noreferrer"
>
<img src={category.source} /> {category.label}
</a>
Expand All @@ -48,7 +49,7 @@ import { categories } from 'libs/configurations';
</div>
))}

<a class="bg-orange-500 z-30 fixed right-14 p-4 bottom-8 rounded-full w-16 h-16 m-0 flex items-center" href="#top">
<a class="bg-orange-500 z-30 fixed right-14 p-4 bottom-8 rounded-full w-16 h-16 m-0 flex items-center" href="#top" rel="noopener noreferrer">
<MoveUp class="h-10 w-10 text-white" />
</a>
</main>
Expand Down
5 changes: 3 additions & 2 deletions src/pages/categorie/competition.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import { categories } from 'libs/configCompetition';
<a
class="mx-2 my-6 text-lg gap-3 flex items-center rounded-3xl py-2 px-6 justify-center categorie text-orange-600"
href={`#${category.id}`}
data-category={category.id}
data-category={category.id}
rel="noopener noreferrer"
>
{category.label} <p class="font-bold">CC</p>
</a>
Expand All @@ -48,7 +49,7 @@ import { categories } from 'libs/configCompetition';
</div>
))}

<a class="bg-orange-500 z-30 fixed right-14 p-4 bottom-8 rounded-full w-16 h-16 m-0 flex items-center" href="#top">
<a class="bg-orange-500 z-30 fixed right-14 p-4 bottom-8 rounded-full w-16 h-16 m-0 flex items-center" href="#top" rel="noopener noreferrer">
<MoveUp class="h-10 w-10 text-white" />
</a>
</main>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/categorie/cycle.astro
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import { MoveUp } from 'lucide-astro';
/>
</div>

<a class="bg-orange-500 z-30 fixed right-14 p-4 bottom-8 rounded-full w-16 h-16 m-0 flex items-center" href="#top">
<a class="bg-orange-500 z-30 fixed right-14 p-4 bottom-8 rounded-full w-16 h-16 m-0 flex items-center" href="#top" rel="noopener noreferrer">
<MoveUp class="h-10 w-10 text-white" />
</a>
</main>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/categorie/esthetique.astro
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import { MoveUp } from 'lucide-astro';
</div>
</div>

<a class="bg-orange-500 z-30 fixed right-14 p-4 bottom-8 rounded-full w-16 h-16 m-0 flex items-center" href="#top">
<a class="bg-orange-500 z-30 fixed right-14 p-4 bottom-8 rounded-full w-16 h-16 m-0 flex items-center" href="#top" rel="noopener noreferrer">
<MoveUp class="h-10 w-10 text-white" />
</a>
</main>
Expand Down

0 comments on commit 8c544cf

Please sign in to comment.