diff --git a/src/components/PlaceCard.jsx b/src/components/PlaceCard.jsx index 72f00e1..aacde9d 100644 --- a/src/components/PlaceCard.jsx +++ b/src/components/PlaceCard.jsx @@ -10,6 +10,30 @@ import { fetchElevation, fetchPlaceDetails, fetchPlaceByWikidata, fetchDriveTime import { hasFeature } from "../config" import { buildAddress } from "../utils/place" + +// Wiki service icons (simplified monochrome versions) +const WikipediaIcon = ({ size = 13, style }) => ( + + + +) + +const WikivoyageIcon = ({ size = 13, style }) => ( + + + +) + +const WikidataIcon = ({ size = 13, style }) => ( + + + + + + + +) + const M_TO_FT = 3.28084 function formatDriveTime(seconds) { @@ -178,36 +202,6 @@ function WikiSummarySection({ details }) { Pop. {details.wiki_population.toLocaleString ? details.wiki_population.toLocaleString() : details.wiki_population} )} - - {/* Wiki links */} -
- {details.wiki_url && ( - - - Read more - (local) - - )} - {details.wikivoyage_url && ( - - - Travel guide - (local) - - )} -
) } @@ -264,26 +258,31 @@ function EnrichmentSections({ details }) { {hasLinks && (
- {et.wikipedia && (wiki_url ? ( + {wiki_url ? ( - - {wikiLabel(et.wikipedia)} + + Wikipedia (local) - ) : wikiUrl(et.wikipedia) && ( + ) : et.wikipedia && wikiUrl(et.wikipedia) && ( - - {wikiLabel(et.wikipedia)} + + Wikipedia - ))} + )} {wikivoyage_url && ( - - Travel guide + + Wikivoyage (local) )} - {et.wikidata && View on Wikidata} + {et.wikidata && ( + + + Wikidata + + )}
)} diff --git a/src/components/PlaceDetail.jsx b/src/components/PlaceDetail.jsx index be24c26..a0b839b 100644 --- a/src/components/PlaceDetail.jsx +++ b/src/components/PlaceDetail.jsx @@ -10,6 +10,30 @@ import { fetchElevation, fetchPlaceDetails, fetchPlaceByWikidata, fetchDriveTime import { hasFeature } from '../config' import { buildAddress } from '../utils/place' + +// Wiki service icons (simplified monochrome versions) +const WikipediaIcon = ({ size = 13, style }) => ( + + + +) + +const WikivoyageIcon = ({ size = 13, style }) => ( + + + +) + +const WikidataIcon = ({ size = 13, style }) => ( + + + + + + + +) + /** Meters to feet */ const M_TO_FT = 3.28084 @@ -322,7 +346,7 @@ function EnrichmentSections({ details }) { {hasLinks && (
- {et.wikipedia && (wiki_url ? ( + {wiki_url ? ( - - {wikiLabel(et.wikipedia)} + + Wikipedia (local) - ) : wikiUrl(et.wikipedia) && ( + ) : et.wikipedia && wikiUrl(et.wikipedia) && ( - - {wikiLabel(et.wikipedia)} + + Wikipedia - ))} + )} {wikivoyage_url && ( - - Travel guide + + Wikivoyage (local) )} @@ -364,10 +388,11 @@ function EnrichmentSections({ details }) { href={`https://www.wikidata.org/wiki/${et.wikidata}`} target="_blank" rel="noopener noreferrer" - className="text-[11px]" - style={{ color: 'var(--text-tertiary)', textDecoration: 'underline' }} + className="flex items-center gap-2 text-xs" + style={{ color: 'var(--accent)' }} > - View on Wikidata + + Wikidata )}
@@ -439,36 +464,6 @@ function WikiSummarySection({ details }) { Population: {details.wiki_population.toLocaleString ? details.wiki_population.toLocaleString() : details.wiki_population} )} - - {/* Wiki links */} -
- {details.wiki_url && ( - - - Read more - (local) - - )} - {details.wikivoyage_url && ( - - - Travel guide - (local) - - )} -
) }