-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcafe.html
More file actions
190 lines (163 loc) · 4.87 KB
/
cafe.html
File metadata and controls
190 lines (163 loc) · 4.87 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Premium Cafe</title>
<style>
body {
font-family: sans-serif;
margin: 0;
background-color: #000;
color: #fff;
}
header {
background-color: #222;
padding: 20px;
text-align: center;
}
nav {
background-color: #333;
padding: 10px;
text-align: center;
}
nav a {
color: #fff;
text-decoration: none;
padding: 10px 20px;
margin: 0 10px;
border-radius: 5px;
transition: background-color 0.3s ease;
display: inline-block; /* Key for better mobile nav */
}
nav a:hover {
background-color: #d32f2f;
color: #fff;
}
section {
padding: 20px;
}
.hero {
background-image: url('cafe-hero-image.jpg');
background-size: cover;
background-position: center;
color: #fff;
text-align: center;
padding: 100px 0;
}
.hero h1 {
font-size: 2em; /* Adjusted for smaller screens */
margin-bottom: 20px;
}
.hero p {
font-size: 1em; /* Adjusted for smaller screens */
margin-bottom: 30px;
}
.cta-button {
display: inline-block;
background-color: #d32f2f;
color: #fff;
padding: 15px 30px;
text-decoration: none;
border-radius: 5px;
font-size: 1em; /* Adjusted for smaller screens */
transition: background-color 0.3s ease;
}
.cta-button:hover {
background-color: #f44336;
}
.menu-items {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
}
.menu-item {
background-color: #111;
padding: 20px;
border-radius: 10px;
text-align: center;
}
.menu-item img {
max-width: 100%;
height: auto;
border-radius: 5px;
margin-bottom: 10px;
}
.menu-item h2 {
color: #d32f2f;
font-size: 1.2em; /* Adjusted for smaller screens */
}
footer {
background-color: #222;
padding: 20px;
text-align: center;
}
/* Media Queries for Responsiveness */
@media (max-width: 768px) { /* Tablet and smaller */
nav a {
display: block; /* Stack navigation links vertically */
margin: 10px 0; /* Add margin between stacked links */
text-align: center; /* Center the text within the links */
}
.hero h1 {
font-size: 1.5em;
}
.hero p {
font-size: 0.9em;
}
.cta-button {
font-size: 0.9em;
padding: 10px 20px; /* Smaller button on mobile */
}
.menu-items {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjust grid for smaller screens */
}
.menu-item h2 {
font-size: 1em;
}
}
@media (max-width: 480px) { /* Phone and smaller */
.menu-items {
grid-template-columns: 1fr; /* Single column on very small screens */
}
}
</style>
</head>
<body>
<header>
<h1>Premium Cafe</h1>
</header>
<nav>
<a href="#">Home</a>
<a href="#">Menu</a>
<a href="#">About</a>
<a href="#">Contact</a>
</nav>
<section class="hero">
<h1>Experience the Finest Coffee</h1>
<p>Indulge in our exquisite blends and delectable treats.</p>
<a href="#" class="cta-button">View Menu</a>
</section>
<section class="menu-items">
<div class="menu-item">
<img src="1.jpg" alt="Coffee 1"> <h2>Espresso</h2>
<p>A classic and intense coffee.</p>
</div>
<div class="menu-item">
<img src="2.jpg" alt="Coffee 2"> <h2>Cappuccino</h2>
<p>A creamy and frothy delight.</p>
</div>
<div class="menu-item">
<img src="3.jpg" alt="Pastry 1"> <h2>Croissant</h2>
<p>A buttery and flaky pastry.</p>
</div>
<div class="menu-item">
<img src="4.jpg" alt="Pastry 2"> <h2>Muffin</h2>
<p>A sweet and moist treat.</p>
</div>
</section>
<footer>
<p>© 2023 Premium Cafe. All rights reserved.</p>
</footer>
</body>
</html>