basic map
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 4m54s
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 4m54s
This commit is contained in:
parent
06cfac4b8e
commit
0698373151
4 changed files with 9 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
pub mod index;
|
||||
pub mod route;
|
||||
pub mod stop;
|
||||
pub mod map;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ async fn main() -> ::anyhow::Result<()> {
|
|||
.service(controllers::stop::search_stops_html)
|
||||
.service(controllers::stop::get_stop_table_html)
|
||||
.service(controllers::index::get_index_html)
|
||||
.service(controllers::map::get_map_element_html)
|
||||
.service(actix_files::Files::new("/assets", "./assets"))
|
||||
})
|
||||
.bind(("0.0.0.0", 8080))?
|
||||
|
|
|
|||
|
|
@ -99,6 +99,12 @@ pub struct StopSearchResults {
|
|||
pub results: Vec<Stop>
|
||||
}
|
||||
|
||||
#[derive(askama::Template)]
|
||||
#[template(path = "map.html")]
|
||||
pub struct MapTemplate {
|
||||
pub locations: Vec<(f64,f64, String)>
|
||||
}
|
||||
|
||||
pub fn build_timetables(directions: Vec<Direction>, trips: Vec<Trip>) -> Vec<TimetableDirection> {
|
||||
let mut results = Vec::new();
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ window.onload = function () {
|
|||
<a class="nav-link" href="/">[ Home ]</a>
|
||||
<a class="nav-link" href="/routes">[ Routes ]</a>
|
||||
<a class="nav-link" href="/stops">[ Stops ]</a>
|
||||
<a class="nav-link" href="/map">[ Map ]</a>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue