PWEB A - TUGAS 3

 

Tugas 3 (Membuat website warung tegal sederhana)


        Pada pertemuan tiga diberikan tugas untuk membuat website sederhana menggunakan html5. Pada penugasan ini ditambahkan carousel, video, dll. Berikut merupakan tampilan dari web tersebut.


Berikut source code index.html

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Web Warung Tegal</title>
  5. <link rel="stylesheet" href="style.css" />
  6. <script>
  7. var slidePosition = 1;
  8. SlideShow(slidePosition);
  9.  
  10. function plusSlides(n) {
  11. SlideShow((slidePosition += n));
  12. }
  13.  
  14. function currentSlide(n) {
  15. SlideShow((slidePosition = n));
  16. }
  17. z;
  18. function SlideShow(n) {
  19. var i;
  20. var slides = document.getElementsByClassName("Containers");
  21. if (n > slides.length) {
  22. slidePosition = 1;
  23. }
  24. if (n < 1) {
  25. slidePosition = slides.length;
  26. }
  27. for (i = 0; i < slides.length; i++) {
  28. slides[i].style.display = "none";
  29. }
  30. slides[slidePosition - 1].style.display = "block";
  31. }
  32. </script>
  33. </head>
  34. <body>
  35. <div class="wrapper">
  36. <header>
  37. <h1>Warung Tegal</h1>
  38. <nav>
  39. <ul>
  40. <li><a href="" class="current">beranda</a></li>
  41. <li><a href="">daftar masakan</a></li>
  42. <li><a href="">katering</a></li>
  43. <li><a href="">tentang</a></li>
  44. <li><a href="">kontak</a></li>
  45. </ul>
  46. </nav>
  47. </header>
  48. <section class="courses">
  49. <div class="slideshow-containers">
  50. <div class="Containers ContainersImage">
  51. <img src="src_gambar/tempeorek.jpg" style="width: 100%" />
  52. </div>
  53. <div class="Containers">
  54. <img src="src_gambar/semurjengkol.jpg" style="width: 100%" />
  55. </div>
  56. <div class="Containers">
  57. <img src="src_gambar/pcl.jpg" style="width: 559px; height: 372.667px" />
  58. </div>
  59. <a class="Back" onclick="plusSlides(-1)">❮</a>
  60. <a class="forward" onclick="plusSlides(1)">❯</a>
  61. </div>
  62. <article>
  63. <figure>
  64. <img src="src_gambar/sotoayam.jpg" alt="soto" />
  65. <figcaption>Soto Indonesia</figcaption>
  66. </figure>
  67. <hgroup>
  68. <h2>Soto Ayam</h2>
  69. <h3>Makanan Berkuah</h3>
  70. </hgroup>
  71. <p>Soto ayam adalah makanan khas Indonesia yang berupa sejenis sup ayam dengan kuah yang berwarna kekuningan.</p>
  72. </article>
  73. <article>
  74. <figure>
  75. <img src="src_gambar/pcl.jpg" alt="pecel" />
  76. <figcaption>Pecel Indonesia</figcaption>
  77. </figure>
  78. <hgroup>
  79. <h2>Masakan Pecel</h2>
  80. <h3>Makanan dengan Bumbu Kacang</h3>
  81. </hgroup>
  82. <p>Pecel adalah makanan yang menggunakan bumbu sambal kacang sebagai bahan utamanya yang dicampur dengan aneka jenis sayuran.</p>
  83. </article>
  84. </section>
  85. <aside>
  86. <section class="pupolar-recipes">
  87. <h2>Masakan Popular</h2>
  88. <a href="">Sayur Sop</a>
  89. <a href="">Sayur Asem</a>
  90. <a href="">Sayur Lodeh</a>
  91. <a href="">Sayur Bayam</a>
  92. </section>
  93. <section class="contact-details">
  94. <h2>Kontak</h2>
  95. <p>
  96. Warung Tegal<br />
  97. di seluruh Indonesia
  98. </p>
  99. </section>
  100. <section class="review">
  101. <h2>Review</h2>
  102. <iframe
  103. width="250"
  104. height="166"
  105. src="https://www.youtube.com/embed/tihONz3O-_8"
  106. title="YouTube video player"
  107. frameborder="0"
  108. allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  109. allowfullscreen
  110. ></iframe>
  111. </section>
  112. </aside>
  113. <footer>&copy; 2021 Warung Tegal</footer>
  114. </div>
  115. </body>
  116. </html>

