diff --git a/.vscode/settings.json b/.vscode/settings.json index 60972d0..58ff454 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,4 @@ { - "typescript.tsdk": "node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib", + "typescript.tsdk": "node_modules\\.pnpm\\typescript@4.9.5\\node_modules\\typescript\\lib", "typescript.enablePromptUseWorkspaceTsdk": true -} +} \ No newline at end of file diff --git a/app/page.tsx b/app/page.tsx index 35289f2..d38a8a7 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,15 +1,46 @@ +'use client'; + import AppLink from '@/ui/AppLink'; +import { HtmlHTMLAttributes, useEffect } from 'react'; + export default function Home() { + useEffect(() => { + let visible:boolean = true; + let animation:boolean = true; //TODO ajouter un bouton pour arreter l'animation + let con: HTMLElement | null = document.getElementById('console'); + window.setInterval(function() { + if(con !== null && visible === true && animation === true){ + con.className = 'console invisible'; + visible = false; + }else if(con !== null && animation ===true){ + con.className = 'console'; + visible = true; + } + }, 400); + let word:HTMLElement | null = document.getElementById('text') + let text: string= "Peer-at-Code"; + for (let i:number = 0; i < text.length; i++) { + setTimeout(function(){ + if(word !== null) + word.innerHTML += text.charAt(i); + }, 410 * i ) + } + } , []); return (