Skip to content

Commit b12a2a2

Browse files
committed
Display number of views per journey entry
1 parent 8e7b3b3 commit b12a2a2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/handlebars/journey.handlebars

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ parent: feed
6363
<li><a href="{{link}}">{{name}}</a></li>
6464
{{/each}}
6565
</ul>
66+
{{count views '' '(Eine Ansicht)' '(# Ansichten)'}}
6667
</div>
6768
{{> partials/images in=.}}
6869

@@ -103,17 +104,17 @@ parent: feed
103104
(entries) => {
104105
for (const entry of entries) {
105106
if (entry.isIntersecting) {
106-
statistics.schedule(entry.target.id);
107+
statistics.schedule('{{journey.slug}}/' + entry.target.id);
107108
} else {
108-
statistics.withdraw(entry.target.id);
109+
statistics.withdraw('{{journey.slug}}/' + entry.target.id);
109110
}
110111
}
111112
},
112113
{ threshold: 0.2 }
113114
);
114115
{{#each itinerary}}
115116
observer.observe(document.querySelector('#{{scroll slug}}'));
116-
statistics.add('{{scroll slug}}', '{{sign slug}}', Math.min({{size images}} * 1500, 5000));
117+
statistics.add('{{slug}}', '{{sign slug}}', Math.min({{size images}} * 1500, 5000));
117118
{{/each}}
118119
</script>
119120
{{/inline}}

0 commit comments

Comments
 (0)