-
Notifications
You must be signed in to change notification settings - Fork 0
/
challenge.html
236 lines (219 loc) · 9.49 KB
/
challenge.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Studying</title>
<!-- bootstrap -->
<!-- CSS only -->
<link
rel="stylesheet"
href="./assets/plugins/bootstrap/css/bootstrap.css"
/>
<link rel="stylesheet" href="./assets/css/style_challenge.css" />
</head>
<body>
<!-- setiap body ada pembungkus atau wrapper, biasanya dibungkus pake tag <div> -->
<!-- <div id="navbar">
<div class="logo">
<a class="a-style-navbar" href="challenge.html">Logo</a>
</div>
<div class="menu">
<ul class="wrapper-list-menu">
<li><a class="a-style-navbar" href="">About</a></li>
<li><a class="a-style-navbar" href="">Article</a></li>
<li><a class="a-style-navbar" href="">Subscribe</a></li>
</ul>
</div>
</div> -->
<div class="container-fluid">
<div class="row navbar" id="navbar">
<div class="col-6 logo-banner">
<a style="margin-left: 25px; font-size: 25px; font-weight: bold"
>LOGO</a
>
</div>
<div class="col-6 menu-banner">
<ul class="wrapper-menu-navbar">
<li>
<a class="a-style-navbar-x">About</a>
</li>
<li>
<a class="a-style-navbar-x">Article</a>
</li>
<button
type="button"
class="btn btn-outline-light"
style="font-size: 24px"
>
Subscribe
</button>
</ul>
</div>
</div>
<div class="row banner">
<div class="col-12 wrapper-banner image-banner" style="background-image: url(./assets/images/banner.jpg)">
<div class="wrapper-text-banner">
<h2 class="title-h2-banner hero-judul">ART OF PLANT</h2>
<p class="description-p-banner hero-subjudul">
ALL ABOUT ART OF NATURE
</p>
</div>
</div>
</div>
<div class="row product" id="product-list">
<div class="col-12 title-box">
<h3 class="text-center" style="font-size: 18px">LATEST ARTICLES</h3>
<hr class="new5" />
</div>
<br />
<br />
<div class="col-12 card-deck"></div>
</div>
<div class="row product-details">
<div class="box-left col-12 col-sm-12 col-md-6 col-lg-6 p-0"></div>
<div class="box-right col-12 col-sm-12 col-md-6 col-lg-6 d-flex">
<div class="wrapper-desc-details"></div>
</div>
</div>
<div class="row subscription">
<!-- <div class="col-1"></div>
<div class="col-10 d-flex justify-content-center align-items-center">
<div class="wrapper-box-subscription">
<div class="col-12 subscription-title">
<h3 class="text-center">SUBSCRIBE US!</h3>
</div>
<div class="col-12 sub-title">
<h5 class="text-center">Sign up to our newsletters</h5>
</div>
<div class="row form-group">
<input type="email" class="form-control w-100" id="exampleInputEmailexampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
</div>
<div class="col-12 form-group text-center" style="padding-top: 5%;">
<button type="button" class="btn btn-outline-secondary w-50">Submit</button>
</div>
</div>
</div>
<div class="col-1"></div>
</div> -->
<div class="col-12 d-flex justify-content-center align-items-center">
<div class="wrapper-box-subscription">
<div class="col-12 subscription-title">
<h3 class="text-center">SUBSCRIBE US!</h3>
</div>
<div class="col-12 sub-title">
<h5 class="text-center">Sign up to our newsletters</h5>
</div>
<div class="row form-group">
<input
type="email"
class="form-control w-100"
id="exampleInputEmailexampleInputEmail1"
aria-describedby="emailHelp"
placeholder="Enter email"
/>
</div>
<div class="col-12 form-group text-center" style="padding-top: 5%">
<button type="button" class="btn btn-outline-secondary w-50">
Submit
</button>
</div>
</div>
</div>
</div>
<div class="row footer">
<div class="col-12 menu-footer">
<ul class="wrapper-menu-footer">
<li class="a-style-footer-x">About</li>
<li class="a-style-footer-x">Articles</li>
<li class="a-style-footer-x">Home</li>
</ul>
</div>
</div>
</div>
<script type="text/javascript">
let h2Banner = document.getElementsByClassName('title-h2-banner')
let desc = document.querySelector('.description-p-banner')
let imageBaru = document.querySelector('.banner .image-banner')
// document.body.style.backgroundImage = "url('img_tree.png')";
//query selector
//# untuk id
//. untuk class
//append() menambahkan di belakang obj
//prepand() menambahkan di depan obj
//innertHTML= merubah/mengganti value object
// h2Banner[0].append(' ini isian');
//.style >> untuk css styling
//.style.backgroundColor | property css = untuk merubah sesuai dengan properti CSS
h2Banner[0].innerHTML = 'ini isi'
h2Banner[0].style.fontFamily = 'Arial'
// console.log(desc);
desc.innerHTML = 'Lorem Ipsum'
imageBaru.style.backgroundImage = "url('./assets/images/KB_Bukopin.jpeg')"
let productBox = document.querySelector('#product-list .card-deck')
// productBox.innerHTML = productList;
for (let i = 0; i < 3; i++) {
if (i % 2 == 0) {
productBox.innerHTML += `
<div class="col-4 shadow-lg mb-5 bg-white rounded card">
<img class="card-img-top" src="./assets/images/product-3.jpg" alt="Card image cap">
<br/>
<br/>
<div class="card-body">
<hr class="new3">
<br/>
<h5 class="card-title">Card title Genap</h5>
<p class="card-text">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
</div>
`
} else {
productBox.innerHTML += `
<div class="col-4 shadow-lg mb-5 bg-white rounded card">
<img class="card-img-top" src="./assets/images/product-3.jpg" alt="Card image cap">
<br/>
<br/>
<div class="card-body">
<hr class="new3">
<br/>
<h5 class="card-title">Card title Ganjil</h5>
<p class="card-text">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
</div>
`
}
let productImageDetails = document.querySelector(
'.product-details .box-left'
)
productImageDetails.innerHTML = `<img src="./assets/images/product-detail.jpg" class="w-100 h-100"></img>`
let productDescDetails = document.querySelector(
'.product-details .box-right .wrapper-desc-details'
)
productDescDetails.innerHTML = `
<h5 class="text-center">ABOUT</h5>
<hr class="new4" />
<br />
<p
style="
font-style: italic;
text-align: justify;
text-justify: inter-word;
"
>
Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s, when an unknown printer took a galley of
type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also the leap into
electronic typesetting, remaining essentially unchanged. It was
popularised in the 1960s with the release of Letraset sheets
containing Lorem Ipsum passages, and more recently with desktop
publishing software like Aldus PageMaker including versions of
Lorem Ipsum.
</p>
`
}
</script>
</body>
</html>