-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
97 lines (87 loc) · 4.47 KB
/
index.html
File metadata and controls
97 lines (87 loc) · 4.47 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
<!DOCTYPE html>
<html lang="en">
<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" />
<!-- etiquetas meta -->
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="author" content="Santos Romero" />
<!-- styles -->
<link rel="stylesheet" href="css/style.css">
<!-- fuente -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap" rel="stylesheet" />
<!-- favicon -->
<link rel="shortcut icon" href="images/favicon-32x32.png" type="image/x-icon" />
<!-- titulo -->
<title>Article Preview Component | Frontend Club</title>
</head>
<body class="bg-light">
<main class="container py-5 d-flex justify-content-center align-items-center vh-100">
<div class="row justify-content-center">
<div class="col-lg-8">
<section class="card border-0 shadow card-custom d-flex flex-column flex-md-row">
<!-- Imagen -->
<div class="col-md-5 p-0">
<img src="images/drawers.jpg" alt="drawers" class="card-img-left h-100 w-100" />
</div>
<!-- Contenido -->
<div class="col-md-7 p-4 d-flex flex-column justify-content-between">
<div>
<h4 class="fw-bold text-primary">
Shift the overall look and feel by adding these wonderful
touches to furniture in your home
</h4>
<p class="text-primary mb-4">
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>
<!-- Autor + Compartir -->
<div class="d-flex justify-content-between align-items-center">
<div class="d-flex align-items-center gap-2">
<img src="images/avatar-michelle.jpg" class="avatar" alt="avatar" />
<div>
<h4 class="h6 text-primary">Michelle Appleton</h4>
<p class="text-muted small">28 Jun 2020</p>
</div>
</div>
<!-- Compartir -->
<div class="position-relative">
<!-- redes sociales -->
<div id="shareIcons" class="share-icons position-absolute d-flex gap-3 p-2 rounded">
<span class="text-uppercase text-white">Share</span>
<a href="#"><img src="images/icon-facebook.svg" alt="facebook"></a>
<a href="#"><img src="images/icon-twitter.svg" alt="twitter"></a>
<a href="#"><img src="images/icon-pinterest.svg" alt="pinterest"></a>
</div>
<button id="shareBtn"
class="btn btn-light rounded-circle d-flex justify-content-center align-items-center"
style="width: 40px; height: 40px;">
<img src="images/icon-share.svg" alt="share">
</button>
</div>
</div>
</div>
</section>
</div>
</div>
</main>
<script>
const shareBtn = document.getElementById("shareBtn");
const shareIcons = document.getElementById("shareIcons");
shareBtn.addEventListener("click", () => {
shareIcons.classList.toggle("show");
});
document.addEventListener("click", function (e) {
if (!shareBtn.contains(e.target) && !shareIcons.contains(e.target)) {
shareIcons.classList.remove("show");
}
});
</script>
</body>
</html>