Add ids to tags; use pygments to color JSON
This commit is contained in:
parent
f83fee99f3
commit
8f438aca2d
18 changed files with 365 additions and 211 deletions
|
|
@ -3,55 +3,55 @@
|
|||
Search Results for "{{ query }}"
|
||||
{% endblock title %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<h1>Search Results for "{{ query }}"</h1>
|
||||
<div class="container" id="search-results-container">
|
||||
<h1 id="page-title">Search Results for "{{ query }}"</h1>
|
||||
{% if not results.organizations and not results.games and not results.campaigns and not results.drops and not results.benefits %}
|
||||
<p>No results found.</p>
|
||||
<p id="no-results">No results found.</p>
|
||||
{% else %}
|
||||
{% if results.organizations %}
|
||||
<h2>Organizations</h2>
|
||||
<ul>
|
||||
<h2 id="organizations-header">Organizations</h2>
|
||||
<ul id="organizations-list">
|
||||
{% for org in results.organizations %}
|
||||
<li>
|
||||
<li id="org-{{ org.pk }}">
|
||||
<a href="{% url 'twitch:organization_detail' org.pk %}">{{ org.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if results.games %}
|
||||
<h2>Games</h2>
|
||||
<ul>
|
||||
<h2 id="games-header">Games</h2>
|
||||
<ul id="games-list">
|
||||
{% for game in results.games %}
|
||||
<li>
|
||||
<li id="game-{{ game.pk }}">
|
||||
<a href="{% url 'twitch:game_detail' game.pk %}">{{ game.display_name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if results.campaigns %}
|
||||
<h2>Campaigns</h2>
|
||||
<ul>
|
||||
<h2 id="campaigns-header">Campaigns</h2>
|
||||
<ul id="campaigns-list">
|
||||
{% for campaign in results.campaigns %}
|
||||
<li>
|
||||
<li id="campaign-{{ campaign.pk }}">
|
||||
<a href="{% url 'twitch:campaign_detail' campaign.pk %}">{{ campaign.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if results.drops %}
|
||||
<h2>Drops</h2>
|
||||
<ul>
|
||||
<h2 id="drops-header">Drops</h2>
|
||||
<ul id="drops-list">
|
||||
{% for drop in results.drops %}
|
||||
<li>
|
||||
<li id="drop-{{ drop.id }}">
|
||||
<a href="{% url 'twitch:campaign_detail' drop.campaign.pk %}#drop-{{ drop.id }}">{{ drop.name }}</a> (in {{ drop.campaign.name }})
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if results.benefits %}
|
||||
<h2>Benefits</h2>
|
||||
<ul>
|
||||
{% for benefit in results.benefits %}<li>{{ benefit.name }}</li>{% endfor %}
|
||||
<h2 id="benefits-header">Benefits</h2>
|
||||
<ul id="benefits-list">
|
||||
{% for benefit in results.benefits %}<li id="benefit-{{ benefit.id }}">{{ benefit.name }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue