diff --git a/index.html b/index.html index 4ad9a8452a6c02d621ab5485a44407812b971f55..d99bcf6c399a1bde6f35acf6aa629ca43e2a5811 100644 --- a/index.html +++ b/index.html @@ -13,6 +13,9 @@ <link rel="stylesheet" href="css/news.css"> <link rel="stylesheet" href="css/pizzaList.css"> <link rel="stylesheet" href="css/footer.css"> + + <script src="src/main.js" defer></script> + </head> <body> <header> diff --git a/src/main.js b/src/main.js index c3edb8010b2fe877c375cccfe19483fb4532447f..d09b051f5753382474ebbe22dd148e585f0621e1 100644 --- a/src/main.js +++ b/src/main.js @@ -1 +1,19 @@ -console.log('Welcome to PizzaLand 🍕 !'); \ No newline at end of file +const name = "Regina"; +const url = "images/" + name.toLowerCase() + ".jpg" ; +//let html = '<a href=\"' + url +'\">' + url + '</a>'; +/*let html = '<a href=\"' + url +'\">\n' + +'<img src=\"'+url+'\"/>\n'+ +'<section>Regina</section>' + '</a>';*/ + +let html = ` <article class="pizzaThumbnail"> +<a href="${url}"> +<img src=${url}> +<section>Regina</section> +</a> +</article> +` + + +document.querySelector('.pageContent').innerHTML = html; +console.log(url); +console.log(html); \ No newline at end of file