Make HTML more simple
This commit is contained in:
parent
0dd8a5ec49
commit
c447abc6fe
8 changed files with 41 additions and 287 deletions
|
|
@ -38,30 +38,25 @@
|
|||
{% endblock title %}
|
||||
</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
|
||||
Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
padding: 0 15px;
|
||||
max-width: 650px;
|
||||
font-size: 115%;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
html {
|
||||
color-scheme: light dark;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
html { color-scheme: light dark; }
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; line-height: 1.4; padding: 0 15px; font-size: 115%;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{% include "navbar.html" %}
|
||||
<div class="content">
|
||||
{% block content %}
|
||||
<!-- Main content will be injected here -->
|
||||
{% endblock content %}
|
||||
</div>
|
||||
<a href="{% url 'twitch:dashboard' %}">Dashboard</a> |
|
||||
<a href="{% url 'twitch:campaign_list' %}">Campaigns</a> |
|
||||
<a href="{% url 'twitch:game_list' %}">Games</a> |
|
||||
{% if user.is_authenticated %}
|
||||
{% if user.is_staff %}
|
||||
<a href="{% url 'admin:index' %}">Admin</a> |
|
||||
{% endif %}
|
||||
<a href="{% url 'accounts:profile' %}">{{ user.username }}</a>
|
||||
{% else %}
|
||||
<a href="{% url 'accounts:login' %}">Login</a> |
|
||||
<a href="{% url 'accounts:signup' %}">Sign Up</a>
|
||||
{% endif %}
|
||||
{% block content %}
|
||||
<!-- Main content will be injected here -->
|
||||
{% endblock content %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
<nav>
|
||||
<a href="{% url 'twitch:dashboard' %}"
|
||||
{% if request.path == '/dashboard/' %}class="active"{% endif %}>Dashboard</a>
|
||||
<a href="{% url 'twitch:campaign_list' %}"
|
||||
{% if '/campaigns/' in request.path %}class="active"{% endif %}>Campaigns</a>
|
||||
<a href="{% url 'twitch:game_list' %}"
|
||||
{% if '/games/' in request.path %}class="active"{% endif %}>Games</a>
|
||||
{% if user.is_authenticated %}
|
||||
{% if user.is_staff %}
|
||||
<a href="{% url 'admin:index' %}"
|
||||
{% if '/admin/' in request.path %}class="active"{% endif %}>Admin</a>
|
||||
{% endif %}
|
||||
<a href="{% url 'accounts:profile' %}"
|
||||
{% if '/profile/' in request.path %}class="active"{% endif %}>{{ user.username }}</a>
|
||||
{% else %}
|
||||
<a href="{% url 'accounts:login' %}"
|
||||
{% if '/login/' in request.path %}class="active"{% endif %}>Login</a>
|
||||
<a href="{% url 'accounts:signup' %}"
|
||||
{% if '/signup/' in request.path %}class="active"{% endif %}>Sign Up</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
|
|
@ -6,42 +6,24 @@
|
|||
{% block content %}
|
||||
{% if campaigns_by_org_game %}
|
||||
{% for org_id, org_data in campaigns_by_org_game.items %}
|
||||
<h2>{{ org_data.name }}</h2>
|
||||
{% for game_id, game_data in org_data.games.items %}
|
||||
<h3>
|
||||
<h1>
|
||||
<a href="{% url 'twitch:game_detail' game_id %}">{{ game_data.name }}</a>
|
||||
</h3>
|
||||
<p>{{ game_data.campaigns.0.description|default:"No description available."|linebreaksbr }}</p>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<th style="width:25%">Image</th>
|
||||
<th>Campaign</th>
|
||||
<th>Ends In</th>
|
||||
</tr>
|
||||
{% for campaign in game_data.campaigns %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if campaign.image_url %}
|
||||
<img height="160"
|
||||
width="160"
|
||||
src="{{ campaign.image_url }}"
|
||||
alt="{{ campaign.name }}">
|
||||
{% else %}
|
||||
<img height="160"
|
||||
width="160"
|
||||
src="{% static 'images/placeholder.png' %}"
|
||||
alt="No Image Available">
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{% url 'twitch:campaign_detail' campaign.id %}">{{ campaign.clean_name }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<span title="{{ campaign.end_at|date:'M d, Y H:i' }}">Ends in {{ campaign.end_at|timeuntil }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</h1>
|
||||
{% for campaign in game_data.campaigns %}
|
||||
<h2>{{ campaign.clean_name }}</h2>
|
||||
<p>
|
||||
<h4>
|
||||
<a href="{% url 'twitch:campaign_detail' campaign.id %}">
|
||||
<img height="160"
|
||||
width="160"
|
||||
src="{{ campaign.image_url }}"
|
||||
alt="{{ campaign.name }}">
|
||||
</a>
|
||||
</h4>
|
||||
<span title="{{ campaign.end_at|date:'c' }}">Ends in {{ campaign.end_at|timeuntil }}</span>
|
||||
</p>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,14 @@
|
|||
{% endblock title %}
|
||||
{% block content %}
|
||||
<h1>{{ game.display_name }}</h1>
|
||||
<div>
|
||||
<input type="checkbox" id="found" />
|
||||
<label for="found">🔔 Get notified as soon as a drop for {{ game.display_name }} appears on Twitch.</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" id="live" />
|
||||
<label for="live">🎮 Get notified when the drop is live and ready to be farmed.</label>
|
||||
</div>
|
||||
{% if active_campaigns %}
|
||||
<h5>Active Campaigns</h5>
|
||||
<table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue