rsync --quiet --recursive src/assets/images/ dist/assets/images/
mkdir -p dist/assets/js/
-cat src/assets/js/base.js src/assets/js/detailpage.js src/assets/js/searchpage.js > dist/assets/js/nominatim-ui.js
+cat src/assets/js/base.js src/assets/js/detailpage.js src/assets/js/searchpage.js src/assets/js/deletable.js src/assets/js/polygons.js > dist/assets/js/nominatim-ui.js
rsync --quiet node_modules/jquery/dist/jquery.min.js dist/assets/js/
rsync --quiet node_modules/leaflet/dist/leaflet.js dist/assets/js/
rsync --quiet node_modules/leaflet-minimap/dist/Control.MiniMap.min.css dist/assets/css/
rsync --quiet node_modules/leaflet-minimap/dist/images/* dist/assets/css/images/
-rsync --quiet node_modules/bootstrap/dist/js/bootstrap.min.js dist/assets/js/
-rsync --quiet node_modules/bootstrap/dist/css/bootstrap.min.css* dist/assets/css/
-rsync --quiet node_modules/bootstrap/dist/css/bootstrap-theme.min.css* dist/assets/css/
+rsync --quiet node_modules/bootstrap/dist/js/bootstrap.bundle.min.js* dist/assets/js/
+rsync --quiet node_modules/bootstrap/dist/css/bootstrap.min.css dist/assets/css/
rsync --quiet node_modules/handlebars/dist/handlebars.min.js dist/assets/js/
rsync --quiet node_modules/@ungap/url-search-params/min.js dist/assets/js/url-search-params.js
echo '</body>' >> dist/details.html
echo '</html>' >> dist/details.html
+cat src/layout.html | grep -v '</body>' | grep -v '</html>' | sed -e 's/BODYID/deletable-page/' > dist/deletable.html
+echo '<script id="deletable-template" type="text/x-handlebars-template">' >> dist/deletable.html
+cat src/templates/deletable.hbs >> dist/deletable.html
+echo '</script>' >> dist/deletable.html
+echo '</body>' >> dist/deletable.html
+echo '</html>' >> dist/deletable.html
+
+cat src/layout.html | grep -v '</body>' | grep -v '</html>' | sed -e 's/BODYID/polygons-page/' > dist/polygons.html
+echo '<script id="polygons-template" type="text/x-handlebars-template">' >> dist/polygons.html
+cat src/templates/polygons.hbs >> dist/polygons.html
+echo '</script>' >> dist/polygons.html
+echo '</body>' >> dist/polygons.html
+echo '</html>' >> dist/polygons.html
+
cp src/index.html dist/