diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2025-11-14 11:47:49 +0200 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2025-11-14 11:47:49 +0200 |
| commit | d41ac3c094f733a8038885de3400ed7558b2b878 (patch) | |
| tree | a9a7cd54900e0b0c66f3293f4ff6bc6ad5cbbec6 /app/components.js | |
| parent | 6ca89c37f84c6b1d63c869e6471d3570d51f63be (diff) | |
| download | housing-d41ac3c094f733a8038885de3400ed7558b2b878.tar.zst | |
Minor tuning
Diffstat (limited to 'app/components.js')
| -rw-r--r-- | app/components.js | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/app/components.js b/app/components.js index cc08fb4..c952b08 100644 --- a/app/components.js +++ b/app/components.js @@ -666,9 +666,9 @@ export class Modal { children: house.images.slice(0, 3).map((src) => { // Wrap image in anchor tag that opens in new tab return Dom.a( + src, new DomOptions({ attributes: { - href: src, rel: "noopener noreferrer", target: "_blank", }, @@ -771,6 +771,8 @@ export class Modal { { label: "Living Area", value: `${house.livingArea} m²` }, { label: "District", value: house.district }, { label: "Rooms", value: house.rooms?.toString() ?? "N/A" }, + { label: "Lot Size", value: house.totalArea ? `${house.totalArea} m²` : "N/A" }, + { label: "Price per m²", value: house.pricePerSqm ? `${house.pricePerSqm} €` : "N/A" }, ]; for (const { label, value } of details) { const item = Dom.div( @@ -816,6 +818,38 @@ export class Modal { ), ); + frag.appendChild( + Dom.div( + new DomOptions({ + children: [ + Dom.span( + "Official Listing", + new DomOptions({ + styles: { + fontSize: "14px", + fontWeight: "bold", + marginBottom: "5px", + marginRight: "10px", + }, + }), + ), + Dom.a( + house.url, + new DomOptions({ + attributes: { + rel: "noopener noreferrer", + target: "_blank", + }, + styles: { color: "#0066cc", fontSize: "14px", wordBreak: "break-all" }, + }), + "Oikotie", + ), + ], + styles: { marginBottom: "20px" }, + }), + ), + ); + if (house.images?.length) { frag.appendChild(Modal.imageSection(house)); } |
