-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
223 lines (194 loc) · 10.2 KB
/
Copy pathindex.html
File metadata and controls
223 lines (194 loc) · 10.2 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Espresso World Map</title>
<!-- Fonts + Leaflet -->
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400..900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.css"/>
<style>
:root{
--bg:#F5EFE7; --text:#231A14; --sub:#4a3b31; --border:#D7C7B6;
--gold:#E0A265; --coffee:#8C6A4A; --shadow:0 6px 24px rgba(0,0,0,.06);
--pill:#fff; --pillBorder:#ded1c5;
--chipDark:#101418; --chipGlow:#1b232b;
--accent:#ffd66b;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
margin:0; background:var(--bg); color:var(--text);
font-family:Inter, ui-sans-serif, system-ui;
-webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
a{color:inherit; text-decoration:none}
.wrap{max-width:1152px; margin:0 auto; padding:20px}
.links{display:flex; gap:8px; flex-wrap:wrap; margin:6px 0 14px}
.pill{
display:inline-flex; align-items:center; gap:8px;
padding:8px 12px; border:1px solid var(--pillBorder);
border-radius:999px; background:var(--pill); box-shadow:0 2px 10px rgba(0,0,0,.04);
font-weight:600; font-size:14px;
}
.brand{display:flex; align-items:center; gap:12px; margin:6px 0 8px}
.brand img{width:28px; height:28px; border-radius:6px; display:block}
h1{margin:0; font-weight:800; font-size:34px; letter-spacing:-0.02em}
p.sub{margin:2px 0 14px; color:var(--sub)}
#map{
height:520px; border:1px solid var(--border); border-radius:16px;
overflow:hidden; box-shadow:var(--shadow); background:#fff;
}
.leaflet-tooltip{
background:#fff; border:1px solid var(--border); color:var(--text);
border-radius:10px; box-shadow:0 6px 20px rgba(0,0,0,.06); font-weight:600;
}
h2{font-weight:800; font-size:22px; letter-spacing:-0.01em; margin:18px 0 10px}
.cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:16px}
.card{position:relative; border-radius:18px; overflow:hidden; background:#0b0f14;
border:1px solid var(--border); box-shadow:var(--shadow)}
.card .image{height:180px; background:#182028 url('') center/cover no-repeat; filter:brightness(.9)}
.card .overlay{
position:absolute; inset:0; padding:16px; display:flex; flex-direction:column; justify-content:flex-end;
color:#fff; background:linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.65) 100%);
}
/* ETHGlobal-like pieces */
.date-badge{
position:absolute; top:10px; left:10px; width:52px; background:#fff; color:#0b0f14;
border-radius:10px; padding:6px 6px 8px; text-align:center; box-shadow:0 8px 20px rgba(0,0,0,.2);
font-weight:900; line-height:1;
}
.date-badge .month{font-size:12px; letter-spacing:.06em}
.date-badge .day{font-size:18px; margin-top:2px}
.date-badge .dow{margin-top:2px; font-size:10px; font-weight:700; opacity:.8}
.tagbar{display:flex; gap:8px; flex-wrap:wrap; margin-top:8px}
.tag{
display:inline-flex; align-items:center; gap:6px;
padding:6px 10px; border-radius:999px; font-weight:700; font-size:12px;
background:linear-gradient(180deg,#0d141a,#121b24); border:1px solid rgba(255,255,255,.12);
box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);
}
.tag.location{background:linear-gradient(180deg,#0f171e,#16212b)}
.cta{
margin-top:10px; align-self:flex-start;
background:linear-gradient(180deg,#ffd86f,#ffbe3d); color:#1b120a;
padding:8px 14px; border-radius:10px; font-weight:900; font-size:13px;
box-shadow:0 10px 24px rgba(0,0,0,.25); border:none;
}
.label{display:inline-block; padding:4px 10px; border-radius:999px; font-weight:800; font-size:12px}
.label.upcoming{background:var(--gold); color:#2c221b; width:fit-content}
.list{background:#fff; border:1px solid var(--border); border-radius:16px; overflow:hidden; margin-top:10px}
.row{display:grid; grid-template-columns:1fr auto; align-items:center; gap:12px;
padding:14px 16px; border-bottom:1px solid var(--border)}
.row:last-child{border-bottom:none}
.pill-small{background:var(--coffee); color:#fff; border-radius:999px; padding:4px 10px; font-size:12px; font-weight:800}
.date{font-size:13px; opacity:.95}
</style>
</head>
<body>
<div class="wrap">
<div class="links">
<a class="pill" href="https://www.espressosys.com/" target="_blank" rel="noopener">🌐 Website</a>
<a class="pill" href="https://www.espressosys.com/community" target="_blank" rel="noopener">👥 Community</a>
<a class="pill" href="https://discord.com/invite/YHZPk5dbcq" target="_blank" rel="noopener">💬 Discord</a>
<a class="pill" href="https://x.com/EspressoSys" target="_blank" rel="noopener">𝕏 X</a>
</div>
<div class="brand">
<img src="espresso.png" alt="Espresso">
<h1>Espresso World Map</h1>
</div>
<p class="sub">Highlighting where Espresso has been and where we’re going next.</p>
<div id="map"></div>
<div class="section">
<h2>Upcoming Events</h2>
<div id="upcomingCards" class="cards"></div>
</div>
<div class="section">
<h2>Past Events</h2>
<div id="pastList" class="list"></div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.js"></script>
<script>
const EVENTS = [
{ city:'Denver', country:'USA', status:'past', coords:[39.7392,-104.9903], date:'01/01/2020' },
{ city:'San Francisco', country:'USA',status:'past', coords:[37.7749,-122.4194], date:'01/01/2020' },
{ city:'New York', country:'USA', status:'past', coords:[40.7128,-74.0060], date:'01/01/2000' },
{ city:'Cannes', country:'France', status:'past', coords:[43.5528,7.0174], date:'02/20/2000' },
{ city:'Bangkok', country:'Thailand', status:'past', coords:[13.7563,100.5018], date:'02/20/2000' },
{ city:'Brussels', country:'Belgium', status:'past', coords:[50.8503,4.3517], date:'02/20/2000' },
{ city:'Berlin', country:'Germany', status:'past', coords:[52.52,13.4050], date:'02/20/2000' },
{ city:'Seoul', country:'Korea', status:'upcoming', type:'Conference',
coords:[37.5665,126.9780], date:'12/12/2025',
img:'https://assets.raribleuserdata.com/prod/v1/image/t_image_preview/aHR0cHM6Ly9pcGZzLnJhcmlibGV1c2VyZGF0YS5jb20vaXBmcy9RbVNjWXRHdmhRQXpYNVNjaldVZEo1QlY3eE1KSkc4Ulo5REoyMkRHNkFhanVrLzIxMzYucG5n' },
{ city:'Buenos Aires', country:'Argentina', status:'upcoming', type:'Meetup',
coords:[-34.6037,-58.3816], date:'12/12/2025',
img:'https://assets.raribleuserdata.com/prod/v1/image/t_image_preview/aHR0cHM6Ly9pcGZzLnJhcmlibGV1c2VyZGF0YS5jb20vaXBmcy9RbVNjWXRHdmhRQXpYNVNjaldVZEo1QlY3eE1KSkc4Ulo5REoyMkRHNkFhanVrLzQ1ODkucG5n' },
];
const map = L.map('map', { worldCopyJump:true }).setView([20,10], 2.3);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution:'© OpenStreetMap', minZoom:2
}).addTo(map);
const iconUpcoming = L.icon({ iconUrl:'cup.png', iconSize:[42,42], iconAnchor:[21,28], popupAnchor:[0,-24] });
const iconPast = L.icon({ iconUrl:'pastev2.png',iconSize:[50,50], iconAnchor:[25,32], popupAnchor:[0,-28] });
EVENTS.forEach(e=>{
const icon = e.status==='past' ? iconPast : iconUpcoming;
L.marker(e.coords,{icon}).addTo(map).bindTooltip(
`<div style="font-weight:800">${esc(e.city)}</div>
<div style="opacity:.8">${esc(e.country)}</div>
<div style="margin-top:2px;font-weight:600">${esc(e.date)}</div>`
);
});
function renderUpcoming(){
const root = document.getElementById('upcomingCards'); root.innerHTML='';
EVENTS.filter(e=>e.status==='upcoming').forEach(e=>{
const el = document.createElement('article'); el.className='card';
const bg = e.img ? `style="background-image:url('${e.img}');background-size:cover;background-position:center;"` : '';
const {month,day,dow} = splitDate(e.date); // for badge
el.innerHTML = `
<div class="image" ${bg}></div>
<div class="overlay">
<div class="date-badge">
<div class="month">${month}</div>
<div class="day">${day}</div>
<div class="dow">${dow}</div>
</div>
<span class="label upcoming">Upcoming</span>
<h3 style="margin:8px 0 2px;font-weight:900;letter-spacing:-.01em;font-size:20px">${esc(e.city)}</h3>
<div style="opacity:.95">${esc(e.country)}</div>
<div class="tagbar">
<span class="tag location">📍 ${esc(e.city)}, ${esc(e.country)}</span>
<span class="tag">🏷️ ${esc(e.type||'Event')}</span>
<span class="tag">📅 ${esc(e.date)}</span>
</div>
<button class="cta" type="button">Apply to Attend</button>
</div>`;
root.appendChild(el);
});
}
function renderPast(){
const root = document.getElementById('pastList'); root.innerHTML='';
EVENTS.filter(e=>e.status==='past').forEach(e=>{
const row = document.createElement('div'); row.className='row';
row.innerHTML = `
<div>
<div style="font-weight:700">${esc(e.city)}</div>
<div style="opacity:.75;font-size:13px">${esc(e.country)}</div>
<div class="date">${esc(e.date)}</div>
</div>
<div><span class="pill-small">Past</span></div>`;
root.appendChild(row);
});
}
function esc(s){return String(s).replace(/[&<>"']/g,c=>({ '&':'&','<':'<','>':'>','"':'"',"'":''' }[c]))}
function splitDate(mmddyyyy){
const [mm,dd,yyyy]=mmddyyyy.split('/').map(Number);
const d=new Date(yyyy,mm-1,dd);
const mons=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];
const dows=["SUN","MON","TUE","WED","THU","FRI","SAT"];
return {month:mons[d.getMonth()], day:dd, dow:dows[d.getDay()]};
}
renderUpcoming(); renderPast();
</script>
</body>
</html>