-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
227 lines (219 loc) · 7.59 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
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>discombo</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
<script src="https://unpkg.com/konva@9/konva.min.js"></script>
<link rel="stylesheet" href="styles.css">
<style>
body {
margin: 0;
overflow: hidden;
background-color: rgb(0, 0, 48); /* #e7ddb0; /* Dark background for futuristic look */
font-family: 'Roboto', sans-serif;
}
#topnav {
position: fixed;
top: 20px; /* Adjusted to float */
left: 50%;
transform: translateX(-50%); /* Center the navbar */
width: 90%; /* Set width to 90% for better responsiveness */
background-color: rgba(10, 10, 10, 0.8); /* Semi-transparent background */
color: white;
padding: 10px 20px; /* Adjusted padding */
text-align: center; /* Align text to the center */
box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
border-radius: 10px; /* Rounded corners */
z-index: 10; /* Ensure it stays above the canvas */
}
#card-container {
position: fixed;
top: 80px; /* Below the navbar */
left: 50%;
transform: translateX(-50%);
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 20px; /* Space between cards */
z-index: 5; /* Ensure it stays above the canvas */
width: 90%; /* Match the navbar width */
}
.card {
background-color: rgba(50, 50, 50, 0.7); /* Brighter background for a futuristic look */
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
width: calc(100% - 20px); /* Full width of the container minus gap */
padding: 15px;
cursor: pointer;
transition: transform 0.2s, box-shadow 1.5s; /* Smooth transition for hover effects */
color: white; /* Text color for better visibility */
border: 1px solid #888;
}
.card:hover {
transform: scale(1.01);
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1); /* Enhanced shadow on hover */
}
.card-header {
font-weight: bold;
font-size: 1.4em;
margin-bottom: 10px;
}
.card-divider {
height: 2px; /* Height of the divider */
background-color: rgba(255, 255, 255, 0.3); /* Light color for the divider */
margin: 10px 0; /* Margin around the divider */
}
.card-body {
font-size: 1.2em;
margin-bottom: 10px;
}
.card-footer {
font-size: 1.0em;
color: gray;
}
/* Horizontal rule styling */
.card-hr {
border: none;
height: 2px;
background-color: rgba(255, 255, 255, 0.3); /* Light color for the horizontal rule */
margin: 10px 0; /* Margin around the horizontal rule */
}
/* Dropdown styles */
.dropdown {
position: relative;
display: inline-block;
padding-right: 5%;
}
.dropdown-content {
display: none;
position: absolute;
background-color: rgba(10, 10, 10, 0.9); /* Match navbar color */
min-width: 160px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
z-index: 1;
border-radius: 10px;
}
.dropdown-content a {
color: white;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {
background-color: rgba(255, 255, 255, 0.1); /* Light hover effect */
}
.dropdown:hover .dropdown-content {
display: block; /* Show dropdown on hover */
}
/* Modal styles */
.modal {
display: none; /* Hidden by default */
position: fixed;
z-index: 100;
border-radius: 8px;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(10, 10, 10, 0.7); /* Dark background for modal */
}
.modal-content {
background-color: rgba(30, 30, 30, 0.75); /* Match card color */
margin: 15% auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
border-radius: 15px;
color: white; /* Text color for better visibility */
}
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: white; /* Change close button color on hover */
text-decoration: none;
cursor: pointer;
}
h1, h2, h3 { color: #333; }
p { margin: 0.5em 0; }
section { margin-bottom: 2em; }
code { background: #f4f4f4; padding: 0.2em; }
/* Responsive Styles */
@media (max-width: 768px) {
#topnav {
padding: 10px; /* Reduce padding */
}
.card {
width: calc(100% - 20px); /* Full width of the container minus gap */
padding: 10px; /* Reduce padding */
}
.card-header {
font-size: 1.3em; /* Adjust font size */
}
.card-body {
font-size: 1.1em; /* Adjust font size */
}
.card-footer {
font-size: 0.9em; /* Adjust font size */
}
.close {
font-size: 24px; /* Adjust close button size */
}
}
@media (max-width: 480px) {
#topnav {
padding: 10px; /* Further reduce padding */
}
.card {
padding: 8px; /* Further reduce padding */
}
.card-header {
font-size: 1.2em; /* Adjust font size */
}
.card-body {
font-size: 1.0em; /* Adjust font size */
}
.card-footer {
font-size: 0.8em; /* Adjust font size */
}
.close {
font-size: 20px; /* Adjust close button size */
}
}
</style>
</head>
<body>
<div id="topnav">
<span style="display: flex; align-items: center; justify-content: space-between; width: 100%;">
<h2 style="margin: 0; padding-right: 20px;"><b>discombo</b></h2>
<div class="dropdown" style="margin-left: auto;">
<span>Menu</span>
<div class="dropdown-content">
<a href="#">Item 1</a>
<a href="#">Item 2</a>
<a href="#">Item 3</a>
</div>
</div>
<a href="#" style="color: white; padding-right: 5%; margin-left: 20px; text-decoration: none;">Link</a>
</span>
</div>
<div id="container"></div>
<div id="card-container"></div>
<div id="myModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<h2 id="modal-title"></h2>
<p id="modal-body"></p>
</div>
</div>
<script src="konva.js"></script>
<script type="module" src="ui.js"></script>
<script type="module" src="blogs.js"></script>
</body>
</html>