Berikut source code style.css

  1. header,
  2. nav,
  3. section,
  4. article,
  5. figure,
  6. figcaption,
  7. aside,
  8. footer {
  9. display: block;
  10. }
  11.  
  12. body {
  13. background-image: url("https://images.unsplash.com/photo-1612929633738-8fe44f7ec841?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=634&q=80");
  14. background-position: center;
  15. font-family: Georgia, "Times New Roman", Times, serif;
  16. line-height: 1.8em;
  17. margin: 0px;
  18. }
  19.  
  20. .wrapper {
  21. width: 940px;
  22. margin: 20px auto 20px auto;
  23. border: 2px solid #777777;
  24. background-color: #ffffff;
  25. }
  26.  
  27. header {
  28. height: 160px;
  29. background-image: url("http://www.nyekrip.com/wp-content/uploads/2015/custom/images/header.png");
  30. }
  31.  
  32. h1 {
  33. text-indent: -9999px;
  34. width: 940px;
  35. height: 130px;
  36. margin: 0px;
  37. }
  38.  
  39. nav,
  40. footer {
  41. clear: both;
  42. color: #ffffff;
  43. background-color: #444444;
  44. height: 30px;
  45. }
  46.  
  47. nav ul {
  48. margin: 0px;
  49. padding: 5px 0px 5px 30px;
  50. }
  51.  
  52. nav li {
  53. display: inline;
  54. margin-right: 40px;
  55. }
  56.  
  57. nav li a {
  58. color: #ffffff;
  59. }
  60.  
  61. .slideshow-container {
  62. max-width: 1000px;
  63. position: relative;
  64. margin: auto;
  65. }
  66.  
  67. .Containers {
  68. margin: 50px;
  69. display: none;
  70. }
  71.  
  72. .ContainersImage {
  73. margin: 50px;
  74. display: block;
  75. }
  76.  
  77. .Back,
  78. .forward {
  79. cursor: pointer;
  80. position: absolute;
  81. top: 40%;
  82. width: 5%;
  83. padding: 15px;
  84. color: grey;
  85. font-weight: bold;
  86. font-size: 19px;
  87. transition: 0.7s ease;
  88. border-radius: 0 5px 5px 0;
  89. user-select: none;
  90. }
  91.  
  92. .forward {
  93. right: 36%;
  94. border-radius: 4px 0 0 4px;
  95. }
  96.  
  97. .dots {
  98. cursor: pointer;
  99. height: 16px;
  100. width: 16px;
  101. margin: 0 3px;
  102. background-color: #acc;
  103. border-radius: 50%;
  104. display: inline-block;
  105. transition: background-color 0.5s ease;
  106. }
  107.  
  108. .enable,
  109. .dots:hover {
  110. background-color: #717161;
  111. }
  112.  
  113. nav li a:hover,
  114. nav li a.current {
  115. font-weight: bolder;
  116. color: #f0efef;
  117. }
  118.  
  119. section.courses {
  120. float: left;
  121. width: 659px;
  122. border-right: 1px solid #eeeeee;
  123. }
  124.  
  125. article {
  126. clear: both;
  127. overflow: auto;
  128. width: 100%;
  129. }
  130.  
  131. hgroup {
  132. margin-top: 40px;
  133. }
  134.  
  135. figure {
  136. float: left;
  137. height: 220px;
  138. padding: 5px;
  139. margin: 20px;
  140. background-color: #ffffff;
  141. border: 1px solid #eeeeee;
  142. }
  143.  
  144. figure img {
  145. width: 280px;
  146. height: 200px;
  147. }
  148.  
  149. figcaption {
  150. font-size: 90%;
  151. text-align: center;
  152. }
  153.  
  154. aside {
  155. width: 230px;
  156. float: left;
  157. padding: 0px 0px 0px 20px;
  158. }
  159.  
  160. aside section a {
  161. display: block;
  162. padding: 10px;
  163. border-bottom: 1px solid #eeeeee;
  164. }
  165.  
  166. aside section a:hover {
  167. color: #000000;
  168. background-color: #efefef;
  169. }
  170.  
  171. a {
  172. color: #0013c2;
  173. text-decoration: none;
  174. }
  175.  
  176. h1,
  177. h2,
  178. h3 {
  179. font-weight: normal;
  180. }
  181.  
  182. h2 {
  183. margin: 10px, 0px, 5px, 0px;
  184. padding: 0px;
  185. }
  186.  
  187. h3 {
  188. margin: 0px, 0px, 10px, 0px;
  189. color: #000000;
  190. }
  191.  
  192. aside h2 {
  193. padding: 30px 0px 10px 0px;
  194. color: #002fff;
  195. }
  196.  
  197. footer {
  198. font-size: 80%;
  199. height: 30px;
  200. padding: 7px, 0px, 0px, 20px;
  201. }


Link Source Code    : https://github.com/thirdianv/thirdianv.github.io.git
Link Website            : https://thirdianv.github.io/

Comments

Popular posts from this blog

Tugas 6 (Membuat Form Kelayakan Kuliah Offline)