-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
207 lines (202 loc) · 8.66 KB
/
index.html
File metadata and controls
207 lines (202 loc) · 8.66 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
<link rel="stylesheet" href="./bootstrap-5.0.2-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="./styles/styles.css">
<script src="./bootstrap-5.0.2-dist/js/bootstrap.bundle.min.js"></script>
<style>
body {
font-family: 'Manrope', 'sans-serif';
font-size: 13px;
color: hsl(214, 17%, 51%);
margin: 0;
padding: 0;
background-color: hsl(210, 46%, 95%);
}
main {
position: relative;
margin: 11% auto;
padding: 0;
width: 330px;
}
#main-container {
overflow: hidden;
padding: 0;
border-radius: 10px;
background-color: white;
}
.img-wrapper {
height: 235px;
}
.copy-wrapper {
padding: 40px 35px 0px 35px;
}
.copy-heading {
font-size: 1.2em;
color: hsl(217, 19%, 35%);
}
#share-footer {
display: none;
}
#footer {
align-items: center;
padding: 25px 35px;
height: 65px;
}
#share-bubble {
display: none;
}
#bubble-arrow {
display: none;
}
#share-button {
padding: 10px;
overflow: hidden;
}
.share-button-active {
filter: brightness(3);
}
.share-button-container {
background-color: hsl(210, 46%, 95%);
}
.share-button-container-active {
background-color: hsl(214, 17%, 51%);
}
</style>
<style media="(min-width: 768px)">
.img-wrapper {
width: 288px;
height: 285px;
}
main {
margin: 33vh auto;
padding: 0;
width: 730px;
height: 285px;
}
.copy-heading {
font-size: 1.6em;
}
.body-wrapper {
padding: 0;
}
#footer {
position: relative;
padding-top: 0px;
align-items: flex-start;
height: 35px;
}
#share-bubble {
position: absolute;
justify-content: space-between;
align-items: center;
padding: 20px 40px;
background-color: hsl(217, 19%, 35%);
border-radius: 10px;
width: 250px;
height: 55px;
bottom: 86px;
right: -60px;
}
#bubble-arrow {
position: absolute;
border: 15px solid transparent;
border-top: 15px solid hsl(217, 19%, 35%);
bottom: 56px;
right: 55px;
}
</style>
<title>Frontend Mentor | Article preview component</title>
</head>
<body>
<main>
<div id="main-container">
<div class="row">
<div class="img-wrapper col-12 col-md-5 p-0">
<img src="./images/drawers.jpg" alt="drawers" class="w-100 h-100"
style="object-fit: cover; object-position: left top;">
</div><!--
--><div class="body-wrapper col-12 col-md-7">
<div class="copy-wrapper">
<h5 class="copy-heading fw-bold pb-2" style="line-height: 1.4em;">
Shift the overall look and feel by adding these wonderful
touches to furniture in your home
</h5>
<p class="pb-3" style="font-size: 1.01em;">
Ever been in a room and felt like something was missing? Perhaps
it felt slightly bare and uninviting. I’ve got some simple tips
to help you make any room feel complete.
</p>
</div>
<div id="footer" class="d-flex">
<div id="info-footer" class="d-flex" style="align-items: center;">
<img src="./images/avatar-michelle.jpg" alt="avatar" class="rounded-circle"
style="height: 40px;">
<div class="ms-3">
<div class="fw-bold" style="color: hsl(217, 19%, 35%);">Michelle Appleton</div>
<div>28 Jun 2020</div>
</div>
</div>
<div id="share-footer" style="align-items: center; width: 170px;">
<span class=""
style="letter-spacing: 4px; color: hsl(212, 23%, 69%);" >
SHARE
</span>
<img src="./images/icon-facebook.svg" alt="facebook share icon">
<img src="./images/icon-twitter.svg" alt="twitter share icon">
<img src="./images/icon-pinterest.svg" alt="pinterest share icon">
</div>
<div id="share-button-container" class="ms-auto rounded-circle share-button-container">
<img src="./images/icon-share.svg" alt="share icon"
id="share-button" >
</div>
</div>
</div>
</div>
</div>
<div id="share-bubble" class="shadow">
<span style="letter-spacing: 4px; color: hsl(212, 23%, 69%);" >
SHARE
</span>
<img src="./images/icon-facebook.svg" alt="facebook share icon">
<img src="./images/icon-twitter.svg" alt="twitter share icon">
<img src="./images/icon-pinterest.svg" alt="pinterest share icon">
</div>
<div id="bubble-arrow"></div>
</main>
<!-- <footer>
<p class="attribution px-4 bg-light">
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>.
Coded by <em><a href="#">gusfoca</a></em>.
</p>
</footer> -->
<script>
let activeState = false;
const activateEvent = () => {
document.getElementById("share-bubble").style.display = "none";
document.getElementById("bubble-arrow").style.display = "none";
document.getElementById("share-footer").className = "d-none";
document.getElementById("info-footer").className = "d-flex";
document.getElementById("footer").style.backgroundColor = "white";
document.getElementById("share-button").classList.toggle("share-button-active");
document.getElementById("share-button-container").classList.toggle("share-button-container-active");
if(!activeState) {
if(window.outerWidth < 768) {
document.getElementById("info-footer").className = "d-none";
document.getElementById("share-footer").className = "d-flex justify-content-between";
document.getElementById("footer").style.backgroundColor = "hsl(217, 19%, 35%)";
} else {
document.getElementById("share-bubble").style.display = "flex";
document.getElementById("bubble-arrow").style.display = "block";
}
}
activeState = !activeState;
};
window.onresize = () => { console.log('res'); activateEvent(); activateEvent(); };
document.getElementById("share-button").onclick = activateEvent;
</script>
</body>
</html>