aboutsummaryrefslogtreecommitdiff
path: root/weblog/templates
diff options
context:
space:
mode:
Diffstat (limited to 'weblog/templates')
-rwxr-xr-xweblog/templates/weblog/weblog.html16
1 files changed, 15 insertions, 1 deletions
diff --git a/weblog/templates/weblog/weblog.html b/weblog/templates/weblog/weblog.html
index 035ca20..e1907c6 100755
--- a/weblog/templates/weblog/weblog.html
+++ b/weblog/templates/weblog/weblog.html
@@ -21,7 +21,10 @@
{% endblock %}
</div>
{% if show_sidebar %}
- <div class="weblog-sidebar">
+ {% if floating_sidebar %}
+ <div class="sidebar-filler hidden"></div>
+ {% endif %}
+ <div class="weblog-sidebar{% if floating_sidebar %} floating-sidebar{% endif %}">
{% if show_categories %}
{% if category %}
{% if category == 'misc' %}
@@ -39,4 +42,15 @@
</div>
{% endif %}
</div>
+{% if floating_sidebar %}
+ <script>
+ window.addEventListener("load", function(){
+ var sb_width = document.querySelector(".weblog-sidebar.floating-sidebar").offsetWidth;
+ var sidebar_filler = document.querySelector(".sidebar-filler");
+ sidebar_filler.style.width = sb_width+"px";
+ sidebar_filler.style.height = "10px";
+ window.addEventListener("scroll", floatSidebar);
+ });
+ </script>
+{% endif %}
{% endblock %}