Skip to content
Snippets Groups Projects
Commit bcc20ff7 authored by Mohamed Bourdim's avatar Mohamed Bourdim
Browse files

fin partie F

parent 91aa5db3
No related branches found
No related tags found
No related merge requests found
{
"presets": ["@babel/env"]
}
"use strict";
var name = "Regina";
var url = "images/" + name.toLowerCase() + ".jpg";
console.log(url);
var html = "";
console.log(html);
var data = [{
name: 'Regina',
base: 'tomate',
price_small: 6.5,
price_large: 9.95,
image: 'https://images.unsplash.com/photo-1532246420286-127bcd803104?fit=crop&w=500&h=300'
}, {
name: 'Napolitaine',
base: 'tomate',
price_small: 6.5,
price_large: 8.95,
image: 'https://images.unsplash.com/photo-1562707666-0ef112b353e0?&fit=crop&w=500&h=300'
}, {
name: 'Spicy',
base: 'crème',
price_small: 5.5,
price_large: 8,
image: 'https://images.unsplash.com/photo-1458642849426-cfb724f15ef7?fit=crop&w=500&h=300'
}];
data.forEach(function (element) {
return html = html + "<article class=\"pizzaThumbnail\">\n <a href=\"".concat(element.image, "\">\n <img src=\"").concat(element.image, "\"/>\n <section> \n <h4>").concat(element.name, "</h4>\n <ul>\n <li> Prix petit format : ").concat(element.price_small, "0 \u20AC</li>\n <li> Prix grand format : ").concat(element.price_large, " \u20AC</li>\n </ul>\n </section>\n </a>\n </article>");
});
document.querySelector('.pageContent').innerHTML = html;
//# sourceMappingURL=main.js.map
\ No newline at end of file
{"version":3,"sources":["../src/main.js"],"names":["name","url","toLowerCase","console","log","html","data","base","price_small","price_large","image","forEach","element","document","querySelector","innerHTML"],"mappings":";;AAAA,IAAIA,IAAI,GAAG,QAAX;AACA,IAAMC,GAAG,GAAG,YAAYD,IAAI,CAACE,WAAL,EAAZ,GAAiC,MAA7C;AACAC,OAAO,CAACC,GAAR,CAAYH,GAAZ;AACA,IAAII,IAAI,KAAR;AACAF,OAAO,CAACC,GAAR,CAAYC,IAAZ;AACA,IAAMC,IAAI,GAAG,CACZ;AACCN,EAAAA,IAAI,EAAE,QADP;AAECO,EAAAA,IAAI,EAAE,QAFP;AAGCC,EAAAA,WAAW,EAAE,GAHd;AAICC,EAAAA,WAAW,EAAE,IAJd;AAKCC,EAAAA,KAAK,EAAE;AALR,CADY,EAQZ;AACCV,EAAAA,IAAI,EAAE,aADP;AAECO,EAAAA,IAAI,EAAE,QAFP;AAGCC,EAAAA,WAAW,EAAE,GAHd;AAICC,EAAAA,WAAW,EAAE,IAJd;AAKCC,EAAAA,KAAK,EAAE;AALR,CARY,EAeZ;AACCV,EAAAA,IAAI,EAAE,OADP;AAECO,EAAAA,IAAI,EAAE,OAFP;AAGCC,EAAAA,WAAW,EAAE,GAHd;AAICC,EAAAA,WAAW,EAAE,CAJd;AAKCC,EAAAA,KAAK,EAAE;AALR,CAfY,CAAb;AAuBAJ,IAAI,CAACK,OAAL,CAAa,UAAAC,OAAO;AAAA,SAChBP,IAAI,GAAGA,IAAI,mEAEIO,OAAO,CAACF,KAFZ,yCAGSE,OAAO,CAACF,KAHjB,+DAKOE,OAAO,CAACZ,IALf,uFAOgCY,OAAO,CAACJ,WAPxC,yEAQgCI,OAAO,CAACH,WARxC,+FADK;AAAA,CAApB;AAeII,QAAQ,CAACC,aAAT,CAAuB,cAAvB,EAAuCC,SAAvC,GAAmDV,IAAnD","sourcesContent":["let name = \"Regina\";\nconst url = \"images/\" + name.toLowerCase() + \".jpg\";\nconsole.log(url);\nlet html = ``;\nconsole.log(html);\nconst data = [\n\t{\n\t\tname: 'Regina',\n\t\tbase: 'tomate',\n\t\tprice_small: 6.5,\n\t\tprice_large: 9.95,\n\t\timage: 'https://images.unsplash.com/photo-1532246420286-127bcd803104?fit=crop&w=500&h=300'\n\t},\n\t{ \n\t\tname: 'Napolitaine',\n\t\tbase: 'tomate',\n\t\tprice_small: 6.5,\n\t\tprice_large: 8.95,\n\t\timage: 'https://images.unsplash.com/photo-1562707666-0ef112b353e0?&fit=crop&w=500&h=300'\n\t},\n\t{\n\t\tname: 'Spicy',\n\t\tbase: 'crème',\n\t\tprice_small: 5.5,\n\t\tprice_large: 8,\n\t\timage: 'https://images.unsplash.com/photo-1458642849426-cfb724f15ef7?fit=crop&w=500&h=300',\n\t}\n];\ndata.forEach(element =>\n html = html +\n `<article class=\"pizzaThumbnail\">\n <a href=\"${element.image}\">\n <img src=\"${element.image}\"/>\n <section> \n <h4>${element.name}</h4>\n <ul>\n <li> Prix petit format : ${element.price_small}0 €</li>\n <li> Prix grand format : ${element.price_large} €</li>\n </ul>\n </section>\n </a>\n </article>`\n );\n document.querySelector('.pageContent').innerHTML = html;\n"],"file":"main.js"}
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<link rel="stylesheet" href="css/news.css"> <link rel="stylesheet" href="css/news.css">
<link rel="stylesheet" href="css/pizzaList.css"> <link rel="stylesheet" href="css/pizzaList.css">
<link rel="stylesheet" href="css/footer.css"> <link rel="stylesheet" href="css/footer.css">
<script defer src="src/main.js"></script> <script defer src="build/main.js"></script>
</head> </head>
<body> <body>
......
This diff is collapsed.
{
"name": "pizzaland",
"version": "1.0.0",
"description": "<img src=\"images/readme/header.jpg\">",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://gitlab.univ-lille.fr/mohamed.bourdim.etu/tp1.git"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment