Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.0 of User Interface for vehicleinfo.org #2

Merged
merged 48 commits into from
Jan 9, 2020
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
a49981d
add new bss design file
zshafiqu Jan 8, 2020
fadbe1f
add homepage
zshafiqu Jan 8, 2020
fa33ec0
api page done
zshafiqu Jan 8, 2020
081fe8b
done with about page
zshafiqu Jan 8, 2020
1872746
more design updates
zshafiqu Jan 8, 2020
0f0251c
designs are done, ready for export
zshafiqu Jan 8, 2020
f707318
mkdir designs
zshafiqu Jan 8, 2020
f73c9aa
updates
zshafiqu Jan 8, 2020
ffb1d68
rename
zshafiqu Jan 8, 2020
4af3fcc
add html export
zshafiqu Jan 8, 2020
3e9c0db
overwrite old static
zshafiqu Jan 9, 2020
e452f84
overwrite old static
zshafiqu Jan 9, 2020
23fab37
scripts ported to new index
zshafiqu Jan 9, 2020
7cf1ae2
layout done
zshafiqu Jan 9, 2020
13a9aea
homepage up and running
zshafiqu Jan 9, 2020
b6ba13c
report page added
zshafiqu Jan 9, 2020
8d135e8
api page added
zshafiqu Jan 9, 2020
1af87c7
pages added
zshafiqu Jan 9, 2020
c2dd9eb
all pages except report added and working
zshafiqu Jan 9, 2020
275195f
navbar updates
zshafiqu Jan 9, 2020
c73dd89
routes work
zshafiqu Jan 9, 2020
51dedf2
active toggling working
zshafiqu Jan 9, 2020
cee7cff
footer update
zshafiqu Jan 9, 2020
720e929
add header
zshafiqu Jan 9, 2020
04d14cf
remove border from toggler
zshafiqu Jan 9, 2020
fcc08c5
add err page
zshafiqu Jan 9, 2020
06c0564
process report added. no idea if it works
zshafiqu Jan 9, 2020
8fae522
form process added
zshafiqu Jan 9, 2020
d5324ea
more updates
zshafiqu Jan 9, 2020
b8b8b63
begin code cleanup, starting with layout
zshafiqu Jan 9, 2020
627fb0b
cleanup about page
zshafiqu Jan 9, 2020
2f154d1
api page cleanup
zshafiqu Jan 9, 2020
3b6a041
err page cleanup
zshafiqu Jan 9, 2020
5aa2849
done with homepage cleanup
zshafiqu Jan 9, 2020
851be21
versions page cleanup
zshafiqu Jan 9, 2020
07bd53f
update report
zshafiqu Jan 9, 2020
ba96d77
process_report cleaned up
zshafiqu Jan 9, 2020
9ed1a43
server cleanup and update routes
zshafiqu Jan 9, 2020
153ce8a
route updates
zshafiqu Jan 9, 2020
bd0a7f1
api updates, going to test now
zshafiqu Jan 9, 2020
3f907b4
server update
zshafiqu Jan 9, 2020
780c9f3
update report page again
zshafiqu Jan 9, 2020
4171138
remove padding on header
zshafiqu Jan 9, 2020
e0e996c
more updates
zshafiqu Jan 9, 2020
d06acb2
remove design exports
zshafiqu Jan 9, 2020
72c1a9e
mv designs > webservices
zshafiqu Jan 9, 2020
680acc2
add social media to about page
zshafiqu Jan 9, 2020
e1157f6
more updates
zshafiqu Jan 9, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
process_report cleaned up
  • Loading branch information
zshafiqu committed Jan 9, 2020
commit ba96d77da1c57c598d57f04d3923677de10d5f12
344 changes: 175 additions & 169 deletions templates/process_report.html
Original file line number Diff line number Diff line change
@@ -1,184 +1,190 @@
{% extends "layout.html" %}
{% block content %}
<main class="page contact-us-page">
<!-- BEGIN SECTION 1 -->
<section class="clean-block clean-form dark" style="padding-bottom: 10px;">
<div class="container">
<div class="pulse animated block-heading" style="padding-top: 50px;">
<h2 class="text-info">Requested Report</h2>
</div>
<!-- BEGIN SECTION 1 -->
<section class="clean-block clean-form dark" style="padding-bottom: 10px;">
<div class="container">
<div class="pulse animated block-heading" style="padding-top: 50px;">
<h2 class="text-info">Requested Report</h2>
</div>
</div>
</section>
<!-- END SECTION 1 -->
<!-- BEGIN SECTION 2 -->
<section class="clean-block clean-form" style="padding-top: 50px;">
<div class="container">
<!-- ROW 1 -->
<div class="row" style="padding-bottom: 15px;">
<div class="col align-self-center col-md-5">
<!-- CARD 1 -->
<form class="text-center shadow">
<h2>
{{data['Results'][0]['Year']}}
{{data['Results'][0]['Make']}}
{{data['Results'][0]['Model']}}
</h2>
<hr>
{% set temp = data['Results'][0]['Styles'][0] %}
<img class="img-fluid" src="{{ data['Results'][0]['Images'][temp] }}">
<hr>
<h6><strong>Available Style(s): </strong>
{% for style in data['Results'][0]['Styles'] %}
{% if style == data['Results'][0]['Styles'][-1] %}
{{ style }}
{% else %}
{{ style }},
{% endif %}
{% endfor %}
</h6>
</form>
<!-- CARD 1 -->
</div>
</section>
<!-- END SECTION 1 -->
<!-- BEGIN SECTION 2 -->
<section class="clean-block clean-form" style="padding-top: 50px;">
<div class="container">


<div class="row" style="padding-bottom: 15px;">
<div class="col align-self-center col-md-5">
<!-- CARD 1 -->
<form class="text-center shadow">
<h2>
{{data['Results'][0]['Year']}}
{{data['Results'][0]['Make']}}
{{data['Results'][0]['Model']}}
</h2>
<hr>
{% set temp = data['Results'][0]['Styles'][0] %}
<img class="img-fluid" src="{{ data['Results'][0]['Images'][temp] }}">
<hr>
<h6><strong>Available Style(s): </strong>
{% for style in data['Results'][0]['Styles'] %}
{% if style == data['Results'][0]['Styles'][-1] %}
{{ style }}
{% else %}
{{ style }},
{% endif %}
{% endfor %}
</h6>
</form>
<!-- CARD 1 -->
</div>
<div class="col align-self-center col-md-7">
<!-- CARD 2 -->
<form class="text-center shadow" style="max-width: 630px;">
<h2>Styles &amp; Trims</h2>
<hr>
<div role="tablist" id="accordion-1">

<div class="col align-self-center col-md-7">
<!-- CARD 2 -->
<form class="text-center shadow" style="max-width: 630px;">
<h2>Styles &amp; Trims</h2>
<hr>
<div role="tablist" id="accordion-1">
<!-- For each body style in Trims object -->
{% for style in data['Results'][0]['Trims'] %}
<div class="card">
<!-- HEADER -->
<div class="card-header border rounded-0" role="tab">
<h5 class="mb-0">
<!-- Need to set hypertext ref based on style so dropdown knows where to point to -->
<a class="collapsed" data-toggle="collapse" aria-expanded="false" aria-controls="accordion-1" href="#{{style}}" style="color: rgb(0,0,0);">{{style}}</a>
</h5>
</div>
<!-- HEADER -->
<div class="collapse item-1" id="{{style}}" role="tabpanel">
<div class="card-body">
<!-- START TABLE -->
<div class="table-responsive">
<table class="table">
<!-- START HEAD -->
<!-- Set data for table HEADER based on available attributes -->
<thead>
<tr>
<!-- Leftmost is trim by default -->
<th>Trim</th>
<!-- For each trim -->
{% for trim in data['Results'][0]['Trims'][style] %}
<!-- For each available attribute in the first instance of this style (hence the loop.first exit condition )-->
{% for attribute in data['Results'][0]['Trims'][style][trim] if loop.first %}
<!-- Add this attribute to our header -->
<th>{{attribute}}</th>
<!-- End inner loop -->
{% endfor %}
<!-- End outer loop -->
{% endfor %}
</tr>
</thead>
<!-- END HEAD -->

<!-- For each body style in Trims object -->
{% for style in data['Results'][0]['Trims'] %}
<div class="card">
<div class="card-header border rounded-0" role="tab">
<h5 class="mb-0">
<!-- Need to set hypertext ref based on style so dropdown knows where to point to -->
<a class="collapsed" data-toggle="collapse" aria-expanded="false" aria-controls="accordion-1" href="#{{style}}" style="color: rgb(0,0,0);">{{style}}</a>
</h5>
</div>
<div class="collapse item-1" id="{{style}}" role="tabpanel">
<div class="card-body">
<div class="table-responsive">
<table class="table">
<!-- START HEAD -->
<!-- Set data for table HEADER based on available attributes -->
<thead>
<tr>
<!-- Leftmost is trim by default -->
<th>Trim</th>
<!-- For each trim -->
{% for trim in data['Results'][0]['Trims'][style] %}
<!-- For each available attribute in the first instance of this style (hence the loop.first exit condition )-->
{% for attribute in data['Results'][0]['Trims'][style][trim] if loop.first %}
<!-- Add this attribute to our header -->
<th>{{attribute}}</th>
<!-- End inner loop -->
{% endfor %}
<!-- End outer loop -->
{% endfor %}
</tr>
</thead>
<!-- END HEAD -->
<!-- START BODY -->
<tbody>
<!-- For each trim in each style -->
{% for trim in data['Results'][0]['Trims'][style] %}
<tr>
<!-- Leftmost is the trim by default -->
<td>{{trim}}</td>
<!-- For each attribute, get its value -->
{% for value in data['Results'][0]['Trims'][style][trim] %}
<td>{{data['Results'][0]['Trims'][style][trim][value]}}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
<!-- END BODY -->
</table>
</div>
</div>
</div>
</div>
<!-- START BODY -->
<tbody>
<!-- For each trim in each style -->
{% for trim in data['Results'][0]['Trims'][style] %}
<tr>
<!-- Leftmost is the trim by default -->
<td>{{trim}}</td>
<!-- For each attribute, get its value -->
{% for value in data['Results'][0]['Trims'][style][trim] %}
<td>{{data['Results'][0]['Trims'][style][trim][value]}}</td>
{% endfor %}
</tr>
{% endfor %}
</div>
<hr>
</form>
<!-- END CARD 2 -->
</div>
</div>
<!-- END ROW -->
</tbody>
<!-- END BODY -->

<div class="row" style="padding-bottom: 15px;">
<div class="col">
<form class="text-center shadow" style="max-width: 100%;">
<h2 style="padding-bottom: 15px;">Recalls for the
{{data['Results'][0]['Year']}}
{{data['Results'][0]['Make']}}
{{data['Results'][0]['Model']}}
</h2>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Recall Number</th>
<th>Report Date</th>
<th>Summary</th>
<th>Consequence</th>
<th>Remedy</th>
</tr>
</thead>
<tbody>
{% for info in recalls['Results']|reverse %}
<tr id="{{loop.index}}">
<td><small>{{ info['NHTSACampaignNumber'] }}</small></td>
<td><small>{{ info['ReportReceivedDate']|strftime }}</small></td>
<td><small>{{ info['Summary']|capitalize }}</small></td>
<td><small>{{ info['Conequence']|capitalize }}</small></td>
<td><small>{{ info['Remedy']|capitalize }}</small></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</form>
</table>
</div>
<!-- END TABLE -->
</div>
</div>
</div>
{% endfor %}
</div>
<hr>
</form>
<!-- END CARD 2 -->
</div>
</div>
<!-- END ROW 1 -->

<!-- BEGIN ROW 2 -->
<div class="row" style="padding-bottom: 15px;">
<div class="col">
<form class="text-center shadow" style="max-width: 100%;">
<h2 style="padding-bottom: 15px;">Recalls for the
{{data['Results'][0]['Year']}}
{{data['Results'][0]['Make']}}
{{data['Results'][0]['Model']}}
</h2>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Recall Number</th>
<th>Report Date</th>
<th>Summary</th>
<th>Consequence</th>
<th>Remedy</th>
</tr>
</thead>
<tbody>
{% for info in recalls['Results']|reverse %}
<tr id="{{loop.index}}">
<td><small>{{ info['NHTSACampaignNumber'] }}</small></td>
<td><small>{{ info['ReportReceivedDate']|strftime }}</small></td>
<td><small>{{ info['Summary']|capitalize }}</small></td>
<td><small>{{ info['Conequence']|capitalize }}</small></td>
<td><small>{{ info['Remedy']|capitalize }}</small></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</form>
</div>
</div>
<!-- END ROW 2 -->


<div class="row" style="padding-bottom: 15px;">
<div class="col">
<form class="text-center shadow" style="max-width: 100%;">
<h2 style="padding-bottom: 15px;">Consumer complaints for the
{{data['Results'][0]['Year']}}
{{data['Results'][0]['Make']}}
{{data['Results'][0]['Model']}}
</h2>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Incident Date</th>
<th>Affected Component</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
{% for info in complaints['Results']|reverse %}
<tr id="{{loop.index}}">
<td><small>{{ info['DateComplaintFiled']|strftime }}</small></td>
<td><small>{{ info['Component']|capitalize }}</small></td>
<td><small>{{ info['Summary']|capitalize }}</small></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</form>
</div>
<!-- BEGIN ROW 3 -->
<div class="row" style="padding-bottom: 15px;">
<div class="col">
<form class="text-center shadow" style="max-width: 100%;">
<h2 style="padding-bottom: 15px;">Consumer complaints for the
{{data['Results'][0]['Year']}}
{{data['Results'][0]['Make']}}
{{data['Results'][0]['Model']}}
</h2>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Incident Date</th>
<th>Affected Component</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
{% for info in complaints['Results']|reverse %}
<tr id="{{loop.index}}">
<td><small>{{ info['DateComplaintFiled']|strftime }}</small></td>
<td><small>{{ info['Component']|capitalize }}</small></td>
<td><small>{{ info['Summary']|capitalize }}</small></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</form>
</div>
</section>
</div>
<!-- END ROW 3 -->

</div>
</section>
</main>
{% endblock content %}