Skip to content

Commit

Permalink
Adding image to panel.
Browse files Browse the repository at this point in the history
  • Loading branch information
jedgar1mx committed Nov 19, 2024
1 parent ed3a0ba commit a07812d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build/assets/js/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/assets/js/main.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/assets/js/runtime.js

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

2 changes: 1 addition & 1 deletion build/assets/js/vendors.turf.js

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

2 changes: 1 addition & 1 deletion build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Team GSR's D6 Business Directory</title><meta name="description" content="Team GSR's D6 Business Directory"><meta name="author" content="Edgar Montes"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=5"/><script defer="defer" src="assets/js/runtime.js"></script><script defer="defer" src="assets/js/vendors.turf.js"></script><script defer="defer" src="assets/js/main.js"></script></head><body><d6-business-map data-map-mode="map-panel" data-language="en" data-active-filters="" data-app-state="start" data-map-state="loaded"><p class="no-wc">Please turn on javascript to use this feature. Thanks!</p></d6-business-map><script src="https://www.unpkg.com/[email protected]/build/assets/js/main.js"></script><script src="https://www.unpkg.com/[email protected]/build/assets/js/runtime.js"></script><script src="https://www.unpkg.com/[email protected]/build/assets/js/vendors.babel.js"></script><script src="https://www.unpkg.com/[email protected]/build/assets/js/vendors.maplibre-gl.js"></script><script src="index.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Team GSR's D6 Business Directory</title><meta name="description" content="Team GSR's D6 Business Directory"><meta name="author" content="Edgar Montes"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=5"/><script defer="defer" src="assets/js/runtime.js"></script><script defer="defer" src="assets/js/vendors.turf.js"></script><script defer="defer" src="assets/js/main.js"></script></head><body><d6-business-map data-map-mode="map-panel" data-language="en" data-active-filters="" data-app-state="start" data-map-state="loaded"><p class="no-wc">Please turn on javascript to use this feature. Thanks!</p></d6-business-map><script src="https://www.unpkg.com/[email protected]/build/assets/js/main.js"></script><script src="https://www.unpkg.com/[email protected]/build/assets/js/runtime.js"></script><script src="https://www.unpkg.com/[email protected]/build/assets/js/vendors.babel.js"></script><script src="https://www.unpkg.com/[email protected]/build/assets/js/vendors.maplibre-gl.js"></script><script src="index.js"></script></body></html>
8 changes: 4 additions & 4 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<p class="no-wc">Please turn on javascript to use this feature. Thanks!</p>
</d6-business-map>

<script src="https://www.unpkg.com/[email protected].28/build/assets/js/main.js"></script>
<script src="https://www.unpkg.com/[email protected].28/build/assets/js/runtime.js"></script>
<script src="https://www.unpkg.com/[email protected].28/build/assets/js/vendors.babel.js"></script>
<script src="https://www.unpkg.com/[email protected].28/build/assets/js/vendors.maplibre-gl.js"></script>
<script src="https://www.unpkg.com/[email protected].32/build/assets/js/main.js"></script>
<script src="https://www.unpkg.com/[email protected].32/build/assets/js/runtime.js"></script>
<script src="https://www.unpkg.com/[email protected].32/build/assets/js/vendors.babel.js"></script>
<script src="https://www.unpkg.com/[email protected].32/build/assets/js/vendors.maplibre-gl.js"></script>
<script src="index.js"></script>
</body>
</html>
2 changes: 2 additions & 0 deletions src/components/D6BusinessMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,9 @@ export default class D6BusinessMap extends HTMLElement {
case 'active-panel':
let tempData = JSON.parse(this.getAttribute('data-panel-data'));
console.log(tempData.properties);
console.log(tempData.properties.photo_url == '');
this.panelContent.innerHTML = `
${(tempData.properties.photo_url == '') ? `` : `<img style="width:100%" src="${tempData.properties.photo_url}"></img>`}
<p style="background-color:#745DA8;color:#fff" class="fs-3 fw-bold text-center">${tempData.properties.business_name}</p>
<p><strong>${this.languageText[currentLanguage]['panel'][0]}</strong> ${tempData.properties.address}
${(tempData.properties.profit_or_nonprofit) ? `<p><strong>${this.languageText[currentLanguage]['panel'][1]}</strong> ${tempData.properties.profit_or_nonprofit}</p>` : ``}
Expand Down

0 comments on commit a07812d

Please sign in to comment.