Skip to content

Commit

Permalink
format grid.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ericoc committed Jan 16, 2024
1 parent 915f616 commit 4fbdea8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
21 changes: 8 additions & 13 deletions ishar/apps/challenges/templates/challenges.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,21 @@
{% endfor %}
],
className: {
table: "table table-bordered table-dark table-striped",
table: 'table table-dark table-striped border border-secondary rounded'
},
style: {
table: {'max-width': '50vw'},
th: {'background-color': 'rgba(0, 0, 0, 0.1)'},
},
search: true,
sort: true,
pagination: false,
width: '50%'
pagination: false
}).render(where);
};

</script>
{% endblock scripts %}
{% block content %}
<div class="card bg-dark">
<div class="card-body">
<div class="card-text" id="challenges"></div>
</div>
</div>
<script>
showChallenges(
document.getElementById('challenges')
);
</script>
<div class="bg-black mx-1 my-3 p-1 border border-secondary rounded" id="challenges"></div>
<script>showChallenges(document.getElementById('challenges'));</script>
{% endblock content %}
15 changes: 9 additions & 6 deletions ishar/apps/leaders/templates/leaders.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,15 @@
{% endfor %}
],
className: {
table: "table table-bordered table-dark table-striped",
table: 'table table-dark table-striped border border-secondary rounded'
},
style: {
table: {'max-width': '50vw'},
th: {'background-color': 'rgba(0, 0, 0, 0.1)'},
},
search: true,
sort: true,
pagination: true,
width: '50%'
}).render(where);
};
</script>
Expand All @@ -84,26 +87,26 @@
<ul class="m-1 px-1 py-3 list-group list-group-horizontal">
<li class="list-group-item bg-black" title="All">
{% if game_type %}
<a class="list-group-item-text" href="{% url "leaders" %}">All</a>
<a class="list-group-item-text" href="{% url "leaders" %}#leaders">All</a>
{% else %}
<span class="text-ishar">All</span>
{% endif %}
</li>
<li class="list-group-item bg-black" title="Classic">
{% if game_type != "Classic" %}
<a class="list-group-item-text" href="{% url "classic" %}">Classic</a>
<a class="list-group-item-text" href="{% url "classic" %}#leaders">Classic</a>
{% else %}
<span class="text-ishar">Classic</span>
{% endif %}
</li>
<li class="list-group-item bg-black" title="Survival">
{% if game_type != "Survival" %}
<a class="list-group-item-text" href="{% url "survival" %}">Survival</a>
<a class="list-group-item-text" href="{% url "survival" %}#leaders">Survival</a>
{% else %}
<span class="text-ishar">Survival</span>
{% endif %}
</li>
</ul>
<div class="mx-1 my-3 p-1" id="leaders"></div>
<div class="bg-black mx-1 my-3 p-1 border border-secondary rounded" id="leaders"></div>
<script>showLeaders( document.getElementById('leaders'));</script>
{% endblock content %}
2 changes: 1 addition & 1 deletion ishar/apps/patches/templates/patches.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</summary>
<blockquote class="border-top border-secondary blockquote m-3">
<p>
<a href="{{ patch.patch_file.url }}" target="_blank" title="{{ patch.patch_file.name }} &lt;{{ patch.patch_file.url }}&gt;">
<a href="{{ patch.patch_file.url }}" target="_blank" title="{{ patch.patch_file.name }} &lt;https://{{ request.META.HTTP_HOST }}{{ patch.patch_file.url }}&gt;">
{{ patch.patch_file.name }}
</a>
<small>
Expand Down

0 comments on commit 4fbdea8

Please sign in to comment.