diff --git a/src/App.js b/src/App.js index e18f48c..18a89e4 100644 --- a/src/App.js +++ b/src/App.js @@ -2,7 +2,12 @@ import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; import React, { Suspense, lazy } from 'react'; import Loading from "./routes/Loading" -const Home = lazy(() => import('./routes/Home')); +//const Home = lazy(() => import('./routes/Home')); +const Home = lazy(() => { + return new Promise(resolve => { + setTimeout(() => resolve(import("./routes/Home")), 500); + }); +}); const Film = lazy(() => import('./routes/Film')); const Anime = lazy(() => import('./routes/Anime')); const SerieTV = lazy(() => import('./routes/SerieTV')); @@ -10,10 +15,10 @@ const Immagini = lazy(() => import('./routes/Immagini')); const Musica = lazy(() => import('./routes/Musica')); const Giochi = lazy(() => import('./routes/Giochi')); const Programmi = lazy(() => import('./routes/Programmi')); +const Pannocchiacattiva = lazy(() => import('./routes/Pannocchiacattiva')) const NotFound = lazy(() => import('./routes/NotFound')); - class App extends React.Component { render() { return ( @@ -28,6 +33,7 @@ class App extends React.Component { + diff --git a/src/routes/Loading.js b/src/routes/Loading.js index 2c8543b..f5acb1f 100644 --- a/src/routes/Loading.js +++ b/src/routes/Loading.js @@ -3,15 +3,20 @@ import Navbar from '../Navbar'; import 'bootstrap/dist/css/bootstrap.min.css'; import 'bootstrap/dist/js/bootstrap.min.js'; import "./centercontainer.css" +import images from "./loadinggifs/images" class Loading extends React.Component { render() { + let randomGif = () => { + return images[3] + } + console.log(randomGif()) return ( <>
- Loading... + Loading...
diff --git a/src/routes/Pannocchiacattiva.js b/src/routes/Pannocchiacattiva.js new file mode 100644 index 0000000..d0f8c8c --- /dev/null +++ b/src/routes/Pannocchiacattiva.js @@ -0,0 +1,46 @@ +import React from 'react'; +import 'bootstrap/dist/css/bootstrap.min.css'; +import 'bootstrap/dist/js/bootstrap.min.js'; +import Form from 'react-bootstrap/Form'; +import Col from 'react-bootstrap/Col'; +import '../Buttons.css'; +import Navbar from '../Navbar'; + +class Pannocchiacattiva extends React.Component { + render() { + const shiroTexto = { + color: 'white' + } + return ( + <> + +
+
+ + + + + + + + + + + + + + + + + + + + +
+
+ + ); + } +} + +export default Pannocchiacattiva; \ No newline at end of file diff --git a/src/routes/loadinggifs/images.js b/src/routes/loadinggifs/images.js new file mode 100644 index 0000000..58bf503 --- /dev/null +++ b/src/routes/loadinggifs/images.js @@ -0,0 +1,8 @@ +const images = [ + './loadinggifs/loading1.gif', + './loadinggifs/loading2.gif', + './loadinggifs/loading3.gif', + './loadinggifs/loading4.gif', + ]; + +export default images; \ No newline at end of file diff --git a/src/routes/loadinggifs/loading1.gif b/src/routes/loadinggifs/loading1.gif new file mode 100755 index 0000000..a3e40a3 Binary files /dev/null and b/src/routes/loadinggifs/loading1.gif differ diff --git a/src/routes/loadinggifs/loading2.gif b/src/routes/loadinggifs/loading2.gif new file mode 100755 index 0000000..3b43e3b Binary files /dev/null and b/src/routes/loadinggifs/loading2.gif differ diff --git a/src/routes/loadinggifs/loading3.gif b/src/routes/loadinggifs/loading3.gif new file mode 100755 index 0000000..89c0edc Binary files /dev/null and b/src/routes/loadinggifs/loading3.gif differ diff --git a/src/routes/loadinggifs/loading4.gif b/src/routes/loadinggifs/loading4.gif new file mode 100755 index 0000000..ea54c46 Binary files /dev/null and b/src/routes/loadinggifs/loading4.gif differ