Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Bug: Toggle top margin on base page #1128

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions vms/vms/static/vms/js/marginTop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function a() {
var targetElem = document.getElementById("blockContainer");
targetElem.style.marginTop = "-5px";
}

function b() {
var targetElem = document.getElementById("blockContainer");
targetElem.style.marginTop = "100px";
}

$("button.navbar-toggle.collapsed").click(function () {
return (this.tog = !this.tog) ? a() : b();
});
4 changes: 3 additions & 1 deletion vms/vms/templates/vms/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,14 @@
</div>
</div>
</div>
<div class="container">
<div class="container" id="blockContainer">
{% block content %}
{% endblock %}
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="{% static "vms/js/marginTop.js" %}"></script>

</body>
</html>