pages/_layouts/default.html
Carlos Morales 08a839c5f5
Add a progress bar to show the scroll position (#934)
This feature adds a horizontal bar under the top menu which tracks the
vertical scroll position. Such a feature can be useful to represent how
much is left to read on the current page more aesthetically.

As this is an optional feature, `enable_progressbar` must be set to
`true` in `_config.yml` to activate the functionality.

I am not the original author of this code. I just made it compatible
with the current version of the template at the time of this commit. The
original code was most likely authored by Pankaj Parashar in this
[post](https://css-tricks.com/reading-position-indicator/) made a few
years before the first inclusion in an `al-folio` site. Then, the code
was adapted for compatibility with the template at Anthony Plantanios'
site. Finally, I did
the last updates to have the code fit the new conventions used in the
project.

This was discussed in #557

Co-authored-by: rohandebsarkar <rohandebsarkar@gmail.com>
2022-10-24 15:08:26 +05:30

36 lines
884 B
HTML

<!DOCTYPE html>
<html lang="{{ site.lang }}">
<!-- Head -->
<head>
{%- if page.redirect -%}
<meta http-equiv="refresh" content="3; url={{ site.baseurl }}/" />
{%- endif -%}
{% include head.html %}
</head>
<!-- Body -->
<body class="{% if site.navbar_fixed %}fixed-top-nav{% endif %} {% unless site.footer_fixed %}sticky-bottom-footer{% endunless %}">
<!-- Header -->
{%- include header.html %}
<!-- Content -->
<div class="container mt-5">
{{ content }}
</div>
<!-- Footer -->
{%- include footer.html %}
<!-- JavaScripts -->
{% include scripts/jquery.html %}
{% include scripts/bootstrap.html %}
{% include scripts/masonry.html %}
{% include scripts/misc.html %}
{% include scripts/mathjax.html %}
{% include scripts/analytics.html %}
{% include scripts/progressBar.html %}
</body>
</html>