Advertisement
piffy

Greta

Aug 29th, 2021
1,428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.37 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="it">
  3. <head>
  4.   <meta charset="UTF-8">
  5.   <title>Greta Van Fleet Page</title>
  6. </head>
  7. <body>
  8.  
  9. <div id="radice"></div>
  10.  
  11. <!-- Inclusione di React e React-dom -->
  12. <script src="https://unpkg.com/react@16.7.0/umd/react.production.min.js"></script>
  13. <script src="https://unpkg.com/react-dom@16.7.0/umd/react-dom.production.min.js"></script>
  14.  
  15. <!-- Inclusione del transpiler Babel -->
  16. <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
  17.  
  18. <script type="text/babel">
  19.  
  20.   function Intestazione() {
  21.     return (
  22.       <h1>Greta Van Fleet Fan Fun</h1>
  23.     );
  24.  
  25.   }
  26.  
  27.   function App() {
  28.     return (
  29.       <div>
  30.         <Logo />
  31.         <Intestazione />
  32.         <h3>Discografia</h3>
  33.         <Discografia />
  34.       </div>
  35.     );
  36.   }
  37.  
  38.  
  39.   function Item(props) {
  40.     return <li>{props.message}</li>;
  41.   }
  42.  
  43.   function Discografia() {
  44.     const todos = ['Black Smoke Rising', 'From the Fires', 'Anthem of the Peaceful Army', 'The Battle at Garden\'s Gate'];
  45.     return (
  46.       <ul>
  47.         {todos.map((message) => <Item key={message} message={message} />)}
  48.       </ul>
  49.     );
  50.   }
  51.  
  52.  
  53.  
  54.  
  55.   function Logo() {
  56.     return (
  57.       <div>
  58.         <img src="img/gretalogo.png" alt="Logo"/>
  59.       </div>
  60.     );
  61.   }
  62.   const radice = document.querySelector('#radice');
  63.   ReactDOM.render(App(), radice);
  64. </script>
  65. </body>
  66. </html>
  67.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement