Skip to content

Commit

Permalink
add social share buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
jfoclpf committed May 18, 2024
1 parent c824f3a commit 08d6a52
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"reproject": "^1.2.7",
"sanitize-filename": "^1.6.3",
"shapefile": "^0.6.6",
"shareon": "^2.5.0",
"sphere-knn": "^1.4.0",
"topojson-client": "^3.1.0",
"topojson-server": "^3.0.1",
Expand Down
4 changes: 4 additions & 0 deletions src/public/src/js/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ import 'bootstrap'
import 'leaflet/dist/leaflet'
import 'leaflet-defaulticon-compatibility'
import 'leaflet-contextmenu/dist/leaflet.contextmenu'

import * as Shareon from 'shareon'
import 'shareon/css'
Shareon.init()
7 changes: 6 additions & 1 deletion src/views/partials/resultMap.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<div class="limiter map-limiter">
<div class="container-table100 container-header">
{{{ pageDescription }}}
<div class="col-9 text-center">
{{{ pageDescription }}}
</div>
<div class="col-3 text-right">
{{> socialShareBtns}}
</div>
</div>
<div class="container-table100 map-related-info">
{{{obj2html input}}}
Expand Down
6 changes: 6 additions & 0 deletions src/views/partials/socialShareBtns.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="shareon">
<a class="facebook" aria-label="facebook share button"></a>
<a class="linkedin" aria-label="linkedin share button"></a>
<a class="twitter" aria-label="twitter share button"></a>
<a class="whatsapp" aria-label="whatsapp share button"></a>
</div>

0 comments on commit 08d6a52

Please sign in to comment.