mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 22:45:42 -06:00
Merge pull request #49 from miodzie/main
Update .Path to .File.Path to fix deprecation warnings.
This commit is contained in:
commit
d2433b5072
2 changed files with 5 additions and 5 deletions
|
@ -27,7 +27,7 @@
|
||||||
var liked_article = false
|
var liked_article = false
|
||||||
|
|
||||||
if (typeof auth !== 'undefined') {
|
if (typeof auth !== 'undefined') {
|
||||||
var oid = "views_{{ .Path }}"
|
var oid = "views_{{ .File.Path }}"
|
||||||
var id = oid ? oid.replaceAll("/", "-") : oid
|
var id = oid ? oid.replaceAll("/", "-") : oid
|
||||||
|
|
||||||
var viewed = localStorage.getItem(id);
|
var viewed = localStorage.getItem(id);
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var oid_likes = "likes_{{ .Path }}"
|
var oid_likes = "likes_{{ .File.Path }}"
|
||||||
var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes
|
var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes
|
||||||
|
|
||||||
var liked = localStorage.getItem(id_likes);
|
var liked = localStorage.getItem(id_likes);
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function process_article() {
|
function process_article() {
|
||||||
var oid_likes = "likes_{{ .Path }}"
|
var oid_likes = "likes_{{ .File.Path }}"
|
||||||
var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes
|
var id_likes = oid_likes ? oid_likes.replaceAll("/", "-") : oid_likes
|
||||||
if (!liked_article) {
|
if (!liked_article) {
|
||||||
like_article(id_likes)
|
like_article(id_likes)
|
||||||
|
@ -151,4 +151,4 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<span id="views_{{ .Path }}" title="views">
|
<span id="views_{{ .File.Path }}" title="views">
|
||||||
{{- i18n "article.views" 0 | markdownify | emojify -}}
|
{{- i18n "article.views" 0 | markdownify | emojify -}}
|
||||||
</span>
|
</span>
|
||||||
{{- /* Trim EOF */ -}}
|
{{- /* Trim EOF */ -}}
|
||||||
|
|
Loading…
Reference in a new issue