progress count
This commit is contained in:
parent
7f1a8e0a6c
commit
361c75c6f7
6 changed files with 53 additions and 31 deletions
|
|
@ -22,7 +22,16 @@ if ( !Cookies.get('nfcexplorer') ) {
|
|||
Cookies.set('nfcexplorer', generateUUID())
|
||||
}
|
||||
|
||||
cat = document.querySelector('meta[data-category]').content
|
||||
|
||||
fetch('https://nmns.place/track?' + new URLSearchParams({
|
||||
hash: Cookies.get('nfcexplorer'),
|
||||
ua: ua,
|
||||
}));
|
||||
cat: cat
|
||||
})).then(response => {
|
||||
progress = document.querySelector('span#progress').content
|
||||
document.querySelector('span#progress').content = response
|
||||
})
|
||||
.catch(error => {
|
||||
// handle the error
|
||||
});
|
||||
|
|
@ -1,13 +1,20 @@
|
|||
{% extends "base.html" %}
|
||||
{% block head %}
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta data-category="{{ article.category.slug }}" />
|
||||
<link href="{{ SITEURL }}/theme/local.css" rel="stylesheet">
|
||||
{% endblock head %}
|
||||
{% block content %}
|
||||
<section id="content" class="body">
|
||||
<div class="entry-content">
|
||||
{{ article.content }}
|
||||
{% if article.metadata.geohash %}
|
||||
<a href="{{ SITEURL }}/{{ article.category.url }}">Map</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
<section id="content" class="body">
|
||||
<div class="entry-content">
|
||||
{{ article.content }}
|
||||
{% if article.metadata.geohash %}
|
||||
<a href="{{ SITEURL }}/{{ article.category.url }}">Map</a>
|
||||
<span id="progress">{% for cat, art in categories %}{% if cat.slug == category.slug %}{{ art|count }}{% endif %}{% endfor %}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ SITEURL }}/theme/user.js"></script>
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ DEFAULT_LANG }}">
|
||||
<head>
|
||||
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
|
||||
{% block head %}
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="{{ SITEURL }}/theme/local.css" rel="stylesheet">
|
||||
{% endblock head %}
|
||||
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
|
||||
{% block head %}
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link href="{{ SITEURL }}/theme/local.css" rel="stylesheet">
|
||||
{% endblock head %}
|
||||
</head>
|
||||
|
||||
<body id="index" class="home">
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
{% if DESCRIPTION %}
|
||||
<footer id="contentinfo" class="body">
|
||||
<hr>
|
||||
{{ DESCRIPTION }}
|
||||
</footer>
|
||||
{% endif %}
|
||||
{% if DESCRIPTION %}
|
||||
<footer id="contentinfo" class="body">
|
||||
<hr>
|
||||
{{ DESCRIPTION }}
|
||||
</footer>
|
||||
{% endif %}
|
||||
</body>
|
||||
{% block scripts %}
|
||||
<script src="{{ SITEURL }}/theme/platform.js"></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue