From b42e89ceefe8636423e15ad2700a0b5bcf62823e Mon Sep 17 00:00:00 2001
From: Eliott Collin <eliott.collin0307@gmail.com>
Date: Mon, 24 Jan 2022 17:32:55 +0100
Subject: [PATCH] use build/main.js instead of src/main.js

---
 index.html  |  2 +-
 src/main.js | 51 ---------------------------------------------------
 2 files changed, 1 insertion(+), 52 deletions(-)

diff --git a/index.html b/index.html
index e4a8ad6..059864d 100644
--- a/index.html
+++ b/index.html
@@ -14,7 +14,7 @@
 	<link rel="stylesheet" href="css/pizzaList.css">
 	<link rel="stylesheet" href="css/footer.css">
 
-	<script src="src/main.js" defer></script>
+	<script src="build/main.js" defer></script>
 </head>
 <body>
 	<header>
diff --git a/src/main.js b/src/main.js
index e05d3e3..955dfe4 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,4 +1,3 @@
-
 const data = [
     {
         name: 'Regina',
@@ -22,55 +21,6 @@ const data = [
         image: 'https://images.unsplash.com/photo-1458642849426-cfb724f15ef7?fit=crop&w=500&h=300',
     }
 ];
-/*
-const html = data.map(pizza => {
-    const url = pizza.image;
-
-    return `<article class="pizzaThumbnail">
-                <a href="${url}">
-                    <img src="${url}" alt="${pizza.name}"/>
-                    <section>
-                        <h4>${pizza.name}</h4>
-                        <ul>
-                            <li>Prix petit format : ${pizza.price_small} €</li>
-                            <li>Prix grand format : ${pizza.price_large} €</li>
-                        </ul>
-                    </section>
-                </a>
-            </article>`;
-
-});
-html.forEach(element => document.querySelector('.pageContent').innerHTML += element);
-*/
-
-/*
-const html = data.map(name => {
-    const url = `images/${name.toLowerCase()}.jpg`;
-
-    return `<article class="pizzaThumbnail">
-                <a href="${url}">
-                    <img src="${url}" alt="${name}"/>
-                    <section>${name}</section>
-                </a>
-            </article>`;
-
-});
-
-html.forEach(element => document.querySelector('.pageContent').innerHTML += element);
-*/
-
-/*
-data.forEach(name => {
-    const url = `images/${name.toLowerCase()}.jpg`;
-
-    document.querySelector('.pageContent').innerHTML += `<article class="pizzaThumbnail">
-                <a href="${url}">
-                    <img src="${url}" alt="${name}"/>
-                    <section>${name}</section>
-                </a>
-            </article>`;
-});
- */
 
 const html = data.reduce((previous, current) => {
     return previous + `<article class="pizzaThumbnail">
@@ -87,5 +37,4 @@ const html = data.reduce((previous, current) => {
             </article>`;
 }, "");
 
-console.log(html);
 document.querySelector('.pageContent').innerHTML = html;
\ No newline at end of file
-- 
GitLab