diff --git a/.vscode/settings.json b/.vscode/settings.json index 5a976ad..7a73a41 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,2 @@ { - "workbench.colorCustomizations": { - "activityBar.background": "#521342", - "titleBar.activeBackground": "#731B5D", - "titleBar.activeForeground": "#FDF8FC" - } } \ No newline at end of file diff --git a/components/Footer.tsx b/components/Footer.tsx index 472dc2d..d894ab2 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -23,11 +23,9 @@ const Footer = () => {
-
-

Thé Tip Top © 2022 - projet fictif pour lequel aucun réel - achat ou aucune réservation ne pourrait être effectué.

+

Thé Tip Top © 2022 - projet fictif pour lequel aucun réel + achat ou aucune réservation ne pourrait être effectué.

diff --git a/package-lock.json b/package-lock.json index 5325928..29a3213 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,6 @@ "next": "13.0.2", "next-auth": "4.16.4", "nodemailer": "^6.8.0", - "nprogress": "^0.2.0", "react": "18.2.0", "react-dom": "18.2.0", "react-hook-form": "^7.39.2", @@ -28,7 +27,6 @@ "react-markdown": "8.0.3", "react-spinners": "^0.13.7", "react-toastify": "^9.1.1", - "usehooks-ts": "^2.9.1", "yup": "^0.32.11", "yup-phone": "^1.3.2" }, @@ -2419,11 +2417,6 @@ "which": "bin/which" } }, - "node_modules/nprogress": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz", - "integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==" - }, "node_modules/oauth": { "version": "0.9.15", "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", @@ -3519,19 +3512,6 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/usehooks-ts": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/usehooks-ts/-/usehooks-ts-2.9.1.tgz", - "integrity": "sha512-2FAuSIGHlY+apM9FVlj8/oNhd+1y+Uwv5QNkMQz1oSfdHk4PXo1qoCw9I5M7j0vpH8CSWFJwXbVPeYDjLCx9PA==", - "engines": { - "node": ">=16.15.0", - "npm": ">=8" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -5322,11 +5302,6 @@ } } }, - "nprogress": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz", - "integrity": "sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==" - }, "oauth": { "version": "0.9.15", "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", @@ -6051,12 +6026,6 @@ "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", "requires": {} }, - "usehooks-ts": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/usehooks-ts/-/usehooks-ts-2.9.1.tgz", - "integrity": "sha512-2FAuSIGHlY+apM9FVlj8/oNhd+1y+Uwv5QNkMQz1oSfdHk4PXo1qoCw9I5M7j0vpH8CSWFJwXbVPeYDjLCx9PA==", - "requires": {} - }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", diff --git a/package.json b/package.json index b4bd3c0..53365ac 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "next": "13.0.2", "next-auth": "4.16.4", "nodemailer": "^6.8.0", - "nprogress": "^0.2.0", "react": "18.2.0", "react-dom": "18.2.0", "react-hook-form": "^7.39.2", @@ -31,7 +30,6 @@ "react-markdown": "8.0.3", "react-spinners": "^0.13.7", "react-toastify": "^9.1.1", - "usehooks-ts": "^2.9.1", "yup": "^0.32.11", "yup-phone": "^1.3.2" }, diff --git a/pages/mon-compte.tsx b/pages/mon-compte.tsx index 0800b8f..c7c7ad4 100644 --- a/pages/mon-compte.tsx +++ b/pages/mon-compte.tsx @@ -26,8 +26,6 @@ import Link from "next/link"; import { TfiInfoAlt } from 'react-icons/tfi' import { TfiGift } from 'react-icons/tfi' - - import { toast } from "react-toastify"; import { Token } from "nodemailer/lib/xoauth2"; import { isGeneratorFunction } from "util/types"; @@ -35,7 +33,6 @@ import { UserProps } from "../types/user"; import { UserGainProps } from "../types/userGain"; import { Gain, Produit, User } from "@prisma/client"; - type FormData = { email: string; name: string; @@ -172,12 +169,9 @@ const MonCompte = (props: Props) => { -
-
-

@@ -185,14 +179,12 @@ const MonCompte = (props: Props) => {
-
-
@@ -200,7 +192,6 @@ const MonCompte = (props: Props) => {
{errors.name?.message}
-
@@ -208,7 +199,6 @@ const MonCompte = (props: Props) => {
{errors.surname?.message}
-
@@ -216,7 +206,6 @@ const MonCompte = (props: Props) => {
{errors.address?.message}
-
@@ -224,7 +213,6 @@ const MonCompte = (props: Props) => {
{errors.zipCode?.message}
-
@@ -232,7 +220,6 @@ const MonCompte = (props: Props) => {
{errors.phoneNumber?.message}
-
-
@@ -273,19 +259,8 @@ const MonCompte = (props: Props) => { }
- -
- - - - - - - -
-
) diff --git a/pages/tout-savoir.tsx b/pages/tout-savoir.tsx index 86a5905..a850f0c 100644 --- a/pages/tout-savoir.tsx +++ b/pages/tout-savoir.tsx @@ -4,7 +4,7 @@ import Head from "next/head"; import style from '../styles/ToutSavoir.module.css' -import test from '../public/images/coffret-the-PhotoRoom.webp'; +import test from '../public/images/tea-with-three-jars.webp'; import prisma from "../lib/prisma"; import Link from "next/link"; @@ -56,7 +56,7 @@ const ToutSavoir = ({ produits }: Props) => {

Le gros lot

- Image + Image
En participant au moins une fois à notre jeu concours, vous vous qualifiez pour gagner le gros lot : 1 an de thé d'une valeur de 360€ ! @@ -67,16 +67,19 @@ const ToutSavoir = ({ produits }: Props) => { return
- produit + produit
-
+
{produit.nomProduit}
-

Some quick example text to build on the card title and make up the bulk of the card's content.

+

{produit.description} +
+ Prix conseillé : {produit.prixTtc} € +

diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 30b8351..1d0de67 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -53,7 +53,7 @@ model User { updatedAt DateTime @updatedAt @map(name: "updated_at") accounts Account[] sessions Session[] - gains Gain[] + gains Gain[] role Role @default(USER) @@map(name: "users") @@ -77,11 +77,12 @@ model Gain { } model Produit { - id Int @id @default(autoincrement()) - nomProduit String? - prixTtc Int? - image String? - refGain Gain[] + id Int @id @default(autoincrement()) + nomProduit String? + prixTtc Int? + image String? + description String? + refGain Gain[] } enum Role { diff --git a/prisma/seed/produits.ts b/prisma/seed/produits.ts index a3558f1..58cae52 100644 --- a/prisma/seed/produits.ts +++ b/prisma/seed/produits.ts @@ -1,28 +1,33 @@ import { Prisma } from "@prisma/client"; export const produitsData: Prisma.ProduitCreateInput[] = [ - { - nomProduit: 'Grand coffret découverte', - prixTtc: 69, - image: '/images/cadeau.webp', - }, - { - nomProduit: 'Coffret découverte', - prixTtc: 39, - image: '/images/cadeau.webp', - }, - { - nomProduit: 'Thé signature', - prixTtc: 10, - image: '/images/cadeau.webp', - }, - { - nomProduit: 'Thé détox', - prixTtc: 6, - image: '/images/cadeau.webp', - }, - { - nomProduit: 'Infuseur à thé', - prixTtc: 3, - image: '/images/cadeau.webp', - }] + { + nomProduit: 'Grand coffret découverte', + prixTtc: 69, + image: '/images/coffret-degustation.webp', + description: "Une version XXL de notre fameux coffret découverte. Faites découvrir à vos invités leur saveur de thé préféré !" + }, + { + nomProduit: 'Coffret découverte', + prixTtc: 39, + image: '/images/coffret-degustation2.webp', + description: "Ce coffret élégant vous permettra de découvrir les différentes saveurs de la gamme de Thé Tip Top. Offrez à votre palais de nouveaux horizons de saveurs. Découvrez avec ce coffret votre parfum préféré !" + }, + { + nomProduit: 'Thé signature', + prixTtc: 10, + image: '/images/the-signature.webp', + description: "Le grand incontournable de notre gamme, le thé signature représente ce que Thé Tip Top souhaite vous transmettre : plus qu'un goût subtil et savoureux, c'est une expérience de saveur qui s'ouvre à vous !" + }, + { + nomProduit: 'Thé détox', + prixTtc: 6, + image: '/images/the-detox.webp', + description: "Notre thé détox soutient l’élimination des déchets et purifie le corps des toxines accumulées. Il lutte contre la rétention d’eau. Pour chasser les toxines, il n’y a pas mieux !" + }, + { + nomProduit: 'Infuseur à thé', + prixTtc: 3, + image: '/images/infuseur.webp', + description: "Préparer un bon thé chaud ou glacé de façon rapide et ludique. Profiter d'une infusion parfaite : L’infuseur permet aux feuilles de thé de se déployer librement, pleinement et de libérer ainsi toutes les molécules aromatiques au contact de l’eau. " + }] diff --git a/styles/NavBar.module.css b/styles/NavBar.module.css index 957946c..1eeb5d0 100644 --- a/styles/NavBar.module.css +++ b/styles/NavBar.module.css @@ -21,7 +21,6 @@ bottom: 100%; position: fixed; z-index: 9001; - top: 0; left: 0; background-color: rgb(0, 0, 0); @@ -70,9 +69,6 @@ } @media screen and (max-height: 450px) { - - - .overlay a { font-size: 20px } diff --git a/styles/ToutSavoir.module.css b/styles/ToutSavoir.module.css index a285670..814ada7 100644 --- a/styles/ToutSavoir.module.css +++ b/styles/ToutSavoir.module.css @@ -1,8 +1,31 @@ .aCard { - width:200px; + /* width:200px; */ + max-width: 300px; } + .aCard img { - width:fit-content; + width: fit-content; block-size: -moz-fit-content; max-width: 100%; +} + +.aCard img, +.grosLot img { + height: fit-content; +} + +.grosLot img { + border-radius: 0.375rem; +} + +@media (min-width: 992px) { + .explicationContainer { + --padding-x: 15%; + padding-left: var(--padding-x); + padding-right: var(--padding-x); + } + + .aCard div { + min-height: 205px; + } } \ No newline at end of file diff --git a/styles/globals.css b/styles/globals.css index 9357659..feec989 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -8,7 +8,7 @@ body { font-size: small; } -body{ +body { background-image: url(/images/pageprincipale.webp); background-size: cover; background-position: 50% 50%; @@ -16,14 +16,22 @@ body{ background-attachment: fixed; } -.layout-container{ - display : table; +@media (min-width: 992px) { + + html, + body { + font-size: medium; + } +} + +.layout-container { + display: table; width: 100%; - position:relative; - min-height:100vh; + position: relative; + min-height: 100vh; } -.body-content{ +.body-content { display: table-row-group; } @@ -55,4 +63,8 @@ a:hover { --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--color2); --bs-btn-disabled-border-color: var(--color2); +} + +.link { + text-decoration: underline; } \ No newline at end of file