-
Notifications
You must be signed in to change notification settings - Fork 0
/
modules_info.py
66 lines (50 loc) · 1.78 KB
/
modules_info.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from constants import *
css_class_ref = "media_image responsive"
inner_div_class_ref = "media__body"
outer_div_class_ref = "media"
img_css_class_ref = "media_image responsive"
assets_base_path = f"{codebase_homepage}assets/"
assets_homepage_path = f"{codebase_homepage}assets/homepage/"
assets_map_symbols_path = f"{codebase_homepage}assets/map_symbols/"
modules_metadata = {
"webmap": {
"url": f"{node_homepage_url}map.html",
"img_src": f"{assets_homepage_path}oswm_webmap_img.png",
"text": "Webmap",
},
"routing": {
"url": "https://kauevestena.github.io/opensidewalkmap_beta/routing.html",
"img_src": f"{assets_homepage_path}oswm_route_img.png",
"text": "Optimized Routing",
},
"dashboard": {
"url": f"{node_homepage_url}statistics/index.html",
"img_src": f"{assets_homepage_path}oswm_statistics_img.png",
"text": "Dashboard",
},
"data_quality": {
"url": f"{node_homepage_url}quality_check/oswm_qc_main.html",
"img_src": f"{assets_homepage_path}oswm_quality_check_img.png",
"text": "Data Quality Tool",
},
}
modules_as_str = ""
for modulename in modules_metadata:
# mapping for short sake:
url = modules_metadata[modulename]["url"]
img_src = modules_metadata[modulename]["img_src"]
text = modules_metadata[modulename]["text"]
modules_as_str += f"""
<div class="{outer_div_class_ref}">
<a href="{url}">
<img title="OSWM {modulename}"
src="{img_src}"
alt="OSWM {modulename} image" class="{img_css_class_ref}">
<!-- THX: https://jsfiddle.net/Venugopal/e0u4sow1/1/ -->
<div class="{inner_div_class_ref}">
<h1>{text}</h1>
</div>
</a>
</div>
<p></p>
"""