fix: "home" locations not counted
This commit is contained in:
@@ -345,6 +345,7 @@ function normalizeCheckin(frontmatter, relativePath) {
|
|||||||
? `${latitude.toFixed(5)}, ${longitude.toFixed(5)}`
|
? `${latitude.toFixed(5)}, ${longitude.toFixed(5)}`
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
|
const locationName = asText(first(asArray(locationProps.name)));
|
||||||
const locationText = joinLocation(locality, region, country);
|
const locationText = joinLocation(locality, region, country);
|
||||||
const timestamp = published ? Date.parse(published) || 0 : 0;
|
const timestamp = published ? Date.parse(published) || 0 : 0;
|
||||||
const permalink = asText(frontmatter.permalink);
|
const permalink = asText(frontmatter.permalink);
|
||||||
@@ -367,6 +368,7 @@ function normalizeCheckin(frontmatter, relativePath) {
|
|||||||
venueWebsiteUrl,
|
venueWebsiteUrl,
|
||||||
venueSocialUrl,
|
venueSocialUrl,
|
||||||
locality,
|
locality,
|
||||||
|
locationName,
|
||||||
region,
|
region,
|
||||||
country,
|
country,
|
||||||
postalCode,
|
postalCode,
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ leafletMap: true
|
|||||||
{% set homeSeenNames = [] %}
|
{% set homeSeenNames = [] %}
|
||||||
{% for c in checkins %}
|
{% for c in checkins %}
|
||||||
{% if c.latitude and c.longitude %}
|
{% if c.latitude and c.longitude %}
|
||||||
{% if "Murnau" in (c.locality or "") or "Garmisch" in (c.locality or "") %}
|
{% if c.locationName == "Murnau" or c.locationName == "Garmisch-Partenkirchen" %}
|
||||||
{% if c.name not in homeSeenNames %}
|
{% if c.name not in homeSeenNames %}
|
||||||
{% set mapPoints = (mapPoints.push({name: c.name, lat: c.latitude, lng: c.longitude, url: c.venueWebsiteUrl}), mapPoints) %}
|
{% set mapPoints = (mapPoints.push({name: c.name, lat: c.latitude, lng: c.longitude, url: c.venueWebsiteUrl}), mapPoints) %}
|
||||||
{% set homeSeenNames = (homeSeenNames.push(c.name), homeSeenNames) %}
|
{% set homeSeenNames = (homeSeenNames.push(c.name), homeSeenNames) %}
|
||||||
@@ -91,7 +91,7 @@ leafletMap: true
|
|||||||
{% else %}
|
{% else %}
|
||||||
{{ checkin.name }}
|
{{ checkin.name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if groupItems | length > 1 and "Murnau" not in (checkin.locality or "") and "Garmisch" not in (checkin.locality or "") %}
|
{% if groupItems | length > 1 and checkin.locationName != "Murnau" and checkin.locationName != "Garmisch-Partenkirchen" %}
|
||||||
<span class="ml-2 text-xs font-normal text-surface-500 dark:text-surface-400">{{ groupItems | length }}×</span>
|
<span class="ml-2 text-xs font-normal text-surface-500 dark:text-surface-400">{{ groupItems | length }}×</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if checkin.isPrivate %}<span class="ml-2 text-xs text-amber-700 dark:text-amber-400">(private)</span>{% endif %}
|
{% if checkin.isPrivate %}<span class="ml-2 text-xs text-amber-700 dark:text-amber-400">(private)</span>{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user