dont refresh blog page when navigating from blog to blog
This commit is contained in:
parent
6a6219d206
commit
68c74fed48
2 changed files with 13 additions and 7 deletions
|
|
@ -6,9 +6,10 @@
|
|||
{{ page.content | markdownify }}
|
||||
|
||||
{% assign post = site.posts.first %}
|
||||
<h4><strong>{{ post.date | date_to_string }}</strong><small>. {{ post.category }} .</small> <a href="{{ post.url }}">
|
||||
<strong>{{ post.title }} </a> </strong>
|
||||
<small><a href="{{ post.url }}#disqus_thread">Comments</a></small>
|
||||
<h4> <strong> {{ post.date | date_to_string }} </strong>
|
||||
<small>. {{ post.category }} .</small>
|
||||
<strong> <a href="{{ post.url }}">{{ post.title }} </a> </strong>
|
||||
<small> <a href="{{ post.url }}#disqus_thread">Comments</a></small>
|
||||
</h4>
|
||||
|
||||
{{ post.content | truncatewords: site.post-preview-words | markdownify }}
|
||||
|
|
|
|||
|
|
@ -22,25 +22,30 @@
|
|||
</li>
|
||||
{% for p in site.pages_list %}
|
||||
{% if page.name == "index.html" %}
|
||||
<!-- Go to section for each page in index -->
|
||||
<li>
|
||||
<a class="page-scroll" href="#{{ p[1] }}"> {{ p[0] }} </a>
|
||||
</li>
|
||||
{% else %}
|
||||
{% if p[0] == "Blog" %}
|
||||
{% if page.name == 'blog.html' and p[0] == "Blog" %}
|
||||
<!-- Blog button in blog.html doesn't refresh the page -->
|
||||
<li>
|
||||
<a class="page-scroll" href="#blog"> {{ p[0] }} </a>
|
||||
</li>
|
||||
{% elsif p[0] == "Blog" %}
|
||||
<li>
|
||||
<a class="page-scroll" href="/blog.html"> {{ p[0] }} </a>
|
||||
</li>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a class="page-scroll" href="/index.html#{{ p[1] }}"> {{ p[0] }} </a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.navbar-collapse -->
|
||||
</div>
|
||||
<!-- /.container -->
|
||||
</nav>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue