Skip to content

Commit

Permalink
refactor: Location & gitignore rule for html templates
Browse files Browse the repository at this point in the history
  • Loading branch information
r-leyshon committed Jul 4, 2024
1 parent 084fbef commit 9285ef9
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ docs/tutorials/outputs/
!tests/data/report/html_template.html

# exception for html templates
!src/assess_gtfs/data/gtfs/report/html_templates/evaluation_template.html
!src/assess_gtfs/data/gtfs/report/html_templates/stops_template.html
!src/assess_gtfs/data/gtfs/report/html_templates/summary_template.html
!src/assess_gtfs/data/report/html_templates/evaluation_template.html
!src/assess_gtfs/data/report/html_templates/stops_template.html
!src/assess_gtfs/data/report/html_templates/summary_template.html

### Project structure ###
data/*
Expand Down
117 changes: 117 additions & 0 deletions src/assess_gtfs/data/report/html_templates/evaluation_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>GTFS Report [date]</title>
</head>

<body>
<div class="side-menu">
<div class="side-menu-title">
<h1>GTFS Report</h1>
</div>
<ul>
<li><a class="option" href="index.html">Data Evaluation</a> </li>
<li><a class="option" href="stops.html">Stops</a> </li>
<li><a class="option" href="summaries.html">Data Summaries</a> </li>
</ul>
</div>
<div class="container">
<div class="header">
<div class="header-title">
<span>GTFS Data Evaluation</span>
</div>
</div>
<div class="content" style="margin-top: 10vh;">
<div class="analysis-cont">
<span class="analysis-title">GTFS Feed Info</span>
<hr>
<div class="summary" style="width:100%;margin:10px;">
<div>
<dd>Publisher Name:</dd>
<dt>[name_placeholder]</dt>
</div>
<div>
<dd>Publisher URL:</dd>
<dt><a href=[url_placeholder]>[url_placeholder]</a></dt>
</div>
<div>
<dd>Feed Language:</dd>
<dt>[lang_placeholder]</dt>
</div>
<div>
<dd>Feed Start Date:</dd>
<dt>[start_placeholder]</dt>
</div>
<div>
<dd>Feed End Data:</dd>
<dt>[end_placeholder]</dt>
</div>
<div>
<dd>Feed Version:</dd>
<dt>[version_placeholder]</dt>
</div>
</div>
</div>
</div>
<div class="content">
<div class="analysis-cont">
<span class="analysis-title">GTFS Feed Counts</span>
<hr>
<div class="summary" style="width:100%;margin:10px;">
<div>
<dd>Agencies:</dd>
<dt>[agency_placeholder]</dt>
</div>
<div>
<dd>Routes:</dd>
<dt>[routes_placeholder]</dt>
</div>
<div>
<dd>Trips:</dd>
<dt>[trips_placeholder]</dt>
</div>
<div>
<dd>Stops:</dd>
<dt>[stops_placeholder]</dt>
</div>
<div>
<dd>Shapes:</dd>
<dt>[shapes_placeholder]</dt>
</div>
</div>
</div>
</div>
<div class="content">
<div class="analysis-cont">
<span class="analysis-title">[eval_title_3]</span>
<hr>
<div class="summary" style="width:100%;margin:10px;">
[eval_placeholder_3]
</div>
</div>
</div>
<div class="content">
<div class="analysis-cont">
<span class="analysis-title">[eval_title_1]</span>
<hr>
<div style="width:100%;margin:10px;">
[eval_placeholder_1]
</div>
</div>
</div>
<div class="content">
<div class="analysis-cont">
<span class="analysis-title">[eval_title_2]</span>
<hr>
<div style="width:100%;margin:10px">
[eval_placeholder_2]
</div>
</div>
</div>
</div>
</body>
42 changes: 42 additions & 0 deletions src/assess_gtfs/data/report/html_templates/stops_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>GTFS Report - [date]</title>
</head>

<body>
<div class="side-menu">
<div class="side-menu-title">
<h1>GTFS Report</h1>
</div>
<ul>
<li><a class="option" href="index.html">Data Evaluation</a> </li>
<li><a class="option" href="stops.html">Stops</a> </li>
<li><a class="option" href="summaries.html">Data Summaries</a> </li>
</ul>
</div>
<div class="container">
<div class="header">
<div class="header-title">
<span>GTFS Trips and Routes Summaries</span>
</div>
</div>
<div class="content" style="margin-top: 10vh;">
<div class="analysis-cont">
<span class="analysis-title">[stops_title_1]</span>
<iframe src="[stops_placeholder_1]" style="width:100%;margin:10px;min-height: 80vh;"></iframe>
</div>
</div>
<div class="content">
<div class="analysis-cont">
<span class="analysis-title">[stops_title_2]</span>
<iframe src="[stops_placeholder_2]" style="width:100%;margin:10px;min-height: 80vh;"></iframe>
</div>
</div>
</div>
</body>
46 changes: 46 additions & 0 deletions src/assess_gtfs/data/report/html_templates/summary_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>GTFS Report - [date]</title>
</head>

<body>
<div class="side-menu">
<div class="side-menu-title">
<h1>GTFS Report</h1>
</div>
<ul>
<li><a class="option" href="index.html">Data Evaluation</a> </li>
<li><a class="option" href="stops.html">Stops</a> </li>
<li><a class="option" href="summaries.html">Data Summaries</a> </li>
</ul>
</div>
<div class="container">
<div class="header">
<div class="header-title">
<span>GTFS Trips and Routes Summaries</span>
</div>
</div>
<div class="content" style="margin-top: 10vh;">
<div class="analysis-cont">
<span class="analysis-title">[plotly_title_1]</span>
<div style="width:100%;margin:10px;">
[plotly_placeholder_1]
</div>
</div>
</div>
<div class="content">
<div class="analysis-cont">
<span class="analysis-title">[plotly_title_2]</span>
<div style="width:100%;margin:10px;">
[plotly_placeholder_2]
</div>
</div>
</div>
</div>
</body>

0 comments on commit 9285ef9

Please sign in to comment.