a little facelift

This commit is contained in:
2022-03-20 10:26:44 -04:00
parent 54238032c9
commit 7fa62b1380
2 changed files with 211 additions and 77 deletions

View File

@@ -69,12 +69,12 @@
<div>
<ul class="nav">
<li><h2>The Many Independent Bookstores of New York City</h2></li>
<li><a id="viewInfo">info</a></li>
<li><a id="viewInfo">intro</a></li>
<li>
<a
href="https://git.yetaga.in/alazyreader/nyc-bookstores/"
target="_blank"
>git</a
>source</a
>
</li>
<li>
@@ -109,8 +109,8 @@
<p>
While Manhattan and Brooklyn still lead the pack, Queens has a
respectable number of stores, and all five boroughs are represented,
with the Bronx and Staten Island both hosting independent stores.
Lower Manhattan has the highest density of booksellers, however.
with the Bronx and Staten Island both hosting lone independent
stores. Lower Manhattan has the highest density of booksellers.
</p>
<p>
The listings here are kept up-to-date to the best of my ability;
@@ -145,10 +145,6 @@
<div id="Stores">
<table>
<tbody>
<tr>
<th class="tHeader">Name</th>
<th class="tHeader">Address</th>
</tr>
<tr id="" class="spotRow">
<td class="name">192 Books</td>
<td>192 10th Ave, New York</td>
@@ -548,10 +544,6 @@
<script id="Table" type="text/html">
<table>
<tr>
<th class="tHeader">Name</th>
<th class="tHeader">Address</th>
</tr>
{{#rows}}
<tr id="{{rowNumber}}" class="spotRow">
<td class="name">{{name}}</td>
@@ -577,14 +569,11 @@
>
</p>
<ul>
<li>
<span class="store-details">Events:</span>
{{events}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span class="store-details">Caf&eacute;:</span> {{cafe}}
</li>
{{#website}}
<li><a href="{{website}}" target="_blank">{{website}}</a></li>
{{/website}}
<li class="storeDetails">Events: {{events}}</li>
<li class="storeDetails">Caf&eacute;: {{cafe}}</li>
</ul>
{{#description}}
<p class="description">{{description}}</p>
@@ -598,7 +587,7 @@
container: "map",
style: "mapbox://styles/mapbox/basic-v9",
center: [-73.957292, 40.729071], // arbitrary center point
zoom: 10,
zoom: 9,
minZoom: 9,
maxZoom: 17,
dragRotate: false,
@@ -681,7 +670,7 @@
}
function updateSelectedStore(store, pushState = false) {
map.flyTo({ center: [store.long, store.lat] });
map.flyTo({ center: [store.long, store.lat], zoom: 12 });
popup.setLngLat([store.long, store.lat]).setHTML(store.name).addTo(map);
@@ -781,12 +770,10 @@
var template = $("#Table").html();
var rendered = Mustache.render(template, { rows: data });
$("#Stores").html(rendered);
$("#Stores tbody tr")
.not(":first")
.on("click", function () {
updateSelectedStore(data[$(this)[0].id], true);
$(window).scrollTo($("#selected"), 250, { offset: { top: -15 } });
});
$("#Stores tbody tr").on("click", function () {
updateSelectedStore(data[$(this)[0].id], true);
$(window).scrollTo($("#selected"), 250, { offset: { top: -15 } });
});
$("#viewInfo").on("click", showInfo);
}