Browse Source

scroll bar

graphics
Cailean Finn 6 months ago
parent
commit
4b97b9fbe4
  1. 4
      public/js/scrollbar.js
  2. 1
      templates/article.html

4
public/js/scrollbar.js

@ -0,0 +1,4 @@
window.addEventListener('DOMContentLoaded', () => {
let scrollElement = document.querySelector('#page-header');
scrollElement.scrollLeft = (scrollElement.scrollWidth - scrollElement.clientWidth ) / 2;
});

1
templates/article.html

@ -40,4 +40,5 @@
</div>
<div id="container"></div>
<script type="module" src="{{ url_for('static', filename='js/skybox.js') }}"></script>
<script type="module" src="{{ url_for('static', filename='js/scrollbar.js') }}"></script>
{% endblock content %}
Loading…
Cancel
Save