Merge branch 'dev' of rajukottedi/chirpy-blogging into prod
This commit is contained in:
commit
4ab4cad773
@ -3,6 +3,9 @@ id: 'blog'
|
||||
|
||||
url: "https://blog.kottedi.in"
|
||||
|
||||
show_drafts: false
|
||||
future: false
|
||||
|
||||
# Custom configuration
|
||||
custom-config:
|
||||
blog-services:
|
||||
|
||||
@ -3,6 +3,9 @@ id: 'blog-uat'
|
||||
|
||||
url: "https://blog-uat.kottedi.in"
|
||||
|
||||
show_drafts: true
|
||||
future: true
|
||||
|
||||
# Custom configuration
|
||||
custom-config:
|
||||
blog-services:
|
||||
|
||||
@ -198,8 +198,8 @@ jekyll-archives:
|
||||
tag: /tags/:name/
|
||||
category: /categories/:name/
|
||||
|
||||
show_drafts: false
|
||||
future: false
|
||||
show_drafts: true
|
||||
future: true
|
||||
|
||||
|
||||
# Custom configuration
|
||||
|
||||
1
_includes/loader.html
Normal file
1
_includes/loader.html
Normal file
@ -0,0 +1 @@
|
||||
<i id="{{include.id}}" class="fa-solid fa-circle-notch fa-spin"></i>
|
||||
@ -1,15 +1,12 @@
|
||||
<em id="postvisitcounter">
|
||||
<i class="fa fa-eye fa-fw me-1" {% if include.tooltip %} title="{{site.data.locales[include.lang].post.views}}"
|
||||
data-bs-toggle="tooltip" data-bs-placement="bottom" {% endif %}></i>
|
||||
{% include loader.html id="postcountloader" %}
|
||||
<em id="visit-count">
|
||||
</em>
|
||||
|
||||
<!-- <script defer>
|
||||
function postvisits(response) {
|
||||
document.getElementById('postvisitcounter').innerText = response.value;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script async src="http://localhost:5016/GetCounter/test?callback=postvisits"></script> -->
|
||||
|
||||
<script>
|
||||
document.getElementById("visit-count").style.display = "none";
|
||||
document.getElementById("postcountloader").style.display = "inline-block";
|
||||
function ajax(url) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
@ -28,7 +25,9 @@ var postId = "{{ page.title }}";
|
||||
ajax("{{site.custom-config.blog-services.service_url}}/GetPostViews?siteId=" + siteId + "&postId=" + postId)
|
||||
.then(function (result) {
|
||||
console.log(result); // Code depending on result
|
||||
document.getElementById('postvisitcounter').innerText = result;
|
||||
document.getElementById('visit-count').innerText = result;
|
||||
document.getElementById("postcountloader").style.display = "none";
|
||||
document.getElementById("visit-count").style.display = "inline-block";
|
||||
})
|
||||
.catch(function () {
|
||||
// An error occurred
|
||||
|
||||
@ -14,6 +14,9 @@ tail_includes:
|
||||
<h1 data-toc-skip>{{ page.title }}</h1>
|
||||
|
||||
<div class="post-meta text-muted">
|
||||
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<!-- published date -->
|
||||
<span>
|
||||
{{ site.data.locales[lang].post.posted }}
|
||||
@ -27,12 +30,14 @@ tail_includes:
|
||||
{% include datetime.html date=page.last_modified_at tooltip=true lang=lang %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- post counter -->
|
||||
<span>
|
||||
{{ site.data.locales[lang].post.views }}
|
||||
{% include post-counter.html %}
|
||||
</span>
|
||||
<div>
|
||||
<!-- {{ site.data.locales[lang].post.views }} -->
|
||||
{% include post-counter.html tooltip=true lang=lang %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if page.image %}
|
||||
{% capture src %}src="{{ page.image.path | default: page.image }}"{% endcapture %}
|
||||
@ -107,8 +112,7 @@ tail_includes:
|
||||
<div class="post-tags">
|
||||
<i class="fa fa-tags fa-fw me-1"></i>
|
||||
{% for tag in page.tags %}
|
||||
<a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
|
||||
class="post-tag no-text-decoration" >
|
||||
<a href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/" class="post-tag no-text-decoration">
|
||||
{{- tag -}}
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user