index.html 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <link rel="stylesheet" type="text/css" href="./assets/css/style.css">
  7. <title>Product app</title>
  8. </head>
  9. <body>
  10. <div class="nav-bar"></div>
  11. <div id="app">
  12. <div class="product">
  13. <div class="product-image">
  14. <a :href="link">
  15. <!-- bind the src attribute to the "image" property -->
  16. <img
  17. v-bind:src="image"
  18. :alt="description" :title="description"
  19. /><!-- :attr is shortcut for v-bind:attr -->
  20. </a>
  21. </div>
  22. <div class="product-info">
  23. <h1 v-cloak>{{ product }}</h1>
  24. <p v-cloak v-show="inventory > 10">In stock</p>
  25. <p v-cloak v-show="inventory <= 10 && inventory > 0">Limited stock</p>
  26. <p v-cloak v-show="inventory <= 0">Out of stock</p>
  27. <p v-if="onSale">On sale! Act fast.</p>
  28. </div>
  29. </div>
  30. </div>
  31. <script src="./assets/js/vue.js"></script>
  32. <script src="main.js"></script>
  33. </body>
  34. </html>