-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
182 lines (161 loc) · 7.92 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
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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Kaushan Script' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Aguafina Script' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Bad Script' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Tillana' rel='stylesheet'>
<link rel="stylesheet" href="styles/main.css">
<script>
// get the value of the bottom of the #main element by adding the offset of that element plus its height, set it as a variable
//var mainbottom = $('#main').offset().top + $('#main').height();
// on scroll,
$(window).scroll(function () {
var $heightScrolled = $(window).scrollTop();
var $defaultHeight = 10;
console.log($heightScrolled);
if ( $heightScrolled < $defaultHeight )
{
$('.fixed-top').removeClass("b")
$('.fixed-top').addClass("a")
console.log("a class added");
}
else {
$('.fixed-top').addClass("b")
console.log("b class added");
}
});
</script>
</head>
<body>
<!-- Navbar Start Here -->
<nav class="navbar navbar-expand-md navbar-dark bg-dark flex-row fixed-top">
<a class="navbar-brand mr-auto" href="/">
<img src="https:////placehold.it/120x29?text=Logo" class="img-fluid" alt="Responsive image">
</a>
<ul class="navbar-nav flex-row mr-lg-0">
<li class="nav-item">
<a class="nav-link pr-2 float-right"><i class="fa fa-facebook"></i></a>
</li>
</ul>
<button class="navbar-toggler ml-lg-0 order-first" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="//codeply.com/go/cxXqBnGrPx">Codeply</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
</ul>
<ul class="navbar-nav flex-row mr-lg-0">
<li class="nav-item">
<a class="nav-link pr-2 float-right"><i class="fa fa-facebook"></i></a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
<!-- Main Content -->
<div class="content" id="main" >
<h2 class="red-text text-center p-1">your text</h2>
<hr>
<div class="row justify-content-center">
<div class="card" style="width: 18rem;">
<img class="card-img-top" src="images/food-3356314_1920.jpg" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Chicken Biryani</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
<div class="card-footer clearfix">
<span class="label">$35.99 per kg</span>
<a href="#" class="card-link cart-btn float-right" data-toggle="tooltip" data-placement="left" title="Min Order 2Kg"">Cart <i class="fa fa-shopping-cart fa"></i></a>
</div>
</div>
<div class="card" style="width: 18rem;">
<img class="card-img-top" src="images/food-3356314_1920.jpg" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Chicken Biryani</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
<div class="card-footer clearfix">
<span class="label">$35.99 per kg</span>
<a href="#" class="card-link cart-btn float-right" data-toggle="tooltip" data-placement="left" title="Min Order 2Kg">Cart <i class="fa fa-shopping-cart fa"></i></a>
</div>
</div>
<div class="card" style="width: 18rem;">
<img class="card-img-top" src="images/food-3356314_1920.jpg" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Chicken Biryani</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
<div class="card-footer clearfix">
<span class="label">$35.99 per kg</span>
<a href="#" class="card-link cart-btn float-right" data-toggle="tooltip" data-placement="left" title="Min Order 2Kg">Cart <i class="fa fa-shopping-cart fa"></i></a>
</div>
</div>
<div class="card" style="width: 18rem;">
<img class="card-img-top" src="images/food-3356314_1920.jpg" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Chicken Biryani</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
<div class="card-footer clearfix">
<span class="label">$35.99 per kg</span>
<a href="#" class="card-link cart-btn float-right" data-toggle="tooltip" data-placement="left" title="Min Order 2Kg">Cart <i class="fa fa-shopping-cart fa"></i></a>
</div>
</div>
<div class="card" style="width: 18rem;">
<img class="card-img-top" src="images/food-3356314_1920.jpg" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Chicken Biryani</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
<div class="card-footer clearfix">
<span class="label">$35.99 per kg</span>
<a href="#" class="card-link cart-btn float-right" data-toggle="tooltip" data-placement="left" title="Min Order 2Kg">Cart <i class="fa fa-shopping-cart fa"></i></a>
</div>
</div>
</div>
<!--
<h1>This page is horizontally centered on screens that are wider than 500 pixels.</h1>
<h1>Resize the browser window to see the effect.</h1>
<p>This page is always centered on screens that are wider than 500px. On screens that are less than
500px wide, it will span the whole of the page.</p>
<p>Content inside this container is centered horizontally.</p>
<p>Content inside this container is centered horizontally.</p>
<p>Content inside this container is centered horizontally.</p>
<p>Content inside this container is centered horizontally.</p>
<p>Content inside this container is centered horizontally.</p>
<p>Content inside this container is centered horizontally.</p>
<p>Content inside this container is centered horizontally.</p>
<p>Content inside this container is centered horizontally.</p>
<p>Content inside this container is centered horizontally.</p> -->
</div>
<script>
$('[data-toggle="tooltip"]').tooltip()
</script>
</body>
</html>