{% extends "postings/generic_page.html" %}

{# The homepage for the website. #}

{% block content %}
	{# First section for searching our database. #}
	<section>
		<form method="GET" action="/">
			<input type="text" name="search_query">
			<button type="submit">Search</button>
		</form>
		<nav>
			<a href="/rateables?type=university">Universities</a>
			<a href="/rateables?type=course">Courses</a>
		</nav>
	</section>

	{# Second section for displaying results, or whatever should be shown first. #}
	{% if results %}
		<section>
			<ul>
				{% for entity in results %}
					<li>{{ entity.name }}</li>
				{% endfor %}
			</ul>
		</section>
	{% endif %}
	
{% endblock %}