remove mustache
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
David 2023-03-07 17:56:58 -05:00
parent 6d6630b7c1
commit a819dd702c
3 changed files with 260 additions and 173 deletions

View File

@ -3,7 +3,7 @@
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script
async
async=""
src="https://www.googletagmanager.com/gtag/js?id=G-BNVKSB6DVW"
></script>
<script>
@ -27,7 +27,6 @@
<link rel="icon" type="image/png" href="/img/favicon.png" />
<link rel="apple-touch-icon" href="/img/social.jpg" />
<script type="text/javascript" src="/js/jquery.3.6.0.js"></script>
<script type="text/javascript" src="/js/mustache.4.1.0.js"></script>
<script type="text/javascript" src="/js/jquery.scrollTo.2.1.3.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://api.mapbox.com/mapbox-gl-js/v2.7.0/mapbox-gl.js"></script>
@ -43,7 +42,7 @@
media="screen"
rel="stylesheet"
type="text/css"
href="/css/site.css"
href="/css/site.css?1678229090807?1678229616129?1678229646573?1678229670306?1678229728212?1678229754175?1678229784956"
/>
<meta
property="title"
@ -145,9 +144,9 @@
survives at this point).
</p>
<p>
There are currently <span id="storeCount">96</span> stores indexed
There are currently <span id="storeCount">111</span> stores indexed
on this page. Last updated
<span id="updatedOn">March 20, 2022</span>.
<span id="updatedOn">March 7, 2023</span>.
</p>
</div>
<div id="selected"></div>
@ -159,391 +158,451 @@
<div id="Stores">
<table>
<tbody>
<tr id="" class="spotRow">
<tr id="0" class="spotRow">
<td class="name">1804 Books</td>
<td>320 W 37th Street, New York</td>
</tr>
<tr id="1" class="spotRow">
<td class="name">192 Books</td>
<td>192 10th Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="2" class="spotRow">
<td class="name">Adanne</td>
<td>234 Water Street, Brooklyn</td>
</tr>
<tr id="3" class="spotRow">
<td class="name">Aeon Bookstore</td>
<td>151 East Broadway, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="4" class="spotRow">
<td class="name">Alabaster Bookshop</td>
<td>122 4th Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="5" class="spotRow">
<td class="name">Albertine Books</td>
<td>972 Fifth Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="6" class="spotRow">
<td class="name">Archestratus</td>
<td>160 Huron St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="7" class="spotRow">
<td class="name">Argosy Books</td>
<td>116 East 59th St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="8" class="spotRow">
<td class="name">Astoria Bookshop</td>
<td>31-29 31st St, Astoria</td>
</tr>
<tr id="" class="spotRow">
<tr id="9" class="spotRow">
<td class="name">Avoid The Day Bookstore &amp; Cafe</td>
<td>99-04 A Rockaway Beach Blvd, Rockaway Park</td>
</tr>
<tr id="" class="spotRow">
<tr id="10" class="spotRow">
<td class="name">Berl's Brooklyn Poetry Shop</td>
<td>126A Front St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="11" class="spotRow">
<td class="name">Better Read Than Dead</td>
<td>867 Broadway, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="12" class="spotRow">
<td class="name">Better Read Than Dead &amp; Burly Coffee</td>
<td>90 Kosciuszko St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="13" class="spotRow">
<td class="name">Bluestockings Cooperative</td>
<td>116 Suffolk Street, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="14" class="spotRow">
<td class="name">Bonnie Slotnick Cookbooks</td>
<td>28 East 2nd St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="15" class="spotRow">
<td class="name">Book Club Bar</td>
<td>197 E 3rd St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="16" class="spotRow">
<td class="name">Book Culture</td>
<td>536 W 112th St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="17" class="spotRow">
<td class="name">Book Culture LIC</td>
<td>26-09 Jackson Ave, Queens</td>
</tr>
<tr id="" class="spotRow">
<tr id="18" class="spotRow">
<td class="name">Book Culture on Broadway</td>
<td>2915 Broadway, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="19" class="spotRow">
<td class="name">Book Thug Nation</td>
<td>100 North 3rd St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="20" class="spotRow">
<td class="name">Bookmarc</td>
<td>400 Bleecker St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="21" class="spotRow">
<td class="name">BookMark Shoppe</td>
<td>8415 3rd Avenue, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="22" class="spotRow">
<td class="name">Bookoff</td>
<td>49 W 45nd St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Books Are Magic</td>
<tr id="23" class="spotRow">
<td class="name">Bookoff Brooklyn</td>
<td>934 3rd Ave, Brooklyn</td>
</tr>
<tr id="24" class="spotRow">
<td class="name">Books Are Magic (Montague St.)</td>
<td>122 Montague St, Brooklyn</td>
</tr>
<tr id="25" class="spotRow">
<td class="name">Books Are Magic (Smith St.)</td>
<td>225 Smith St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="26" class="spotRow">
<td class="name">Books Of Wonder</td>
<td>42 West 17th St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Books Of Wonder (Upper West Side)</td>
<td>217 West 84th St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="27" class="spotRow">
<td class="name">Boulevard Books</td>
<td>7518 13th Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="28" class="spotRow">
<td class="name">Bravo's Book Nook</td>
<td>115 MacDougal St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="29" class="spotRow">
<td class="name">Burnt Books</td>
<td>1014 Manhattan Ave, Brooklyn</td>
</tr>
<tr id="30" class="spotRow">
<td class="name">Cafe con Libros</td>
<td>724 Prospect Place, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="31" class="spotRow">
<td class="name">Catland</td>
<td>987 Flushing Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="32" class="spotRow">
<td class="name">Chartwell Booksellers</td>
<td>55 E 52nd St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Civil Service Book Shop</td>
<td>34 Carmine St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="33" class="spotRow">
<td class="name">Codex Books</td>
<td>1 Bleecker St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="34" class="spotRow">
<td class="name">Community Bookstore</td>
<td>143 7th Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="35" class="spotRow">
<td class="name">Cups and Books</td>
<td>2024 Bedford Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="36" class="spotRow">
<td class="name">Dashwood Books</td>
<td>33 Bond St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="37" class="spotRow">
<td class="name">Dear Friend Books</td>
<td>343A Tompkins Avenue, Brooklyn</td>
</tr>
<tr id="38" class="spotRow">
<td class="name">Desert Island Comics</td>
<td>540 Metropolitan Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="39" class="spotRow">
<td class="name">East Village Books</td>
<td>99 St. Mark's Place, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="40" class="spotRow">
<td class="name">ETG Book Cafe</td>
<td>208 Bay St, Staten Island</td>
</tr>
<tr id="" class="spotRow">
<tr id="41" class="spotRow">
<td class="name">Freebird Books</td>
<td>123 Columbia St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="42" class="spotRow">
<td class="name">Greenlight Bookstore</td>
<td>686 Fulton St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="43" class="spotRow">
<td class="name">
Greenlight Bookstore (Prospect Lefferts Gardens)
</td>
<td>632 Flatbush Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="44" class="spotRow">
<td class="name">Here's A Book Store</td>
<td>1964 Coney Island Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="45" class="spotRow">
<td class="name">Hey Kids! Comics</td>
<td>157 Huron St, Brooklyn</td>
</tr>
<tr id="46" class="spotRow">
<td class="name">Housing Works Bookstore Café</td>
<td>126 Crosby St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="47" class="spotRow">
<td class="name">Human Relations Books</td>
<td>1067 Flushing Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="48" class="spotRow">
<td class="name">Idlewild Books</td>
<td>170 7th Avenue S, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="49" class="spotRow">
<td class="name">James Cummins Bookseller</td>
<td>699 Madison Ave, 7th Floor, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="50" class="spotRow">
<td class="name">Joanne Hendricks Cookbooks</td>
<td>488 Greenwich St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="51" class="spotRow">
<td class="name">Karma Bookstore</td>
<td>136 East Third St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="52" class="spotRow">
<td class="name">Kew &amp; Willow Books</td>
<td>81-63 Lefferts Boulevard, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="53" class="spotRow">
<td class="name">Kinokunya</td>
<td>1073 Avenue of the Americas, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="54" class="spotRow">
<td class="name">Kitchen Arts &amp; Letters</td>
<td>1435 Lexington Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="55" class="spotRow">
<td class="name">Leaves Bookstore</td>
<td>140 Nassau Ave, Brooklyn</td>
</tr>
<tr id="56" class="spotRow">
<td class="name">Left Bank Books</td>
<td>41 Perry Street, New York</td>
</tr>
<tr id="57" class="spotRow">
<td class="name">Logos Bookstore</td>
<td>1575 York Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="58" class="spotRow">
<td class="name">Mast Books</td>
<td>72 Avenue A, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="59" class="spotRow">
<td class="name">McNally Jackson Books</td>
<td>52 Prince St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="60" class="spotRow">
<td class="name">McNally Jackson Books City Point</td>
<td>445 Albee Square W, Unit G112, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="61" class="spotRow">
<td class="name">McNally Jackson Books Seaport</td>
<td>4 Fulton St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="62" class="spotRow">
<td class="name">McNally Jackson Books Williamsburg</td>
<td>76 North 4th St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="63" class="spotRow">
<td class="name">McNally Jackson Rockefeller Center</td>
<td>1 Rockefeller Plaza, New York</td>
</tr>
<tr id="64" class="spotRow">
<td class="name">Melville House Publishers</td>
<td>46 John St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="65" class="spotRow">
<td class="name">Mercer Street Books &amp; Records</td>
<td>206 Mercer St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="66" class="spotRow">
<td class="name">Mil Mundos Books</td>
<td>323 Linden St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="67" class="spotRow">
<td class="name">Molasses Books</td>
<td>770 Hart St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="68" class="spotRow">
<td class="name">Namaste Bookshop</td>
<td>2 W 14th St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="69" class="spotRow">
<td class="name">P&amp;T Knitwear</td>
<td>180 Orchard Street, New York</td>
</tr>
<tr id="70" class="spotRow">
<td class="name">Pillow-Cat Books</td>
<td>328 East 9th St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="71" class="spotRow">
<td class="name">Posman Books Chelsea Market</td>
<td>75 9th Avenue, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">PowerHouse Arena</td>
<tr id="72" class="spotRow">
<td class="name">POWERHOUSE @ IC</td>
<td>220 36th Street, Building #2, Brooklyn</td>
</tr>
<tr id="73" class="spotRow">
<td class="name">POWERHOUSE Arena</td>
<td>28 Adams St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">PowerHouse on 8th</td>
<tr id="74" class="spotRow">
<td class="name">POWERHOUSE on 8th</td>
<td>1111 8th Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="75" class="spotRow">
<td class="name">Printed Matter</td>
<td>231 11th Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="76" class="spotRow">
<td class="name">Printed Matter St. Marks</td>
<td>38 St. Marks Pl, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="77" class="spotRow">
<td class="name">Quest Bookshop</td>
<td>240 E 53rd St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="78" class="spotRow">
<td class="name">Quimby's Bookstore</td>
<td>536 Metropolitan Avenue, Brooklyn</td>
</tr>
<tr id="79" class="spotRow">
<td class="name">Recirculation</td>
<td>876 Riverside Dr, New York</td>
</tr>
<tr id="80" class="spotRow">
<td class="name">Respect For Life Books-N-Things</td>
<td>537 Nostrand Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="81" class="spotRow">
<td class="name">Revolution Books</td>
<td>437 Malcolm X Blvd, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="82" class="spotRow">
<td class="name">Rizzoli Bookstore</td>
<td>1133 Broadway, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="83" class="spotRow">
<td class="name">Shakespeare &amp; Company</td>
<td>939 Lexington Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="84" class="spotRow">
<td class="name">
Shakespeare &amp; Company (Upper West Side)
</td>
<td>2020 Broadway, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="85" class="spotRow">
<td class="name">Sister's Uptown Bookstore</td>
<td>1942 Amsterdam Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="86" class="spotRow">
<td class="name">Spoonbill &amp; Sugartown, Booksellers</td>
<td>218 Bedford Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="87" class="spotRow">
<td class="name">Standards Manual</td>
<td>212 Franklin Street, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="88" class="spotRow">
<td class="name">Strand Bookstore</td>
<td>828 Broadway, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="89" class="spotRow">
<td class="name">Sweet Pickle Books</td>
<td>47 Orchard St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="90" class="spotRow">
<td class="name">Terrace Books</td>
<td>242 Prospect Park West, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="91" class="spotRow">
<td class="name">The Austin Book Shop</td>
<td>104-29 Jamaica Ave, Richmond Hill</td>
</tr>
<tr id="" class="spotRow">
<tr id="92" class="spotRow">
<td class="name">The Book Cellar</td>
<td>1465 York Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="93" class="spotRow">
<td class="name">The Center for Fiction</td>
<td>15 Lafayette Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="94" class="spotRow">
<td class="name">The Corner Bookstore</td>
<td>1313 Madison Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="95" class="spotRow">
<td class="name">The Drama Book Shop</td>
<td>266 W 39th St, New York</td>
</tr>
<tr id="96" class="spotRow">
<td class="name">The Lit. Bar</td>
<td>131 Alexander Ave, Bronx</td>
</tr>
<tr id="" class="spotRow">
<tr id="97" class="spotRow">
<td class="name">The Mysterious Bookshop</td>
<td>58 Warren St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="98" class="spotRow">
<td class="name">The Strand At Columbus Ave</td>
<td>450 Columbus Avenue, New York</td>
</tr>
<tr id="99" class="spotRow">
<td class="name">The Word Is Change</td>
<td>368 Tompkins Avenue, Brooklyn</td>
</tr>
<tr id="100" class="spotRow">
<td class="name">Three Lives &amp; Company</td>
<td>238 West 10th St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="101" class="spotRow">
<td class="name">Topos Bookstore Cafe</td>
<td>788 Woodward Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="102" class="spotRow">
<td class="name">Troubled Sleep Books</td>
<td>129 6th Ave, Brooklyn</td>
</tr>
<tr id="103" class="spotRow">
<td class="name">Turn The Page... Again</td>
<td>39-15a Bell Blvd, Flushing</td>
</tr>
<tr id="" class="spotRow">
<tr id="104" class="spotRow">
<td class="name">Unnameable Books</td>
<td>600 Vanderbilt Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Unoppressive Non-Imperialist Bargain Books</td>
<td>34 Carmine St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="105" class="spotRow">
<td class="name">Ursus Books</td>
<td>50 East 78th St, Suite 1C, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="106" class="spotRow">
<td class="name">Westsider Rare &amp; Used Books</td>
<td>2246 Broadway, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="107" class="spotRow">
<td class="name">Westsider Records</td>
<td>233 West 72nd St, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="108" class="spotRow">
<td class="name">Word Bookstore</td>
<td>126 Franklin St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<tr id="109" class="spotRow">
<td class="name">Word Up Books</td>
<td>2113 Amsterdam Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<tr id="110" class="spotRow">
<td class="name">Yu and Me Books</td>
<td>44 Mulberry St, New York</td>
</tr>
@ -554,55 +613,7 @@
</div>
<!-- end wrapper -->
<script id="Table" type="text/html">
<table>
{{#rows}}
<tr id="{{rowNumber}}" class="spotRow">
<td class="name">{{name}}</td>
<td>{{address}}, {{city}}</td>
</tr>
{{/rows}}
</table>
</script>
<script id="selectedStore" type="text/html">
{{#store}}
<h2>{{name}}</h2>
<p class="address">{{address}}</p>
<p></p>
<p class="address">
{{city}},NY {{#postcode}} {{postcode}} {{/postcode}}
</p>
<p>
View in:
<a
href="https://maps.google.com/maps?q={{nameURLEscaped}} {{address}},{{city}},NY"
target="_blank"
>Google Maps</a
>
{{#isAppleIsh}}
<a
href="http://maps.apple.com/?q={{nameURLEscaped}}&address={{address}},{{city}},NY"
target="_blank"
>Apple Maps</a
>
{{/isAppleIsh}}
</p>
<ul>
{{#website}}
<li><a href="{{website}}" target="_blank">{{cleanedWebsite}}</a></li>
{{/website}}
<li class="storeDetails">Events: {{events}}</li>
<li class="storeDetails">Caf&eacute;: {{cafe}}</li>
</ul>
{{#description}}
<p class="description">{{description}}</p>
{{/description}} {{/store}}
</script>
<script>
isAppleIsh = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);
mapboxgl.accessToken =
"pk.eyJ1IjoiYWxhenlyZWFkZXIiLCJhIjoiY2lucDZhb2JxMHp6MHRxa2pvaTFoOWpuZyJ9.DILGYYxxt7A-A_lHHwp6tQ";
var map = new mapboxgl.Map({
@ -620,6 +631,74 @@
closeButton: false,
});
function TableViewTemplate(rows) {
table = "<table>";
rows.forEach((row) => {
table = table + TableRowTemplate(row);
});
return table + "</table>";
}
function TableRowTemplate({ rowNumber, name, address, city }) {
return `<tr id="${rowNumber}" class="spotRow">
<td class="name">${name}</td><td>${address}, ${city}</td>
</tr>`;
}
function SelectedStoreTemplate({
name,
address,
city,
postcode,
website,
events,
cafe,
description,
}) {
const isAppleIsh = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);
return `
<h2>${name}</h2>
<p class="address">${address}</p>
<p></p>
<p class="address">
${city}, NY ${postcode}
</p>
<p>
View in:
<a
href="https://maps.google.com/maps?q=${encodeURIComponent(
name
)}+${address},${city},NY"
target="_blank"
>Google Maps</a
>
${
isAppleIsh
? `
<a
href="http://maps.apple.com/?q=${encodeURIComponent(
name
)}&address=${address},${city},NY"
target="_blank"
>Apple Maps</a
>`
: ""
}
</p>
<ul>
${
website
? `<li><a href="${website}" target="_blank">${cleanWebsite(
website
)}</a></li>`
: ""
}
<li class="storeDetails">Events: ${events}</li>
<li class="storeDetails">Caf&eacute;: ${cafe}</li>
</ul>
${description ? `<p class="description">${description}</p>` : ""}`;
}
document.addEventListener("DOMContentLoaded", function () {
$.getJSON("./stores.json", function (data) {
data.sort(function (a, b) {
@ -630,9 +709,6 @@
$.each(data, function (key, value) {
value.rowNumber = key;
value.slug = slugify(value.name);
value.cleanedWebsite = cleanWebsite(value.website);
value.isAppleIsh = isAppleIsh;
value.nameURLEscaped = encodeURIComponent(value.name);
});
$("#storeCount").html(data.length);
window.data = data;
@ -708,9 +784,7 @@
popup.setLngLat([store.long, store.lat]).setHTML(store.name).addTo(map);
$("#info").hide();
var template = $("#selectedStore").html();
var rendered = Mustache.render(template, { store: store });
$("#selected").html(rendered);
$("#selected").html(SelectedStoreTemplate(store));
$("#selected").show();
if (pushState) {
updateHash(store.slug);
@ -800,9 +874,7 @@
.addTo(map);
});
var template = $("#Table").html();
var rendered = Mustache.render(template, { rows: data });
$("#Stores").html(rendered);
$("#Stores").html(TableViewTemplate(data));
$("#Stores tbody tr").on("click", function () {
updateSelectedStore(data[$(this)[0].id], true);
$(window).scrollTo($("#selected"), 250, { offset: { top: -15 } });

View File

@ -1,8 +1,24 @@
const cheerio = require("cheerio");
const mustache = require("./js/mustache.4.1.0.js");
const fs = require("fs");
const stores = require("./stores.json");
function TableViewTemplate(rows) {
table = "<table>";
rows.forEach((row, key) => {
row.rowNumber = key;
table = table + TableRowTemplate(row);
});
return table + "</table>";
}
function TableRowTemplate({ rowNumber, name, address, city }) {
return `
<tr id="${rowNumber}" class="spotRow">
<td class="name">${name}</td>
<td>${address}, ${city}</td>
</tr>`;
}
fs.readFile("./index.html", function (err, data) {
if (err) {
throw err;
@ -15,7 +31,7 @@ fs.readFile("./index.html", function (err, data) {
return aname === bname ? 0 : +(aname > bname) || -1;
});
$("#Stores").html(mustache.render($("#Table").html(), { rows: stores }));
$("#Stores").html(TableViewTemplate(stores));
$("#storeCount").html(stores.length);
$("#updatedOn").html(
new Date().toLocaleDateString("en-US", {

File diff suppressed because one or more lines are too long