Commit 46c89973 authored by David Haynes's avatar David Haynes
Browse files

Add comments to the index file

 - fairly simple again, though there's some inline js that needs to be
   moved out
parent 32731a37
Pipeline #477 passed with stage
in 7 minutes and 10 seconds
<!-- include the base html template -->
{% extends 'layouts/base.html' %} {% extends 'layouts/base.html' %}
<!-- load django crispy forms' tags -->
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
<!-- define the page title block -->
{% block title %} {% block title %}
SRCT Go &bull; A University Branded URL Shortener SRCT Go &bull; A University Branded URL Shortener
{% endblock %} {% endblock %}
<!-- define the content block for the page -->
{% block content %} {% block content %}
<!-- define the page header div -->
<div class="page-header" id="banner">
<div class="row">
<div class="col-md-12">
<h1><strong>
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-link fa-stack-1x fa-inverse"></i>
</span>
<i class="fa">Shorten URL</i>
</strong></h1>
</div>
</div>
</div>
<!-- call django crispy forms to render the go link creation form here -->
{% crispy form %}
<!-- load some JS to hide/show the custom date field -->
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
// hide by default
$("div_id_expires_custom").hide(); $("div_id_expires_custom").hide();
// if the expires_custom checkbox is checked..
if ($("#id_expires_5").is(":checked")) { if ($("#id_expires_5").is(":checked")) {
// display the field
$("#div_id_expires_custom").slideDown(); $("#div_id_expires_custom").slideDown();
} else { } else {
// keep it up
$("#div_id_expires_custom").slideUp(); $("#div_id_expires_custom").slideUp();
} }
// if the expires_custom checkbox is clicked..
$("#div_id_expires").click(function() { $("#div_id_expires").click(function() {
// if the expires_custom checkbox is checked..
if ($("#id_expires_5").is(":checked")) { if ($("#id_expires_5").is(":checked")) {
// display the field
$("#div_id_expires_custom").slideDown(); $("#div_id_expires_custom").slideDown();
} else { } else {
// keep it hidden
$("#div_id_expires_custom").slideUp(); $("#div_id_expires_custom").slideUp();
} }
}) })
}) })
</script> </script>
<div class="page-header" id="banner">
<div class="row">
<div class="col-md-12">
<h1><strong>
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-link fa-stack-1x fa-inverse"></i>
</span>
<i class="fa">Shorten URL</i>
</strong></h1>
</div>
</div>
</div>
{% crispy form %}
{% endblock %} {% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment