Skip to content

Commit c362490

Browse files
committed
Reformat templates
1 parent fbc8adc commit c362490

22 files changed

+378
-275
lines changed

dependency_dash/templates/404.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends "search.html" %}
2-
{% set title="404" %}
2+
{% set title = "404" %}
33

44
{% block blurb %}
55
<h1>404</h1>
@@ -8,7 +8,7 @@ <h1>404</h1>
88

99
<img class="mx-auto d-block" src="/static/img/not-found.webp" alt="magnifying glass" height="256">
1010

11-
<p class="goto-label">
12-
Try using the links in the top bar to find what you are looking for, or type a repository name below.
11+
<p class="goto-label">
12+
Try using the links in the top bar to find what you are looking for, or type a repository name below.
1313
</p>
1414
{% endblock blurb %}

dependency_dash/templates/500.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{% extends "layout.html" %}
2-
{% set title="500" %}
2+
{% set title = "500" %}
33

44
{% block content %}
55
<h1>500</h1>
66

77
<p>Something went wrong at our end. Please try again in a minute.</p>
88

9-
<img class="mx-auto d-block" src="/static/img/not-found.webp" alt="magnifying glass" height="256">
9+
<img class="mx-auto d-block"
10+
src="/static/img/not-found.webp"
11+
alt="magnifying glass"
12+
height="256">
1013

1114
<p>
1215
If you continue to experience issues please

dependency_dash/templates/_formhelpers.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{% macro render_field(field) %}
2-
<dt>{{ field.label }}</dt>
3-
<dd>{{ field(**kwargs)|safe }}
2+
<dt>{{ field.label }}</dt>
3+
<dd>
4+
{{ field(**kwargs) |safe }}
45
{% if field.errors %}
56
<ul class="errors">
67
{% for error in field.errors %}

dependency_dash/templates/about.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends "fontawesome.html" %}
2-
{% set title="About" %}
2+
{% set title = "About" %}
33

44
{% macro github_link(name) %}
55
<a href="https://github.com/{{ name }}" class="github-link"><i class="fab fa-github"></i></a>
@@ -9,7 +9,6 @@
99
<a href="{{ href }}" class="docs-link"><i class="fas fa-book"></i></a>
1010
{% endmacro %}
1111

12-
1312
{% block content %}
1413
{{ body|safe }}
1514

dependency_dash/templates/dependency_table.html

Lines changed: 46 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,20 @@
44
{% set dependencies = list(get_dependency_status(requirements)) %}
55
{% set anchor_id = normalize(filename) %}
66

7-
<section id="{{ filename }}-button" class="dependency-table-header text-center">
8-
<button
9-
class="btn text-center"
10-
type="button"
11-
data-toggle="collapse"
12-
data-target="#{{ anchor_id }}"
13-
aria-expanded="true"
14-
aria-controls="{{ anchor_id }}"
15-
>
7+
<section id="{{ filename }}-button" class="dependency-table-header text-center">
8+
<button class="btn text-center"
9+
type="button"
10+
data-toggle="collapse"
11+
data-target="#{{ anchor_id }}"
12+
aria-expanded="true"
13+
aria-controls="{{ anchor_id }}">
1614
<i class="fa collapse-indicator"></i>
1715
{% if counts %}
1816
{{ badge_data.extend(dependencies) or '' }}
1917
<i class="fas fa-lightbulb" title="This file counts towards the overall status"></i>
2018
{% else %}
21-
<i class="far fa-lightbulb" title="This file doesn't count towards the overall status"></i>
19+
<i class="far fa-lightbulb"
20+
title="This file doesn't count towards the overall status"></i>
2221
{% endif %}
2322
<h5>{{ filename }}</h5>
2423
</button>
@@ -27,57 +26,57 @@ <h5>{{ filename }}</h5>
2726
<div class="collapse show" id="{{ anchor_id }}">
2827
<table class="table table-striped table-sm collapse show">
2928
<thead>
30-
<tr>
31-
<th scope="col">Package</th>
32-
<th scope="col" class="text-right">Requirement</th>
33-
<th scope="col" class="text-right">Latest</th>
34-
<th scope="col" class="text-center">Status</th>
35-
</tr>
29+
<tr>
30+
<th scope="col">Package</th>
31+
<th scope="col" class="text-right">Requirement</th>
32+
<th scope="col" class="text-right">Latest</th>
33+
<th scope="col" class="text-center">Status</th>
34+
</tr>
3635
</thead>
3736
<tbody>
38-
{% for req, status, data in dependencies %}
39-
<tr class="dependency">
40-
<td>
41-
<div class="d-flex flex-row align-items-center flex-wrap">
42-
<div class="p-2">
43-
{{ format_internal_link(req, data) | safe }}
44-
</div>
45-
<div class="p-2 ml-auto pkg-links">
46-
{%- if data["package_url"].strip() -%}
47-
<a href="{{ data['package_url'] }}" title="View on PyPI"><i class="fab fa-python"></i></a>
48-
{%- endif -%}
49-
{{ format_project_links(data["project_urls"])|safe }}
50-
{%- if data["license"].strip() -%}
51-
<a
52-
class="license-info-hover-target"
53-
href="#"
54-
data-toggle="tooltip"
55-
data-placement="top"
56-
title="{{ data['license'] }}"
57-
><i class="far fa-file-alt"></i></a>
58-
{%- endif -%}
37+
{% for req, status, data in dependencies %}
38+
<tr class="dependency">
39+
<td>
40+
<div class="d-flex flex-row align-items-center flex-wrap">
41+
<div class="p-2">
42+
{{ format_internal_link(req, data) | safe }}
43+
</div>
44+
<div class="p-2 ml-auto pkg-links">
45+
{%- if data["package_url"].strip() -%}
46+
<a href="{{ data['package_url'] }}" title="View on PyPI"><i class="fab fa-python"></i></a>
47+
{%- endif -%}
48+
{{ format_project_links(data["project_urls"]) |safe }}
49+
{%- if data["license"].strip() -%}
50+
<a class="license-info-hover-target"
51+
href="#"
52+
data-toggle="tooltip"
53+
data-placement="top"
54+
title="{{ data['license'] }}">
55+
<i class="far fa-file-alt"></i>
56+
</a>
57+
{%- endif -%}
58+
</div>
5959
</div>
60-
</div>
61-
</td>
62-
<td class="text-right">{{ req.specifier }}</td>
63-
<td class="text-right">{{ data["version"] }}</td>
64-
<td class="status-{{ status }}">{{ status }}</td>
65-
</tr>
66-
{% endfor %}
60+
</td>
61+
<td class="text-right">{{ req.specifier }}</td>
62+
<td class="text-right">{{ data["version"] }}</td>
63+
<td class="status-{{ status }}">{{ status }}</td>
64+
</tr>
65+
{% endfor %}
6766
</tbody>
6867
<script>
6968
if (window.matchMedia("(any-hover: none)").matches) {
7069
$('document').ready(function () {
7170
$('[data-toggle=tooltip]').tooltip();
7271
});
7372
}
74-
</script>
73+
</script>
7574
</table>
7675
</div>
7776
{% endfor %}
7877

7978
<div class="p-2 ml-auto" id="badge" hx-swap-oob="true">
80-
<a title="Show badge URLs" data-toggle="collapse" href="#badge-urls" >
81-
{{ make_badge(badge_data)|safe }}
79+
<a title="Show badge URLs" data-toggle="collapse" href="#badge-urls">
80+
{{ make_badge(badge_data) |safe }}
8281
</a>
8382
</div>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{% extends "layout.html" %}
22

33
{% block extrahead %}
4-
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/fontawesome.min.css') }}">
4+
<link rel="stylesheet"
5+
type="text/css"
6+
href="{{ url_for('static', filename='css/fontawesome.min.css') }}">
57
{% endblock extrahead %}

dependency_dash/templates/github_search.html

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,26 @@
55

66
{% block blurb %}
77
<h2>dependency-dash</h2>
8-
<h1>GitHub <i class="fab fa-github"></i></h1>
9-
<p>
10-
View the dependency status of a Python package or GitHub repository.
11-
</p>
12-
<p class="goto-label">
13-
To get started, type a user or repository name below:
14-
</p>
8+
<h1>
9+
GitHub <i class="fab fa-github"></i>
10+
</h1>
11+
<p>View the dependency status of a Python package or GitHub repository.</p>
12+
<p class="goto-label">To get started, type a user or repository name below:</p>
1513
{% endblock blurb %}
1614

1715
{% block tips %}
1816
<div class="alert alert-info">
1917
<h6>Search Tips</h6>
2018
<ul>
21-
<li><code>github:octocat</code> searches for a GitHub user or org called <code>octocat</code></li>
22-
<li><code>github:octocat/hello-world</code> searches for the GitHub repository <code>hello-world</code> owned by the user <code>octocat</code></li>
23-
<li><code>octocat/hello-world</code> has the same effect as <code>github:octocat/hello-world</code></li>
19+
<li>
20+
<code>github:octocat</code> searches for a GitHub user or org called <code>octocat</code>
21+
</li>
22+
<li>
23+
<code>github:octocat/hello-world</code> searches for the GitHub repository <code>hello-world</code> owned by the user <code>octocat</code>
24+
</li>
25+
<li>
26+
<code>octocat/hello-world</code> has the same effect as <code>github:octocat/hello-world</code>
27+
</li>
2428
</ul>
2529
</div>
2630

dependency_dash/templates/home.html

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,25 @@ <h1>dependency-dash</h1>
77
<code>dependency-dash</code> is a completely Open Source dashboard for viewing
88
the dependency status of a Python package or GitHub repository.
99
</p>
10-
<p class="goto-label">
11-
To get started, type a repository or package name below:
12-
</p>
10+
<p class="goto-label">To get started, type a repository or package name below:</p>
1311
{% endblock blurb %}
1412

1513
{% block tips %}
1614
<div class="alert alert-info">
1715
<h6>Search Tips</h6>
1816
<ul>
19-
<li><code>pypi:shrubbery</code> searches for a PyPI package called <code>shrubbery</code></li>
20-
<li><code>github:octocat</code> searches for a GitHub user or org called <code>octocat</code></li>
21-
<li><code>github:octocat/hello-world</code> searches for the GitHub repository <code>hello-world</code> owned by the user <code>octocat</code></li>
22-
<li><code>octocat/hello-world</code> has the same effect as <code>github:octocat/hello-world</code></li>
17+
<li>
18+
<code>pypi:shrubbery</code> searches for a PyPI package called <code>shrubbery</code>
19+
</li>
20+
<li>
21+
<code>github:octocat</code> searches for a GitHub user or org called <code>octocat</code>
22+
</li>
23+
<li>
24+
<code>github:octocat/hello-world</code> searches for the GitHub repository <code>hello-world</code> owned by the user <code>octocat</code>
25+
</li>
26+
<li>
27+
<code>octocat/hello-world</code> has the same effect as <code>github:octocat/hello-world</code>
28+
</li>
2329
</ul>
2430
</div>
2531

0 commit comments

Comments
 (0)