Compare commits

...

1 Commits

  1. 141
      css/site.css
  2. 542
      index.html
  3. 6
      js/jquery.js
  4. 176
      package-lock.json
  5. 2
      package.json

141
css/site.css

@ -1,10 +1,10 @@
/* Page Specific CSS */
body {font-family: 'Lato', sans-serif; background: #fff; color: #333; font-size: 16px; margin: 0px; padding: 20px;}
h1 {font-size: 80px; font-family: 'Acme', sans-serif; font-weight: normal; margin: 0px;}
h2 {font-size: 40px; font-family: 'Acme', sans-serif; font-weight: normal; margin: 0px 0px;}
h3 {font-family: 'Acme', sans-serif; font-size: 30px; margin: 10px 0px;}
h4 {font-family: 'Lato', sans-serif; font-size: 24px;}
body {font-family: 'Lato', sans-serif; background: #fff; color: #333; font-size: 16px; margin: 0px; padding: 0px;}
h1 {font-size: 40px; font-family: 'Acme', sans-serif; font-weight: normal; margin: 0px; text-align: center;}
h2 {font-size: 30px; font-family: 'Acme', sans-serif; font-weight: normal; margin: 0px 0px;}
h3 {font-family: 'Acme', sans-serif; font-size: 24px; margin: 10px 0px;}
h4 {font-family: 'Lato', sans-serif; font-size: 20px;}
img {width: 100%;}
p a, a {color: #333; text-decoration: none; padding-bottom: 0px; border-bottom: 1px #FD9393 solid;}
@ -13,44 +13,127 @@ small {padding: 10px 0px; font-size: 10px;}
p {margin: 0px; padding: 0px; font-size: 12px;}
li {line-height: 19px; font-size: 12px;}
ol {line-height: 24px;}
.clearfix {clear: both;}
#map {height: 500px; width: 550px; min-width: 300px; background: #FFFFFF; float: left; margin-left:-100px;}
#map a {border: none;}
.mapboxgl-popup-content {font-family: 'Lato', sans-serif; font-size: 14px; padding: 10px;}
.container {margin: 24px 0px;}
#tableFilter {margin: 12px 0px; border: none; border-bottom: 1px solid #333; background-color: transparent; padding: 0px; font-family: Lato; color: #333; font-size: 13px; height: 22px;}
ul.nav {list-style: none; margin: 0px; padding: 0px;}
ul.nav {list-style: none; margin: 0px; padding: 10px; text-align: center;}
ul.nav li {display: inline; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; padding-right: 4px;}
ul.nav li h2 {font-family: 'Lato'; display: inline; font-size: 10px; letter-spacing: .1em;}
ul.nav li a {border: none;}
ul.nav li a:hover {border-bottom: 1px #FD9393 solid;}
#viewInfo {cursor: pointer;}
#wrapper {margin: 0px auto; padding: 40px; max-width: 900px}
.address {color: #FF4646; text-transform: uppercase; font-weight: 700;}
#selected {max-width: 400px; width: 100%; float: left; padding: 5px 10px;}
#selected {padding: 5px 10px; display: none}
#selected .description {font-size: 14px; padding: 4px 0px; line-height: 19px;}
#selected ul {list-style: none; margin: 15px 0px; padding: 0px;}
#info {max-width: 400px; width: 100%; float: left; padding: 5px 10px;}
#siteInfo {padding: 5px 10px;}
#siteInfo p {font-size: 14px; padding: 4px; line-height: 19px;}
.store-details {text-transform: uppercase; font-size: 11px; letter-spacing: .1em; padding-right: 6px;}
.address {color: #FF4646; text-transform: uppercase; font-weight: 700;}
#Stores {margin: 0 auto; width: 80%;}
#Stores tr {cursor: pointer;}
#Stores tr td {padding: 2px 10px;}
@media screen and (min-width: 750px) {
#map {
height: 100%;
width: 100%;
margin-left: 0px;
margin-top: 0px;
}
#viewInfo {cursor: pointer;}
#info p {font-size: 14px; padding: 4px; line-height: 19px;}
@media only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px) and (max-width: 1024px) {
h1{font-size: 60px;}
body {margin: 0px; padding: 5px;}
#wrapper {max-width: 460px; padding-top: 20px;}
#Stores, #map {min-width: 224px; width:100%;}
#map,#info,#selected{width:100%;margin:10px 0px;padding:0;}
.floater {
border-radius: 4px;
box-shadow: 0px 0px 0px 2px rgba(0,0,0,0.1);
background: white;
width: 390px;
}
.top-right {
position: absolute;
right: 0px;
top: 0px;
bottom:0px;
max-width:400px;
overflow:visible;
pointer-events:none;
background:none !important;
}
#header_block {
margin: 10px 10px 5px;
float: right;
pointer-events: initial
}
#info_wrapper {
margin: 5px 10px 5px;
float: right;
pointer-events: initial
}
#Stores {
margin: 5px 10px 5px;
float: right;
pointer-events: initial;
overflow: scroll;
bottom: 10px;
height: 400px;
}
#Stores table {
table-layout: fixed;
}
#Stores tr {
cursor: pointer;
font-size:14px;
}
#Stores tr td {
padding: 2px 10px;
width: 50%;
}
}
@media screen and (max-width: 750px) {
h1 {font-size: 30px; padding-top: 5px;}
h2 {font-size: 20px;}
ul.nav {padding: 0px 10px; line-height: .5;}
ul.nav li h2 {display: none;}
#map {
height: 20%;
width: 100%;
}
.mapboxgl-ctrl-top-left {
display: none;
}
.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl {
margin: 0;
}
.mapboxgl-ctrl-logo {
transform: scale(.75,.75);
}
#header_block {
margin: 0px;
}
#info_wrapper {
margin: 0px;
bottom: 0px;
overflow: scroll;
}
#selected {
padding: 10px 10px;
}
#Stores {
margin: 0px;
overflow: scroll;
height: 25%;
}
#Stores table {
table-layout: fixed;
}
#Stores tr {
cursor: pointer; font-size: 13px;
}
#Stores tr td {
padding: 2px 10px;
width: 50%;
}
}

542
index.html

@ -7,7 +7,7 @@
<link rel="apple-touch-icon" href="/img/social.jpg">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/mustache.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/2.1.0/jquery.scrollTo.min.js"></script>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://api.mapbox.com/mapbox-gl-js/v0.34.0/mapbox-gl.js"></script>
<link href="https://api.mapbox.com/mapbox-gl-js/v0.34.0/mapbox-gl.css" rel="stylesheet">
@ -26,9 +26,11 @@
<meta property="og:image" content="http://www.nycbookstores.org/img/social.jpg">
</head>
<body>
<div id="wrapper">
<h1>NYC Bookstores</h1>
<div>
<div id="map"></div>
<div class="top-right">
<div id="header_block" class="floater">
<h1>NYC Bookstores</h1>
<ul class="nav">
<li><h2>The Many Independent Bookstores of New York City</h2></li>
<li><a id="viewInfo">info</a></li>
@ -36,412 +38,125 @@
<li><a href="http://www.twitter.com/alazyreader" target="_blank">@alazyreader</a></li>
</ul>
</div>
<div class="container">
<div id="map"></div>
<div id="info">
<div id="Stores" class="floater">
<table>
<tbody>
<tr id=""><td>192 Books</td><td>192 10th Ave, New York</td></tr>
<tr id=""><td>Alabaster Bookshop</td><td>122 4th Ave, New York</td></tr>
<tr id=""><td>Albertine Books</td><td>972 Fifth Ave, New York</td></tr>
<tr id=""><td>Archestratus</td><td>160 Huron St, Brooklyn</td></tr>
<tr id=""><td>Argosy Books</td><td>116 East 59th St, New York</td></tr>
<tr id=""><td>Astoria Bookshop</td><td>31-29 31st St, Astoria</td></tr>
<tr id=""><td>Bankstreet Bookstore</td><td>2780 Broadway, New York</td></tr>
<tr id=""><td>Ben&apos;s Books</td><td>145 Ainslie St, Brooklyn</td></tr>
<tr id=""><td>Berl&apos;s Brooklyn Poetry Shop</td><td>126A Front St, Brooklyn</td></tr>
<tr id=""><td>Better Read Than Dead</td><td>867 Broadway, Brooklyn</td></tr>
<tr id=""><td>Bluestockings</td><td>172 Allen Street, New York</td></tr>
<tr id=""><td>Bonnie Slotnick Cookbooks</td><td>28 East 2nd St, New York</td></tr>
<tr id=""><td>Book Culture</td><td>536 W 112th St, New York</td></tr>
<tr id=""><td>Book Culture on Broadway</td><td>2915 Broadway, New York</td></tr>
<tr id=""><td>Book Culture on Columbus</td><td>450 Columbus Ave, New York</td></tr>
<tr id=""><td>Book Thug Nation</td><td>100 North 3rd St, Brooklyn</td></tr>
<tr id=""><td>bookbook</td><td>266 Bleecker St, New York</td></tr>
<tr id=""><td>Bookmarc</td><td>400 Bleecker St, New York</td></tr>
<tr id=""><td>BookMark Shoppe</td><td>8415 3rd Avenue, Brooklyn</td></tr>
<tr id=""><td>Bookoff</td><td>49 W 45nd St, New York</td></tr>
<tr id=""><td>Books Are Magic</td><td>225 Smith St, Brooklyn</td></tr>
<tr id=""><td>Books Of Wonder</td><td>18 West 18th St, New York</td></tr>
<tr id=""><td>Books Of Wonder (Upper West Side)</td><td>217 West 84th St, New York</td></tr>
<tr id=""><td>Boulevard Books and Caf&#xE9;</td><td>7518 13th Ave, Brooklyn</td></tr>
<tr id=""><td>Brazenhead Books</td><td>The Upper East Side, New York</td></tr>
<tr id=""><td>Cafe con Libros</td><td>724 Prospect Place, Brooklyn</td></tr>
<tr id=""><td>Catland</td><td>987 Flushing Ave, Brooklyn</td></tr>
<tr id=""><td>Chartwell Booksellers</td><td>55 E 52nd St, New York</td></tr>
<tr id=""><td>Civil Service Book Shop</td><td>38 Lispenard St, New York</td></tr>
<tr id=""><td>Clic Bookstore &amp; Gallery</td><td>255 Centre St, New York</td></tr>
<tr id=""><td>Community Bookstore</td><td>143 7th Ave, Brooklyn</td></tr>
<tr id=""><td>Dashwood Books</td><td>33 Bond St, New York</td></tr>
<tr id=""><td>Desert Island Comics</td><td>540 Metropolitan Ave, Brooklyn</td></tr>
<tr id=""><td>East Village Books</td><td>99 St. Mark&apos;s Place, New York</td></tr>
<tr id=""><td>Every Thing Goes Book Cafe and Neighborhood Stage</td><td>208 Bay St, Staten Island</td></tr>
<tr id=""><td>Freebird Books</td><td>123 Columbia St, Brooklyn</td></tr>
<tr id=""><td>Greenlight Bookstore</td><td>686 Fulton St, Brooklyn</td></tr>
<tr id=""><td>Greenlight Bookstore (Prospect Lefferts Gardens)</td><td>632 Flatbush Ave, Brooklyn</td></tr>
<tr id=""><td>Here&apos;s A Book Store</td><td>1964 Coney Island Ave, Brooklyn</td></tr>
<tr id=""><td>Housing Works Bookstore Caf&#xE9;</td><td>126 Crosby St, New York</td></tr>
<tr id=""><td>Hullabaloo Books</td><td>711A Franklin Ave, Brooklyn</td></tr>
<tr id=""><td>Human Relations Books</td><td>1067 Flushing Ave, Brooklyn</td></tr>
<tr id=""><td>Idlewild Books Brooklyn</td><td>249 Warren St, Brooklyn</td></tr>
<tr id=""><td>Idlewild Books Manhattan</td><td>12 West 19th St, New York</td></tr>
<tr id=""><td>Idlewild Books Williamsburg</td><td>218 Bedford Ave, Brooklyn</td></tr>
<tr id=""><td>James Cummins Bookseller</td><td>699 Madison Ave, 7th Floor, New York</td></tr>
<tr id=""><td>Joanne Hendricks Cookbooks</td><td>488 Greenwich St, New York</td></tr>
<tr id=""><td>Kew &amp; Willow Books</td><td>81-63 Lefferts Boulevard, New York</td></tr>
<tr id=""><td>Kinokunya</td><td>1073 Avenue of the Americas, New York</td></tr>
<tr id=""><td>Kitchen Arts &amp; Letters</td><td>1435 Lexington Ave, New York</td></tr>
<tr id=""><td>Loft Book Store Cafe</td><td>350 Tompkins Ave, Brooklyn</td></tr>
<tr id=""><td>Logos Bookstore</td><td>1575 York Ave, New York</td></tr>
<tr id=""><td>Mast Books</td><td>66 Avenue A, New York</td></tr>
<tr id=""><td>McNally Jackson Books</td><td>52 Prince St, New York</td></tr>
<tr id=""><td>McNally Jackson Books Williamsburg</td><td>76 North 4th St, Brooklyn</td></tr>
<tr id=""><td>Melville House Publishers</td><td>46 John St, Brooklyn</td></tr>
<tr id=""><td>Mercer Street Books &amp; Records</td><td>206 Mercer St, New York</td></tr>
<tr id=""><td>Molasses Books</td><td>770 Hart St, Brooklyn</td></tr>
<tr id=""><td>Namaste Bookshop</td><td>2 W 14th St, New York</td></tr>
<tr id=""><td>Pioneer Books</td><td>289 Van Brunt St, Brooklyn</td></tr>
<tr id=""><td>Posman Books Chelsea Market</td><td>75 9th Avenue, New York</td></tr>
<tr id=""><td>Posman Books Rockefeller Center</td><td>30 Rockefeller Plaza, New York</td></tr>
<tr id=""><td>PowerHouse Arena</td><td>28 Adams St, Brooklyn</td></tr>
<tr id=""><td>PowerHouse on 8th</td><td>1111 8th Ave, Brooklyn</td></tr>
<tr id=""><td>Printed Matter</td><td>195 10th Ave, New York</td></tr>
<tr id=""><td>Quest Bookshop</td><td>240 E 53rd St, New York</td></tr>
<tr id=""><td>Respect For Life Books-N-Things</td><td>537 Nostrand Ave, Brooklyn</td></tr>
<tr id=""><td>Revolution Books</td><td>437 Malcolm X Blvd, New York</td></tr>
<tr id=""><td>Rizzoli Bookstore</td><td>1133 Broadway, New York</td></tr>
<tr id=""><td>Shakespeare &amp; Company</td><td>939 Lexington Ave, New York</td></tr>
<tr id=""><td>Sister&apos;s Uptown Bookstore</td><td>1942 Amsterdam Ave, New York</td></tr>
<tr id=""><td>Spoonbill</td><td>99 Montrose Ave, Brooklyn</td></tr>
<tr id=""><td>Spoonbill &amp; Sugartown, Booksellers</td><td>218 Bedford Ave, Brooklyn</td></tr>
<tr id=""><td>Standards Manual</td><td>212 Franklin Street, Brooklyn</td></tr>
<tr id=""><td>Stories</td><td>458 Bergen St, Brooklyn</td></tr>
<tr id=""><td>Strand Bookstore</td><td>828 Broadway, New York</td></tr>
<tr id=""><td>TASCHEN</td><td>107 Greene St, New York</td></tr>
<tr id=""><td>Terrace Books</td><td>242 Prospect Park West, Brooklyn</td></tr>
<tr id=""><td>The Austin Book Shop</td><td>104-29 Jamaica Ave, Richmond Hill</td></tr>
<tr id=""><td>The Book Cellar</td><td>1465 York Ave, New York</td></tr>
<tr id=""><td>The Center for Fiction</td><td>17 East 47th St, New York</td></tr>
<tr id=""><td>The Corner Bookstore</td><td>1313 Madison Ave, New York</td></tr>
<tr id=""><td>The Drama Book Shop</td><td>250 West 40th St, New York</td></tr>
<tr id=""><td>The Mysterious Bookshop</td><td>58 Warren St, New York</td></tr>
<tr id=""><td>Three Lives &amp; Company</td><td>154 West 10th St, New York</td></tr>
<tr id=""><td>Topos Bookstore Cafe</td><td>788 Woodward Ave, Brooklyn</td></tr>
<tr id=""><td>Turn The Page... Again</td><td>39-15a Bell Blvd, Flushing</td></tr>
<tr id=""><td>Unnameable Books</td><td>600 Vanderbilt Ave, Brooklyn</td></tr>
<tr id=""><td>Unoppressive Non-Imperialist Bargain Books</td><td>34 Carmine St, New York</td></tr>
<tr id=""><td>Ursus Books</td><td>50 East 78th St, Suite 1C, New York</td></tr>
<tr id=""><td>Westsider Rare &amp; Used Books</td><td>2246 Broadway, New York</td></tr>
<tr id=""><td>Westsider Records</td><td>233 West 72nd St, New York</td></tr>
<tr id=""><td>Word Bookstore</td><td>126 Franklin St, Brooklyn</td></tr>
<tr id=""><td>Word Up Books</td><td>2113 Amsterdam Ave, New York</td></tr>
</tbody>
</table>
</div>
<div id="info_wrapper" class="floater">
<div id="siteInfo">
<p>New York City loves its independent bookstores. It <a href="http://www.nytimes.com/2006/10/15/nyregion/thecity/15book.html" target="_blank">eulogizes those that have faded</a> and celebrates when new ventures are launched. And while the historic <a href="http://untappedcities.com/2015/08/26/4th-avenue-the-history-of-nycs-book-row/" target="_blank">Book Row may have passed away in the 80s</a>, there are still many indie bookstores dotting the map. Here, I have attempted to collect all of the currently-open general-interest independent booksellers in NYC. Any store with regular-ish hours (excluding religious booksellers and appointment-only rare book sellers) is included.</p>
<p>The listings here are kept up-to-date to the best of my ability; however, I make no promises about either the accuracy or reliability of the information. If you spot an error, or I&apos;ve missed a shop, please let me know by <a href="mailto:delta.mu.alpha@gmail.com" target="_blank">email</a> or <a href="https://www.twitter.com/alazyreader" target="_blank">twitter</a>. Based on the &quot;<a href="https://github.com/jlord/hack-spots" target="_blank">Hack Spots</a>&quot; website by <a href="http://www.twitter.com/jllord" target="_blank">@jllord</a>.</p>
<p>There are currently <span id="storeCount"></span> stores indexed on this page.</p>
</div>
<div id="selected"></div>
</div>
<div class="clearfix"></div>
<div class="container">
<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>
</tr>
<tr id="" class="spotRow">
<td class="name">Alabaster Bookshop</td>
<td>122 4th Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Albertine Books</td>
<td>972 Fifth Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Archestratus</td>
<td>160 Huron St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Argosy Books</td>
<td>116 East 59th St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Astoria Bookshop</td>
<td>31-29 31st St, Astoria</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Bankstreet Bookstore</td>
<td>2780 Broadway, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Ben&apos;s Books</td>
<td>145 Ainslie St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Berl&apos;s Brooklyn Poetry Shop</td>
<td>126A Front St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Better Read Than Dead</td>
<td>867 Broadway, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Bluestockings</td>
<td>172 Allen Street, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Bonnie Slotnick Cookbooks</td>
<td>28 East 2nd St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Book Culture</td>
<td>536 W 112th St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Book Culture on Broadway</td>
<td>2915 Broadway, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Book Culture on Columbus</td>
<td>450 Columbus Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Book Thug Nation</td>
<td>100 North 3rd St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">bookbook</td>
<td>266 Bleecker St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Bookmarc</td>
<td>400 Bleecker St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">BookMark Shoppe</td>
<td>8415 3rd Avenue, Brooklyn</td>
</tr>
<tr id="" 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>
<td>225 Smith St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Books Of Wonder</td>
<td>18 West 18th 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">
<td class="name">Boulevard Books and Caf&#xE9;</td>
<td>7518 13th Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Brazenhead Books</td>
<td>The Upper East Side, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Cafe con Libros</td>
<td>724 Prospect Place, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Catland</td>
<td>987 Flushing Ave, Brooklyn</td>
</tr>
<tr id="" 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>38 Lispenard St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Clic Bookstore &amp; Gallery</td>
<td>255 Centre St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Community Bookstore</td>
<td>143 7th Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Dashwood Books</td>
<td>33 Bond St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Desert Island Comics</td>
<td>540 Metropolitan Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">East Village Books</td>
<td>99 St. Mark&apos;s Place, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Every Thing Goes Book Cafe and Neighborhood Stage</td>
<td>208 Bay St, Staten Island</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Freebird Books</td>
<td>123 Columbia St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Greenlight Bookstore</td>
<td>686 Fulton St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Greenlight Bookstore (Prospect Lefferts Gardens)</td>
<td>632 Flatbush Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Here&apos;s A Book Store</td>
<td>1964 Coney Island Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Housing Works Bookstore Caf&#xE9;</td>
<td>126 Crosby St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Hullabaloo Books</td>
<td>711A Franklin Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Human Relations Books</td>
<td>1067 Flushing Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Idlewild Books Brooklyn</td>
<td>249 Warren St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Idlewild Books Manhattan</td>
<td>12 West 19th St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Idlewild Books Williamsburg</td>
<td>218 Bedford Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">James Cummins Bookseller</td>
<td>699 Madison Ave, 7th Floor, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Joanne Hendricks Cookbooks</td>
<td>488 Greenwich St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Kew &amp; Willow Books</td>
<td>81-63 Lefferts Boulevard, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Kinokunya</td>
<td>1073 Avenue of the Americas, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Kitchen Arts &amp; Letters</td>
<td>1435 Lexington Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Loft Book Store Cafe</td>
<td>350 Tompkins Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Logos Bookstore</td>
<td>1575 York Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Mast Books</td>
<td>66 Avenue A, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">McNally Jackson Books</td>
<td>52 Prince St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">McNally Jackson Books Williamsburg</td>
<td>76 North 4th St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Melville House Publishers</td>
<td>46 John St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Mercer Street Books &amp; Records</td>
<td>206 Mercer St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Molasses Books</td>
<td>770 Hart St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Namaste Bookshop</td>
<td>2 W 14th St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Pioneer Books</td>
<td>289 Van Brunt St, Brooklyn</td>
</tr>
<tr id="" 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">Posman Books Rockefeller Center</td>
<td>30 Rockefeller Plaza, New York</td>
</tr>
<tr id="" 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>
<td>1111 8th Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Printed Matter</td>
<td>195 10th Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Quest Bookshop</td>
<td>240 E 53rd St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Respect For Life Books-N-Things</td>
<td>537 Nostrand Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Revolution Books</td>
<td>437 Malcolm X Blvd, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Rizzoli Bookstore</td>
<td>1133 Broadway, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Shakespeare &amp; Company</td>
<td>939 Lexington Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Sister&apos;s Uptown Bookstore</td>
<td>1942 Amsterdam Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Spoonbill</td>
<td>99 Montrose Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Spoonbill &amp; Sugartown, Booksellers</td>
<td>218 Bedford Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Standards Manual</td>
<td>212 Franklin Street, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Stories</td>
<td>458 Bergen St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Strand Bookstore</td>
<td>828 Broadway, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">TASCHEN</td>
<td>107 Greene St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Terrace Books</td>
<td>242 Prospect Park West, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">The Austin Book Shop</td>
<td>104-29 Jamaica Ave, Richmond Hill</td>
</tr>
<tr id="" class="spotRow">
<td class="name">The Book Cellar</td>
<td>1465 York Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">The Center for Fiction</td>
<td>17 East 47th St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">The Corner Bookstore</td>
<td>1313 Madison Ave, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">The Drama Book Shop</td>
<td>250 West 40th St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">The Mysterious Bookshop</td>
<td>58 Warren St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Three Lives &amp; Company</td>
<td>154 West 10th St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Topos Bookstore Cafe</td>
<td>788 Woodward Ave, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Turn The Page... Again</td>
<td>39-15a Bell Blvd, Flushing</td>
</tr>
<tr id="" 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">
<td class="name">Ursus Books</td>
<td>50 East 78th St, Suite 1C, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Westsider Rare &amp; Used Books</td>
<td>2246 Broadway, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Westsider Records</td>
<td>233 West 72nd St, New York</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Word Bookstore</td>
<td>126 Franklin St, Brooklyn</td>
</tr>
<tr id="" class="spotRow">
<td class="name">Word Up Books</td>
<td>2113 Amsterdam Ave, New York</td>
</tr>
</tbody></table>
</div>
</div>
</div><!-- end wrapper -->
<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>
<td>{{address}}, {{city}}</td>
</tr>
{{/rows}}
<tbody>
{{#rows}}
<tr id="{{rowNumber}}"><td>{{name}}</td><td>{{address}}, {{city}}</td></tr>
{{/rows}}
</tbody>
</table>
</script>
@ -552,13 +267,19 @@
}
function updateSelectedStore(store, pushState=false) {
map.flyTo({center: [store.long, store.lat]});
var flyTo = {
center: [store.long, store.lat]
}
if (Math.max(document.documentElement.clientWidth, window.innerWidth || 0) > 750) {
flyTo.offset = [-200, 0];
}
map.flyTo(flyTo);
popup.setLngLat([store.long, store.lat])
.setHTML(store.name)
.addTo(map);
.setHTML(store.name)
.addTo(map);
$('#info').hide();
$('#siteInfo').hide();
var template = $('#selectedStore').html();
var rendered = Mustache.render(template, {store: store});
$('#selected').html(rendered);
@ -571,15 +292,13 @@
function showInfo(pushState=true) {
$('#selected').hide();
popup.remove();
$('#info').show();
$('#siteInfo').show();
if (pushState) {
updateHash('info');
}
}
function loadMap(data) {
var geolocate = new mapboxgl.GeolocateControl();
var points = [];
$.each(data, function(key, value) {
points.push({
@ -610,7 +329,6 @@
}
})
map.addControl(new mapboxgl.NavigationControl(), 'top-left');
map.addControl(geolocate, 'top-right');
updateViewBySlug(window.location.hash.split("#")[1]);
});
@ -635,19 +353,11 @@
map.getCanvas().style.cursor = features.length ? 'pointer' : '';
});
geolocate.on('geolocate', function (e) {
map.setZoom(14);
popup.setLngLat([e.coords.longitude, e.coords.latitude])
.setHTML('Current Location')
.addTo(map);
});
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}});
});
$('#viewInfo').on("click", showInfo);

6
js/jquery.js vendored

File diff suppressed because one or more lines are too long

176
package-lock.json generated

@ -0,0 +1,176 @@
{
"name": "nyc-bookstores",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@types/node": {
"version": "9.4.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-9.4.5.tgz",
"integrity": "sha512-DvC7bzO5797bkApgukxouHmkOdYN2D0yL5olw0RncDpXUa6n39qTVsUi/5g2QJjPgl8qn4zh+4h0sofNoWGLRg=="
},
"boolbase": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
},
"cheerio": {
"version": "1.0.0-rc.2",
"resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz",
"integrity": "sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=",
"requires": {
"css-select": "1.2.0",
"dom-serializer": "0.1.0",
"entities": "1.1.1",
"htmlparser2": "3.9.2",
"lodash": "4.17.5",
"parse5": "3.0.3"
}
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"css-select": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
"integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=",
"requires": {
"boolbase": "1.0.0",
"css-what": "2.1.0",
"domutils": "1.5.1",
"nth-check": "1.0.1"
}
},
"css-what": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz",
"integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0="
},
"dom-serializer": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
"integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=",
"requires": {
"domelementtype": "1.1.3",
"entities": "1.1.1"
},
"dependencies": {
"domelementtype": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs="
}
}
},
"domelementtype": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz",
"integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI="
},
"domhandler": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz",
"integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=",
"requires": {
"domelementtype": "1.3.0"
}
},
"domutils": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
"integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
"requires": {
"dom-serializer": "0.1.0",
"domelementtype": "1.3.0"
}
},
"entities": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
"integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA="
},
"htmlparser2": {
"version": "3.9.2",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz",
"integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=",
"requires": {
"domelementtype": "1.3.0",
"domhandler": "2.4.1",
"domutils": "1.5.1",
"entities": "1.1.1",
"inherits": "2.0.3",
"readable-stream": "2.3.4"
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"lodash": {
"version": "4.17.5",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz",
"integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw=="
},
"nth-check": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz",
"integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=",
"requires": {
"boolbase": "1.0.0"
}
},
"parse5": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz",
"integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==",
"requires": {
"@types/node": "9.4.5"
}
},
"process-nextick-args": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
},
"readable-stream": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz",
"integrity": "sha512-vuYxeWYM+fde14+rajzqgeohAI7YoJcHE7kXDAc4Nk0EbuKnJfqtY9YtRkLo/tqkuF7MsBQRhPnPeyjYITp3ZQ==",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.1",
"string_decoder": "1.0.3",
"util-deprecate": "1.0.2"
}
},
"safe-buffer": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
}
}
}

2
package.json

@ -14,6 +14,6 @@
},
"homepage": "https://github.com/nyc-bookstores/nyc-bookstores.github.io",
"dependencies": {
"cheerio": "^1.0.0-rc.1"
"cheerio": "^1.0.0-rc.2"
}
}

Loading…
Cancel
Save