-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hiding regular hours by default #355
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,9 @@ <h2 id="hours">Hours</h2> | |
</div> | ||
|
||
|
||
<h3>Regular Weekly Hours</h3> | ||
<h3>Regular Weekly Hours</h3> | ||
<button class = "btn btn-primary" id = "weekly_hours_btn" onclick="toggle_weekly_hours()" style="opacity:0.3;">Show</button> | ||
<div id = "weekly_hours" style="display:none;"> | ||
<p>The regular OCF hours are:</p> | ||
<div class="row"> | ||
<div class="col-sm-8"> | ||
|
@@ -86,6 +88,7 @@ <h3>Regular Weekly Hours</h3> | |
</table> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% if holidays %} | ||
<h3 id="holidays">{{semester}} Holidays</h3> | ||
|
@@ -131,4 +134,19 @@ <h4 id="walkthrough">Having trouble finding the entrance?</h4> | |
</video> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
function toggle_weekly_hours() { | ||
var change = document.getElementById("weekly_hours_btn"); | ||
if (change.innerHTML == "Show") | ||
{ | ||
change.innerHTML = "Hide"; | ||
$("#weekly_hours").show(); | ||
} | ||
else { | ||
change.innerHTML = "Show"; | ||
$("#weekly_hours").hide(); | ||
} | ||
} | ||
</script> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use something from Bootstrap instead of reinventing it ourselves? https://getbootstrap.com/docs/3.3/javascript/#collapse-example looks like basically what you want. Plus we get nice transitions this way. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (to clarify, we already have all the bootstrap css/js, so it should be as simple as adding the right classes and hooking things up; the example there should help) |
||
{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird spacing around some of the = signs