-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
117 lines (110 loc) · 4.41 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet" />
<link href="styles/global.css" rel="stylesheet" />
<link href="styles/home_lg.css" rel="stylesheet" />
<link href="styles/home_sm.css" rel="stylesheet" />
<style>
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900&display=swap");
</style>
<title>Sports News : Home</title>
</head>
<body class="flex flex-col min-h-screen m-0">
<header class="opacity-100 lg:shadow-drop-center sticky top-0 left-0 z-10 lg:w-full font-bold text-xl">
<nav class="m-0 text-white py-6 justify-around content-center flex-grow-1 hidden lg:flex" id="nav-lg">
<a class="py-1 px-3 text-green-500 h-fit text-center" href="#">Home</a>
<a class="py-1 px-3 h-fit text-center text-white hover:text-gray-500" href="./league/index.html">Leagues</a>
<a class="py-1 px-3 h-fit text-center text-white hover:text-gray-500" href="./trending/index.html">Trending</a>
<a class="py-1 px-3 h-fit text-center text-white hover:text-gray-500" href="./locker/index.html">Locker</a>
</nav>
<div class="flex flex-col justify-center items-center lg:hidden" id="mobile-topnav">
<div class="flex w-screen">
<button class=" text-white opacity-75 m-2 flex justify-between lg:hidden h-16 w-16 z-10" id="nav-sm-btn"
aria-expanded="false" aria-controls="nav-sm">
<svg class="h-full w-full" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
<h3 class="text-white self-center">Sports News</h3>
</div>
<nav class="lg:hidden h-0 w-64 left-0 flex flex-col justify-evenly items-center rounded-br-xl" id="nav-sm"
aria-hidden="true" role="navigation">
<a class="font-bold text-white text-center py-7 px-20" href="#">Home</a>
<a class="font-bold text-white text-center py-7 px-20" href="./league/index.html">Leagues</a>
<a class="font-bold text-white text-center py-7 px-20" href="./trending/index.html">Trending</a>
<a class="font-bold text-white text-center py-7 px-20" href="./locker/index.html">Locker</a>
</nav>
</div>
<script src="./scripts/nav-sm.js"></script>
</header>
<main>
<div class="card-container">
<div class="shadow-drop-center card" id="card-leagues">
<img src="images/National_Football_League_logo.webp" alt="NFL logo" />
<div class="magic-cover">
<span>Leagues</span>
</div>
</div>
<div class="shadow-drop-center card" id="card-trending">
<img src="images/trending_card_img.png"
alt="Trending stat photo credit: Jordan Fortin Belanger at behance.net" />
<div class="magic-cover"><span>Trending</span></div>
</div>
<div class="shadow-drop-center card" id="card-locker">
<ul class="pulsate-fwd">
<li>
<div class="line"></div>
</li>
<li>
<div class="line"></div>
</li>
<li>
<div class="line"></div>
</li>
<li>
<div class="line"></div>
</li>
<li>
<div class="line"></div>
</li>
</ul>
<div class="magic-cover"><span>Locker</span></div>
</div>
</div>
</main>
</body>
<script>
let cards = document.querySelectorAll(".card-container .card");
console.log(cards);
cards.forEach((element) => {
element.addEventListener(
"mouseover",
() => {
element.querySelector(".magic-cover").classList.add("text-focus-in");
},
element.addEventListener("mouseleave", () => {
element
.querySelector(".magic-cover")
.classList.remove("text-focus-in");
})
);
});
</script>
<script>
let screenWidth = window.innerWidth;
if (screenWidth < 768) {
let cards = document.querySelectorAll(".card-container .card");
cards.forEach((element) => {
element.addEventListener("click", () => {
element
.querySelector(".magic-cover")
.classList.toggle("text-focus-in");
});
});
}
</script>
</html>