Skip to content

Commit

Permalink
feat: improve css and metas
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor de la Fouchardiere committed Jan 23, 2024
1 parent 9ccd8c4 commit 8e756c9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/deliveroo/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Home = () => {
<GoogleAnalytics gaId={METAS.GA_ID} />
<div
style={{ backgroundImage: METAS.MAIN_BACKGROUND_URL }}
className="min-h-screen flex flex-col justify-center items-center bg-white flex-1 bg-cover bg-no-repeat bg-center"
className="min-h-dvh flex flex-col justify-center items-center bg-white flex-1 bg-cover bg-no-repeat bg-center"
>
<div>
<div className="px-10 flex flex-col items-center gap-y-2">
Expand Down
10 changes: 6 additions & 4 deletions apps/frichti-market/metas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export const SPONSOR_LINK: string = 'https://www.frichtimarket.com/r/NDQyMDE5'
// Amount in euros users will earn for their first delivery
export const AMOUNT_IN_EUROS: number = 10

// The minimum order to avoid delivery charges
export const AMOUNT_FOR_FREE_DELIVERY: number = 50

// The minimum of order required from the user
export const MINIMUM_AMOUNT_IN_EUROS_TO_USE: number = 10

Expand All @@ -33,9 +36,9 @@ export const MAIN_BACKGROUND_URL: string = "url('/main-background.webp')"
export const TITLE: string = `Code promo de ${AMOUNT_IN_EUROS}€ offert sur ${PRODUCT_NAME} en ${CURRENT_YEAR}`

// The homepage meta description
export const DESCRIPTION: string = `Offre de ${AMOUNT_IN_EUROS}€ de promotion sur ${FOR_NUMBER_OF_COMMANDS > 1 ? `vos ${FOR_NUMBER_OF_COMMANDS} premières commandes` : 'votre 1ère commande'} sur le site ${PRODUCT_NAME} · Livraison gratuite dès 50€ d'achat · Parrainage: ${AMOUNT_IN_EUROS}€ offerts.`
export const DESCRIPTION: string = `Offre de ${AMOUNT_IN_EUROS}€ de promotion sur ${FOR_NUMBER_OF_COMMANDS > 1 ? `vos ${FOR_NUMBER_OF_COMMANDS} premières commandes` : 'votre 1ère commande'} sur le site ${PRODUCT_NAME} · Livraison gratuite dès ${AMOUNT_FOR_FREE_DELIVERY}€ d'achat · Parrainage: ${AMOUNT_IN_EUROS}€ offerts.`

// Google Analytics ID
// Google Analytics ID, can be empty
export const GA_ID: string = 'G-GJGLYTKB81'

// Theme color
Expand Down Expand Up @@ -99,8 +102,7 @@ export const FAQ: FaqProps['faq'] = [
},
{
question: `Quels sont les frais de livraison sur ${PRODUCT_NAME} ?`,
answer:
"Les frais de livraison sont d'environ 1.99€ par commande. Ils deviennent gratuit après 50€ d'achat."
answer: `Les frais de livraison sont d'environ 1.99€ par commande. Ils deviennent gratuit après ${AMOUNT_FOR_FREE_DELIVERY}€ d'achat.`
},
{
question: `En savoir plus sur ${PRODUCT_NAME}`,
Expand Down
6 changes: 3 additions & 3 deletions apps/frichti-market/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import * as METAS from '../../metas'
const Home = () => {
return (
<>
<GoogleAnalytics gaId={METAS.GA_ID} />
{METAS.GA_ID ? <GoogleAnalytics gaId={METAS.GA_ID} /> : null}
<div
style={{ backgroundImage: METAS.MAIN_BACKGROUND_URL }}
className="min-h-screen flex flex-col justify-center items-center bg-main flex-1 bg-cover bg-no-repeat bg-center"
className="min-h-dvh flex flex-col justify-center items-center bg-main flex-1 bg-cover bg-no-repeat bg-center"
>
<div>
<div className="px-10 flex flex-col items-center gap-y-2">
Expand Down Expand Up @@ -43,7 +43,7 @@ const Home = () => {
en cliquant sur le bouton ci-dessous
</div>
<a
className="text-center bg-black text-white p-4 rounded-full block"
className="text-center bg-black text-white p-4 md:rounded-full block shadow-lg"
href={METAS.SPONSOR_LINK}
title={`Aller sur ${METAS.PRODUCT_NAME}`}
target="_blank"
Expand Down
11 changes: 9 additions & 2 deletions tasks/create-sponsor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function start() {
return
}

productName = productName.toLowerCase()
productName = productName.toLowerCase().replaceAll(' ', '-').trim()

rl.close()

Expand Down Expand Up @@ -70,7 +70,14 @@ async function start() {
)

// eslint-disable-next-line no-console
console.log('\x1b[32m', `Run 'pnpm i'`)
console.log(
'\x1b[32m',
`/apps/${productName} next.js app successfully created !`
)
console.log(
'\x1b[32m',
`Run the following command to install deps : 'pnpm i'`
)
}

start()

0 comments on commit 8e756c9

Please sign in to comment.