wbrefvem/corkboard

View on GitHub
cascade/templates/base.html

Summary

Maintainability
Test Coverage
<html>
    <head>
        {% load staticfiles %}
        <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="{% static 'cascade/css/bootstrap.min.css' %}">
        <link rel="stylesheet" href="{% static 'cascade/css/main.css' %}">
        <!-- jQuery -->
        <script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
        <!-- Bootstrap: Latest compiled and minified JavaScript -->
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
        <script>
            $(document).on('ready', function() {
                var links = $(".nav a");
                for (var i = 0; i < links.length; i++) {
                    if(links[i].href === window.location.href) {
                        $(links[i]).parent().addClass("active");
                    }
                }
            });
        </script>
    </head>
    <body>
        <header>
            <h1>Apply to host a Road Race or Parade</h1>
        </header>
        <nav>
             <ul>
                <li><a href="http://www.raleighnc.gov" class=""><img src="http://www.raleighnc.gov/content/static/images/City-Seal-BW.png"> City of Raleigh</a></li>
                <li><a class="" href="http://www.raleighnc.gov/community/content/CityMgrAdmin/Articles/SpecialEventsRaces.html">Special Events</a></li>
            </ul>
                {% if user.is_authenticated %}
                <div class="collapse navbar-collapse">
                    <ul class="nav navbar-nav navbar-default">
                        <li><a href="{% url 'events-list' %}">My Events</a></li>
                        <li><a href="{% url 'organization-add' %}">Add Organization</a></li>
                        <li><a href="{% url 'event-add' %}">Add Event</a></li>
                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown">
                            <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" href="#">{{ user.username }}</a>
                            <ul class="dropdown-menu" role="menu">
                                <li><a href="#">Do something</a></li>
                                <li><a href="#">Something else here</a></li>
                                <li class="divider"></li>
                                <li><a href="{% url 'logout' %}">Logout</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
                {% endif %}
        </nav>
        <div class="container">
            {% block content %}{% endblock %}
        </div>
        <footer>
            
        </footer>
        <script type="text/javascript">
        $('#accordion').collapse();
        </script>
    </body>
</html>