From 3f3387b1d1ca638c5214917cd203bb1240b0b5db Mon Sep 17 00:00:00 2001 From: Skydust Date: Tue, 29 Aug 2023 22:49:51 +0200 Subject: [PATCH] Updated the website --- assets/img/logo.png | Bin 4624 -> 0 bytes components/blocks-renderer.tsx | 3 + components/blocks/anchoring.tsx | 50 ----------------- components/blocks/carousel.tsx | 36 ++++++++++++ components/blocks/content.tsx | 4 +- components/blocks/features.tsx | 3 +- components/blocks/hero.tsx | 4 +- components/blocks/testimonial.tsx | 4 +- components/layout/footer/footer.tsx | 3 +- components/layout/header.tsx | 6 +- components/layout/layout.tsx | 3 +- components/util/anchoring.tsx | 83 +++++++++++++++++++++++++++ components/util/icon.tsx | 8 ++- content/global/index.json | 13 ++--- content/pages/about.md | 84 +++++++++++++++++++++++++++- content/pages/home.md | 19 ++++++- public/logo.png | Bin 0 -> 80547 bytes public/tina.svg | 6 -- public/uploads/Diagram.png | Bin 95030 -> 0 bytes public/uploads/llama-2.avif | Bin 108817 -> 0 bytes public/uploads/llama-3.avif | Bin 153786 -> 0 bytes public/uploads/llama-4.avif | Bin 162105 -> 0 bytes public/uploads/llama-5.avif | Bin 544871 -> 0 bytes public/uploads/llama-6.avif | Bin 107378 -> 0 bytes public/uploads/logo.png | Bin 4624 -> 80547 bytes public/uploads/photo.jpg | Bin 0 -> 527993 bytes public/zeit.svg | 10 ---- styles/anchoring.css | 14 ++++- styles/carousel.css | 7 +++ styles/header.css | 24 +++++++- styles/styles.css | 5 +- tina/config.tsx | 71 +++-------------------- tina/tina-lock.json | 2 +- 33 files changed, 297 insertions(+), 165 deletions(-) delete mode 100644 assets/img/logo.png delete mode 100644 components/blocks/anchoring.tsx create mode 100644 components/blocks/carousel.tsx create mode 100644 components/util/anchoring.tsx create mode 100644 public/logo.png delete mode 100644 public/tina.svg delete mode 100644 public/uploads/Diagram.png delete mode 100644 public/uploads/llama-2.avif delete mode 100644 public/uploads/llama-3.avif delete mode 100644 public/uploads/llama-4.avif delete mode 100644 public/uploads/llama-5.avif delete mode 100644 public/uploads/llama-6.avif create mode 100644 public/uploads/photo.jpg delete mode 100644 public/zeit.svg create mode 100644 styles/carousel.css diff --git a/assets/img/logo.png b/assets/img/logo.png deleted file mode 100644 index 8a3f756d6a694d0bfbbb3fb8d8a3a4ea3f807d95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4624 zcmaJ_c|4Ts`yTtAHEB%DnbKmLF-S8EF=Nek7+I2xG4`2}84P7j%1#PHII<+Wkc#X} zwnU+_qj&c@Y4bj${V{Sf7Y>1*6Gc1n_xzm>eDkI}cVt$Sa&zQc+fv1;b%*1t<&-RZx~wP(UifkqV07zaPk9 zH7`deq!~u%?^=f^6vTx}^+ZCUzP`TlzKZf>FK4I%0)hC+0f);SX2?@3sc~@6Qq=F6_p{#X5NkK_L zML|Iut*N32*M`FsG_}xhMWqXfUswzo?@c6-sK2m||HUf*PwY=O5IqkoV+dZZJ_JV{ zFESDQXV*yAf6=0(sDM$%sOTst!Os7?mcOu$|DxqD>;>5W#6l0nK!48m|IGSV=+Hnv zxBocz@bHiK38X{AdmTDEK$N!$05}q&kI}@^hP$n~;w=W~j9$d{xbMW^Sn2o8aiyMd zzGnhp55b2K5CexScIM}%DJfoVVPXz2Cq0KJ^oT|_T@bv(N?&C9RJl-_X2et{gh?=d zOb7T<+&^o(dSdyZ;txMe*v7_Nf;qf&VQ?{Ub&SIJ2A%j3@I%VX;5imL*~(KKtDE`Q zUv1)Uk&U7Ce8i<^&*2+pwpx|32FeqDFh7Sd!}NlL`8QX@uNIOPa&0ngx#JAR;r(vc zwvwoEmxbgcHGXTzOezriuSZZ(bYnzf>O4!H)Xpvn^BroGgjCZUturjM@QC?u{ zP6ch@HFgcCyG}L1K9mc$LpfWaHZ4~j80#ZX?A{jzuC~Qq7B*{g{ggLR(GYF{avZw==_iB;uqLbq?q>Kw4T>r(>-68 zjXn#MrgqQ20UQ-4SGKOuMMf{GdJ6M|d~y|OdAKYc+(y5xX%3YnZ@MXI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n zT$Q@&e94j}*3|8jN;?C~#&J{1%Se;erR>GxXWslFo1|h<>296Yn3EjO;>(0{`_`VS z^48qwig|BT8&pMAh*&=5b{ZR^S6UWx?qX~28oNYG+t+=yn(5g>=<9;+EU13zQ7alX zE@(%XCt)aKK^&_%U3$|)P-rF_JbeA&rR!|a;%U3Ok!72jdpib6h|vGlGMsU|VE;S=`cY3 zK@Zrh&OBT1>&`>}gmLAEDPK~u)jh~=*S&$>_jnn_!^oN9;*ITdpYyAU%3YFnQ+fQ? zayd#dgLWU_u&bF|hzMWNg^&ocJ$fhN?!nX%fwK=DEMTANw#S$n8Uzk%7R1w}!>v?MnIaM2tqaOq6Eri5vNAhU&LfwecL#iUAPMRRIrT7K=mQa{C3E~q2(;K7fVYqq7y zwH2ck+dZNy?eF~dcQ{X#zA)1hVaXyn9dSJsvXI`b;VSd)(o@uhu`&-~ljRq~vh@0l z6mu0b{ElG3EPfzAAr=Fl7Q5FT`6A#^YP)aGmO~m@_w_s%?+q@QO#Mlp`#0uML9?y= zCTHHlBj@OxeF8o?$CKg1m}rHXs)o-!-Dfq_^ZT9$IQ6(ap3b!FzbNv}`rIJ%o!zJr zK$9Nq`RRvNdc(!JYVSxw1$q7o9@tANyM-By&RJwncGfT|{%qs@*S$W91zcz?_gqhL znWLwLcu(dZPfMj2tj8CM+4hY02B>#N4{zsR2ASVtd6W^%dCww7C@O&_A~U$Z2w-Xj zE>NeULIu<7b}1@YeSW8#*A-1Fvq;sNj_}u8NBEsGH8lj#;~%C=ZC|B?=~Vt6#IBv`fO#&91~|V+D&6lGVR!#572pyj zvJy${D)#P}R)$~qkhP;AN8fW$7}rph2bG!II>m#!8Ho@J7mVdt$?kV!CXL0#AXYKJ Y9=kz%<|&K#pZ{p|wT&?)TK1v;0X(&4`Tzg` diff --git a/components/blocks-renderer.tsx b/components/blocks-renderer.tsx index fa52f9d..ac26ec2 100644 --- a/components/blocks-renderer.tsx +++ b/components/blocks-renderer.tsx @@ -4,6 +4,7 @@ import { Features } from "./blocks/features"; import { Hero } from "./blocks/hero"; import { Testimonial } from "./blocks/testimonial"; import { tinaField } from "tinacms/dist/react"; +import {Carousel} from "./blocks/carousel"; export const Blocks = (props: Omit) => { return ( @@ -31,6 +32,8 @@ const Block = (block: PageBlocks) => { return ; case "PageBlocksTestimonial": return ; + case "PageBlocksCarousel": + return ; default: return null; } diff --git a/components/blocks/anchoring.tsx b/components/blocks/anchoring.tsx deleted file mode 100644 index bd18732..0000000 --- a/components/blocks/anchoring.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import * as React from "react"; -import {useEffect, useRef, useState} from "react"; - -interface AnchoringProps { - text: string, // Default: Découvrez-en plus ! - linkTo: string // Default: #main-page -} - -export const Anchoring = ({ data }: { data: AnchoringProps }) => { - const [opacity, setOpacity] = useState(1); - const anchoringRef = useRef(null); - - const handleScroll = () => { - const scrollTop = window.scrollY || window.pageYOffset; - const elementHeight = anchoringRef.current.clientHeight; - const newOpacity = (elementHeight - scrollTop) / elementHeight; - setOpacity(newOpacity); - }; - - useEffect(() => { - handleScroll(); // Initialize opacity on mount - - window.addEventListener('scroll', handleScroll); - - return () => { - window.removeEventListener('scroll', handleScroll); - }; - }, []); - - const anchoringStyle = { - opacity: opacity, - transition: 'opacity 0.3s', // You can add a transition for a smooth effect - }; - - return ( - - ); -}; diff --git a/components/blocks/carousel.tsx b/components/blocks/carousel.tsx new file mode 100644 index 0000000..1c5249f --- /dev/null +++ b/components/blocks/carousel.tsx @@ -0,0 +1,36 @@ +import * as React from "react"; +import { Section } from "../util/section"; +import {PageBlocksCarousel} from "../../tina/__generated__/types"; +import {Anchoring, anchoringSchema} from "../util/anchoring"; +import {Template} from "tinacms"; + +export const Carousel = ({ data }: { data: PageBlocksCarousel }) => { + return ( +
+
+ { data?.link?.enabled && } +
+
); +}; + +const defaultCarousel = "Here's Another Feature"; + +export const carouselBlockSchema: Template = { + name: "carousel", + label: "Carousel", + ui: { + previewSrc: "/blocks/features.png", + defaultItem: [defaultCarousel, defaultCarousel, defaultCarousel], + }, + fields: [ + { + type: "image", + label: "Images du carousel", + name: "images", + list: true, + }, + { + ...anchoringSchema + } + ], +}; diff --git a/components/blocks/content.tsx b/components/blocks/content.tsx index e0ccdf4..c52e8f8 100644 --- a/components/blocks/content.tsx +++ b/components/blocks/content.tsx @@ -2,7 +2,7 @@ import React from "react"; import { Container } from "../util/container"; import { Section } from "../util/section"; import { TinaMarkdown } from "tinacms/dist/rich-text"; -import type { TinaTemplate } from "tinacms"; +import type {Template, TinaTemplate} from "tinacms"; import { PageBlocksContent } from "../../tina/__generated__/types"; import { tinaField } from "tinacms/dist/react"; @@ -23,7 +23,7 @@ export const Content = ({ data }: { data: PageBlocksContent }) => { ); }; -export const contentBlockSchema: TinaTemplate = { +export const contentBlockSchema: Template = { name: "content", label: "Content", ui: { diff --git a/components/blocks/features.tsx b/components/blocks/features.tsx index 70c59fa..11a2c01 100644 --- a/components/blocks/features.tsx +++ b/components/blocks/features.tsx @@ -7,6 +7,7 @@ import { PageBlocksFeaturesItems, } from "../../tina/__generated__/types"; import { tinaField } from "tinacms/dist/react"; +import {Template} from "tinacms"; export const Feature = ({ featuresColor, @@ -74,7 +75,7 @@ const defaultFeature = { }, }; -export const featureBlockSchema = { +export const featureBlockSchema: Template = { name: "features", label: "Features", ui: { diff --git a/components/blocks/hero.tsx b/components/blocks/hero.tsx index c99b027..048eaef 100644 --- a/components/blocks/hero.tsx +++ b/components/blocks/hero.tsx @@ -3,7 +3,7 @@ import { Actions } from "../util/actions"; import { Container } from "../util/container"; import { Section } from "../util/section"; import { TinaMarkdown } from "tinacms/dist/rich-text"; -import type { TinaTemplate } from "tinacms"; +import type {Template, TinaTemplate} from "tinacms"; import { PageBlocksHero } from "../../tina/__generated__/types"; import { tinaField } from "tinacms/dist/react"; @@ -85,7 +85,7 @@ export const Hero = ({ data }: { data: PageBlocksHero }) => { ); }; -export const heroBlockSchema: TinaTemplate = { +export const heroBlockSchema: Template = { name: "hero", label: "Hero", ui: { diff --git a/components/blocks/testimonial.tsx b/components/blocks/testimonial.tsx index 4a572c8..5e90aea 100644 --- a/components/blocks/testimonial.tsx +++ b/components/blocks/testimonial.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Container } from "../util/container"; import { Section } from "../util/section"; -import type { TinaTemplate } from "tinacms"; +import type {Template, TinaTemplate} from "tinacms"; import { PageBlocksTestimonial } from "../../tina/__generated__/types"; import { tinaField } from "tinacms/dist/react"; @@ -61,7 +61,7 @@ export const Testimonial = ({ data }: { data: PageBlocksTestimonial }) => { ); }; -export const testimonialBlockSchema: TinaTemplate = { +export const testimonialBlockSchema: Template = { name: "testimonial", label: "Testimonial", ui: { diff --git a/components/layout/footer/footer.tsx b/components/layout/footer/footer.tsx index 480a3a5..7372d09 100644 --- a/components/layout/footer/footer.tsx +++ b/components/layout/footer/footer.tsx @@ -4,9 +4,8 @@ import { FaFacebookF, FaGithub, FaTwitter } from "react-icons/fa"; import { AiFillInstagram } from "react-icons/ai"; import { Container } from "../../util/container"; import { RawRenderer } from "./rawRenderer"; -import { Icon } from "../../util/icon"; -export const Footer = ({ data, icon, rawData }) => { +export const Footer = ({ data, rawData }) => { const socialIconClasses = "h-7 w-auto"; const socialIconColorClasses = { blue: "text-blue-500 dark:text-blue-400 hover:text-blue-300", diff --git a/components/layout/header.tsx b/components/layout/header.tsx index 7e70f6d..fbd4acc 100644 --- a/components/layout/header.tsx +++ b/components/layout/header.tsx @@ -1,20 +1,20 @@ import React from "react"; import Link from "next/link"; import { tinaField } from "tinacms/dist/react"; -import defaultLogo from "../../assets/img/logo.png"; +import defaultLogo from "../../public/logo.png"; import {GlobalHeader} from "../../tina/__generated__/types"; export const Header = ({ data }: { data: GlobalHeader }) => { return (