diff --git a/package.json b/package.json deleted file mode 100644 index b41b258..0000000 --- a/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "frontend", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview", - "setup": "node ./contentful/setup.cjs" - }, - "dependencies": { - "@contentful/rich-text-react-renderer": "^15.17.0", - "@emotion/react": "^11.11.1", - "@emotion/styled": "^11.11.0", - "@fontsource/roboto": "^5.0.3", - "@mui/material": "^5.13.5", - "contentful": "^10.2.4", - "contentful-import": "^8.5.57", - "dotenv": "^16.1.4", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-router-dom": "^6.12.1" - }, - "devDependencies": { - "@types/react": "^18.0.37", - "@types/react-dom": "^18.0.11", - "@typescript-eslint/eslint-plugin": "^5.59.0", - "@typescript-eslint/parser": "^5.59.0", - "@vitejs/plugin-react": "^4.0.0", - "eslint": "^8.38.0", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.3.4", - "typescript": "^5.0.2", - "vite": "^4.3.9" - } -} diff --git a/public/.gitkeep b/public/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/public/_redirects b/public/_redirects deleted file mode 100644 index 7797f7c..0000000 --- a/public/_redirects +++ /dev/null @@ -1 +0,0 @@ -/* /index.html 200 diff --git a/src/App.css b/src/App.css deleted file mode 100644 index b9d355d..0000000 --- a/src/App.css +++ /dev/null @@ -1,42 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/src/App.tsx b/src/App.tsx deleted file mode 100644 index 86d7075..0000000 --- a/src/App.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import "./App.css"; -import Page from "./containers/Page/Page"; -import { LandingPageSkeleton } from "../types/contentful"; -import { Entry, createClient } from "contentful"; -import MainNav from "./containers/MainNav/MainNav"; -import { useEffect, useState } from "react"; -import { createBrowserRouter, RouterProvider } from "react-router-dom"; - -function App() { - const [contentfuldata, setData] = - useState[]>(); - - const client = createClient({ - space: import.meta.env.VITE_CONTENTFUL_SPACE_ID, - accessToken: import.meta.env.VITE_CONTENTFUL_DELIVERY_TOKEN, - }); - - useEffect(() => { - const ass = async () => { - const response = await client.getEntries({ - content_type: "landing-page", - }); - console.log(response.items); - return setData(response.items); - }; - - ass(); - }, []); - - if (contentfuldata === null || contentfuldata === undefined) { - return <>; - } - - const current = contentfuldata.filter( - (n) => n.sys.id !== "7IShhDv8NE55WfsQf4RKuW" - )[0]; - const prihlaska = contentfuldata.filter( - (n) => n.sys.id === "7IShhDv8NE55WfsQf4RKuW" - )[0]; - - const router = createBrowserRouter( - [ - { - path: "/", - element: ( - - ), - }, - { - path: "/prihlaska", - element: ( - - ), - }, - { - element:

Stránka nenalezena.

, - path: "*", - }, - ], - { - basename: import.meta.env.VITE_BASENAME, - } - ); - - return ( - <> - -
- Naše webové stránky jsou v rekonstrukci, děkujeme za trpělivost. V - případě dotazů prosím kontaktuje hlavního vedoucího Karla Košnara{" "} - na emailové adrese karel.kosnar (zavináč) gmail.com nebo na - telefonu 608 906 987. -
- - - - ); -} - -export default App; diff --git a/src/components/LinkButton/LinkButton.module.css b/src/components/LinkButton/LinkButton.module.css deleted file mode 100644 index 5f5f0da..0000000 --- a/src/components/LinkButton/LinkButton.module.css +++ /dev/null @@ -1,4 +0,0 @@ -.link { - padding: 1rem; - display: inline-block; -} \ No newline at end of file diff --git a/src/components/LinkButton/LinkButton.tsx b/src/components/LinkButton/LinkButton.tsx deleted file mode 100644 index 37bb362..0000000 --- a/src/components/LinkButton/LinkButton.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import styles from "./LinkButton.module.css"; - -interface LinkButtonInterface { - text: string; - link: string; - type?: string; -} - -const LinkButton = ({ text, link, type }: LinkButtonInterface) => { - return ( - - ); -}; - -export default LinkButton; diff --git a/src/containers/MainNav/MainNav.module.css b/src/containers/MainNav/MainNav.module.css deleted file mode 100644 index 4e0910a..0000000 --- a/src/containers/MainNav/MainNav.module.css +++ /dev/null @@ -1,5 +0,0 @@ -.title { - font-size: 1.5rem; - font-weight: bold; - color: darkgreen; -} \ No newline at end of file diff --git a/src/containers/MainNav/MainNav.tsx b/src/containers/MainNav/MainNav.tsx deleted file mode 100644 index 6e84ef2..0000000 --- a/src/containers/MainNav/MainNav.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import styles from "./MainNav.module.css"; - -const MainNav = () => { - return ( - <> -
Dětský stanový tábor ve Střílkách
- - - - ); -}; - -export default MainNav; diff --git a/src/containers/Page/Page.module.css b/src/containers/Page/Page.module.css deleted file mode 100644 index 59f7780..0000000 --- a/src/containers/Page/Page.module.css +++ /dev/null @@ -1,18 +0,0 @@ -.poster { - max-width: min(100%, 30rem); - margin: 0 auto; -} - -.content { - max-width: 50rem; - margin-left: auto; - margin-right: auto; -} - -.content * { - text-align: left; -} - -.content image { - text-align: center; -} \ No newline at end of file diff --git a/src/containers/Page/Page.tsx b/src/containers/Page/Page.tsx deleted file mode 100644 index 1467294..0000000 --- a/src/containers/Page/Page.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import styles from "./Page.module.css"; -import { documentToReactComponents } from "@contentful/rich-text-react-renderer"; - -import { BLOCKS } from "@contentful/rich-text-types"; - -interface InvitationBlockInterface { - title: string; - content: any; -} - -const InvitationBlock = ({ title, content }: InvitationBlockInterface) => { - return ( - <> -
-

{title}

-
- {documentToReactComponents(content, { - renderText: (text) => { - return text.split("\n").reduce((lines, textSegment, index) => { - return [...lines, index > 0 &&
, textSegment]; - }, new Array()); // eslint-disable-line @typescript-eslint/no-array-constructor - }, - renderNode: { - [BLOCKS.EMBEDDED_ASSET]: (node) => { - return ( - {node.data.target.fields.description} - ); - }, - }, - })} -
-
- - ); -}; - -export default InvitationBlock; diff --git a/src/main.tsx b/src/main.tsx deleted file mode 100644 index 9b6862c..0000000 --- a/src/main.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from "react"; -import ReactDOM from "react-dom/client"; -import App from "./App.tsx"; - -import "@fontsource/roboto/300.css"; -import "@fontsource/roboto/400.css"; -import "@fontsource/roboto/500.css"; -import "@fontsource/roboto/700.css"; - -import CssBaseline from "@mui/material/CssBaseline"; - -ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( - - - - -); diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts deleted file mode 100644 index 11f02fe..0000000 --- a/src/vite-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index a7fc6fb..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "module": "ESNext", - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx", - - /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true - }, - "include": ["src"], - "references": [{ "path": "./tsconfig.node.json" }] -} diff --git a/tsconfig.node.json b/tsconfig.node.json deleted file mode 100644 index 42872c5..0000000 --- a/tsconfig.node.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "skipLibCheck": true, - "module": "ESNext", - "moduleResolution": "bundler", - "allowSyntheticDefaultImports": true - }, - "include": ["vite.config.ts"] -} diff --git a/types/contentful.tsx b/types/contentful.tsx deleted file mode 100644 index 323c145..0000000 --- a/types/contentful.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import contentful from "contentful"; - -export type LandingPageSkeleton = { - contentTypeId: "landing-page"; - fields: { - title: contentful.EntryFieldTypes.Symbol; - content: contentful.EntryFieldTypes.RichText; - }; -}; diff --git a/vite.config.ts b/vite.config.ts deleted file mode 100644 index 5a33944..0000000 --- a/vite.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [react()], -})