Skip to content

Instantly share code, notes, and snippets.

@muffincode
Created January 23, 2023 14:43
Show Gist options
  • Save muffincode/28a9659d1f3739cd8953407c8f53bf1b to your computer and use it in GitHub Desktop.
Save muffincode/28a9659d1f3739cd8953407c8f53bf1b to your computer and use it in GitHub Desktop.
Base projet site marchand
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="author" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="style.css" rel="stylesheet">
<script>
// availableProducts est l'ensemble des articles disponible à la vente
// Ils doivent être affichés dans la section, sous forme d'articles
const availableProducts = [
{
name: "Product 1",
description: "This is the first product",
price: 55
},
{
name: "Product 2",
description: "This is the second product",
price: 25
},
{
name: "Product 3",
description: "This is the third product",
price: 15
}
]
// cart est un tableau dynamique qui contient les éléments que l'on veut acheter
// L'ensemble de ces produits seront affiché dans le cart
let cart = [];
</script>
</head>
<body>
<nav>
<h1>Online Shop</h1>
</nav>
<div class="container">
<main>
<header>
<h1>Our products</h1>
</header>
<section>
<!-- <article>
<h2>Article 1</h2>
<p>Description</p>
<span>100€</span>
</article> -->
</section>
</main>
<aside>
<h2>Cart</h2>
<ul>
<!-- <li>Article 1</li> -->
</ul>
<p>Total : 00€</p>
</aside>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment