Skip to content

Commit d48b02c

Browse files
committed
Front page redesign: OpenStreetMap lake map of the isthmus as the hero, tool screenshots on colored panels, Archivo type
1 parent 5f81e00 commit d48b02c

13 files changed

Lines changed: 381 additions & 56 deletions

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ The front page of [madisonstudents.com](https://madisonstudents.com): free tools
99
| Food: every place to eat, ratings from six platforms | [food.madisonstudents.com](https://food.madisonstudents.com) | [madison-food-map](https://github.com/WEBGRS/madison-food-map) |
1010
| Campus guide: everyday places around campus, with sources | [guide.madisonstudents.com](https://guide.madisonstudents.com) | [madison-campus-guide](https://github.com/WEBGRS/madison-campus-guide) |
1111

12-
One static `index.html` (English / 中文, follows the browser language), served by GitHub Pages. `feedback.js` is the shared feedback widget.
12+
One static page (English / 中文, follows the browser language), served by GitHub Pages. Edit `src/index.template.html` and run `python src/build.py` to write `index.html`; the hero map is drawn from OpenStreetMap lake outlines (`src/data`, projected by `src/lakes.py`). Card pictures in `img/` are screenshots of each tool. `feedback.js` is the shared feedback widget.
1313

1414
Independent student project, not affiliated with the University of Wisconsin–Madison.

‎img/courses.webp‎

34.5 KB
Loading

‎img/food.webp‎

59.2 KB
Loading

‎img/guide.webp‎

68 KB
Loading

‎img/housing.webp‎

77.7 KB
Loading

‎index.html‎

Lines changed: 124 additions & 55 deletions
Large diffs are not rendered by default.

‎src/build.py‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Build index.html from src/index.template.html and the projected lake outlines in src/lakes.json
2+
import json
3+
from pathlib import Path
4+
5+
SRC = Path(__file__).resolve().parent
6+
ROOT = SRC.parent
7+
8+
lk = json.loads((SRC / "lakes.json").read_text(encoding="utf-8"))
9+
(bx, by), (cx, cy) = lk["bascom"], lk["capitol"]
10+
vals = {
11+
"MENDOTA": lk["Lake_Mendota"], "MONONA": lk["Lake_Monona"], "WINGRA": lk["Lake_Wingra"],
12+
"MEN_X": lk["mendota_label"][0], "MEN_Y": lk["mendota_label"][1],
13+
"MON_X": lk["monona_label"][0], "MON_Y": lk["monona_label"][1],
14+
"BAS_X": bx, "BAS_Y": by, "BAS_TX": bx, "BAS_TY": round(by + 26, 1),
15+
"PHONE_VB": f"{round(bx - 150)} 20 560 440", "CAP_X": cx, "CAP_Y": cy, "CAP_TX": round(cx + 14, 1), "CAP_TY": round(cy + 5, 1),
16+
}
17+
page = (SRC / "index.template.html").read_text(encoding="utf-8")
18+
for k, v in vals.items():
19+
page = page.replace("{{" + k + "}}", str(v))
20+
assert "{{" not in page, "unfilled placeholder"
21+
(ROOT / "index.html").write_text(page, encoding="utf-8")
22+
print("index.html", len(page.encode("utf-8")) // 1024, "KB")

‎src/data/Lake_Mendota.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"place_id":373491393,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright","osm_type":"relation","osm_id":3361036,"lat":"43.1145529","lon":"-89.4159927","class":"water","type":"lake","place_rank":20,"importance":0.36366628930239936,"addresstype":"lake","name":"Lake Mendota","display_name":"Lake Mendota, Madison, Town of Westport, Dane County, Wisconsin, United States","boundingbox":["43.0769544","43.1521046","-89.4838262","-89.3671153"],"geojson":{"type":"Polygon","coordinates":[[[-89.4838262,43.0937328],[-89.4832844,43.093345],[-89.4821541,43.0938202],[-89.4796564,43.0906064],[-89.4790618,43.0906517],[-89.4744219,43.087996],[-89.4734805,43.0879468],[-89.472215,43.0867173],[-89.4725719,43.0863333],[-89.4722084,43.0851012],[-89.4693479,43.0827644],[-89.4645228,43.0809398],[-89.4614335,43.0809291],[-89.4575786,43.0814209],[-89.4552834,43.0821986],[-89.4522813,43.0835312],[-89.4482493,43.0860383],[-89.4445232,43.0878133],[-89.4400762,43.0890691],[-89.4370151,43.0907439],[-89.4333144,43.0918941],[-89.4323044,43.092689],[-89.4310117,43.0927578],[-89.4276796,43.0893608],[-89.4243556,43.0873482],[-89.4221136,43.0871861],[-89.419059,43.0875032],[-89.4152803,43.0898807],[-89.4151527,43.0896677],[-89.4161507,43.088341],[-89.4192538,43.0871938],[-89.4209757,43.0860211],[-89.423482,43.0853353],[-89.4248349,43.0855429],[-89.4262271,43.0848994],[-89.4267731,43.0833908],[-89.426367,43.0814735],[-89.4232348,43.0788019],[-89.4214124,43.0779727],[-89.4201102,43.0785918],[-89.4200794,43.0793955],[-89.4188419,43.0794898],[-89.415924,43.0784312],[-89.4107182,43.078772],[-89.4070831,43.0777333],[-89.3973359,43.076976],[-89.3938067,43.0778419],[-89.3881427,43.0803122],[-89.3877596,43.0807692],[-89.3877534,43.0804423],[-89.3860104,43.0806488],[-89.38328,43.0815256],[-89.3813972,43.0830632],[-89.3785782,43.0862445],[-89.3765205,43.0875786],[-89.3732234,43.0934287],[-89.3724057,43.0934341],[-89.3710414,43.0942137],[-89.3709445,43.0949209],[-89.372404,43.0952933],[-89.3722844,43.0962219],[-89.3721087,43.095309],[-89.3702931,43.0950008],[-89.3695186,43.0960251],[-89.3695364,43.0971829],[-89.3706012,43.0974352],[-89.3704424,43.0996926],[-89.369387,43.1011929],[-89.3687959,43.1033035],[-89.3684281,43.1035085],[-89.3680841,43.1031331],[-89.3677756,43.1032746],[-89.3671311,43.1047066],[-89.3677717,43.105105],[-89.3680801,43.1049087],[-89.3679615,43.1045998],[-89.3688755,43.1046756],[-89.3706043,43.1100344],[-89.371348,43.1111984],[-89.3726686,43.1123099],[-89.3754056,43.1131025],[-89.3785928,43.1127041],[-89.3805501,43.1129524],[-89.3830908,43.1146221],[-89.3831236,43.1158655],[-89.3816476,43.1178394],[-89.3796255,43.1189335],[-89.3796148,43.1197166],[-89.3775763,43.1220346],[-89.3763664,43.1224462],[-89.375877,43.12306],[-89.375813,43.123817],[-89.3761993,43.1247154],[-89.3767672,43.1253172],[-89.3771248,43.1250576],[-89.3770022,43.1247626],[-89.377242,43.1249844],[-89.376796,43.1254454],[-89.3780986,43.1269796],[-89.3779682,43.1272364],[-89.3783389,43.1270654],[-89.381446,43.129155],[-89.3836889,43.1295766],[-89.3874928,43.1294237],[-89.394739,43.1283],[-89.3977218,43.1273272],[-89.3980316,43.1264062],[-89.398658,43.127099],[-89.3999471,43.1267356],[-89.4002652,43.1262132],[-89.400154,43.125198],[-89.399499,43.124644],[-89.3999619,43.1235358],[-89.400502,43.123109],[-89.401649,43.122948],[-89.402825,43.123562],[-89.4030549,43.1245528],[-89.403843,43.125235],[-89.403101,43.125476],[-89.403097,43.125229],[-89.402216,43.125047],[-89.40086,43.125786],[-89.400617,43.126463],[-89.4013675,43.1278013],[-89.403725,43.127929],[-89.406278,43.128718],[-89.408113,43.129523],[-89.4096935,43.1306572],[-89.409871,43.131264],[-89.408981,43.132136],[-89.4092557,43.132988],[-89.408544,43.1335],[-89.408162,43.134302],[-89.409204,43.136546],[-89.4091082,43.1369465],[-89.4095513,43.1372209],[-89.409551,43.137918],[-89.408642,43.137942],[-89.4094345,43.1382133],[-89.408927,43.139321],[-89.4095355,43.1405732],[-89.4125954,43.1422807],[-89.4107632,43.1428694],[-89.4095413,43.1439658],[-89.4076353,43.1444909],[-89.4065874,43.1455007],[-89.4066032,43.1462018],[-89.4061722,43.1461326],[-89.406362,43.1475693],[-89.406884,43.1482848],[-89.4064648,43.1484868],[-89.4076353,43.1488705],[-89.4075401,43.1494312],[-89.40634,43.1510599],[-89.4042109,43.1508367],[-89.4032449,43.1500822],[-89.4023257,43.150116],[-89.4024545,43.1505397],[-89.4035716,43.151088],[-89.4043288,43.1510525],[-89.4043944,43.1514618],[-89.4053436,43.152029],[-89.4076075,43.1521046],[-89.4089125,43.1518592],[-89.4093621,43.1515359],[-89.4094741,43.1509707],[-89.4088702,43.1493636],[-89.4088077,43.1481176],[-89.4082625,43.1471742],[-89.408613,43.1468064],[-89.4106329,43.146513],[-89.4111123,43.1468495],[-89.4113524,43.146846],[-89.4112563,43.1466043],[-89.411674,43.1469161],[-89.4133502,43.1471183],[-89.4120473,43.1467483],[-89.4119511,43.1464676],[-89.4124081,43.1464568],[-89.4122208,43.1462361],[-89.4118031,43.1464919],[-89.4114766,43.1461836],[-89.4117925,43.1459518],[-89.4132558,43.1462495],[-89.4144987,43.1468909],[-89.4144835,43.1464352],[-89.4137665,43.1461582],[-89.4161738,43.1462235],[-89.4174504,43.1457673],[-89.4174672,43.1467263],[-89.4175751,43.1457628],[-89.4178933,43.1455106],[-89.4196765,43.1452297],[-89.4223556,43.1437127],[-89.4224763,43.1424185],[-89.4239005,43.142501],[-89.4247979,43.1418895],[-89.4253344,43.1411467],[-89.4248386,43.1403865],[-89.4265575,43.138919],[-89.4285299,43.1362225],[-89.4307739,43.1348612],[-89.4320919,43.1336521],[-89.432151,43.1330335],[-89.4325855,43.1325912],[-89.4323483,43.1322382],[-89.4327182,43.1323403],[-89.4331353,43.1318944],[-89.4330048,43.1313088],[-89.4324167,43.131427],[-89.4332571,43.1311003],[-89.4335819,43.1296623],[-89.4346115,43.1276267],[-89.4390637,43.1230143],[-89.4417022,43.1189457],[-89.4455691,43.1165014],[-89.4474608,43.1156743],[-89.4497025,43.1140025],[-89.4508793,43.1127477],[-89.4526462,43.1099647],[-89.4544864,43.1092444],[-89.460048,43.1098652],[-89.4647729,43.1088928],[-89.4670844,43.10755],[-89.4683348,43.1073074],[-89.4692057,43.1080135],[-89.4680842,43.109244],[-89.4690461,43.108742],[-89.4693857,43.1081138],[-89.4702737,43.1085652],[-89.47183,43.1084851],[-89.4749539,43.1074746],[-89.478614,43.105027],[-89.482554,43.1049386],[-89.4832774,43.1040697],[-89.4836023,43.1030635],[-89.4837407,43.1005487],[-89.4834924,43.0980848],[-89.4822091,43.0940603],[-89.4834024,43.0940893],[-89.4838262,43.0937328]],[[-89.4177207,43.1363139],[-89.4176346,43.1364348],[-89.4175785,43.1363301],[-89.4177207,43.1363139]],[[-89.4119254,43.1468216],[-89.4119227,43.1468843],[-89.4118798,43.146851],[-89.4119254,43.1468216]],[[-89.4114989,43.1459938],[-89.4114694,43.1460604],[-89.4114345,43.146031],[-89.4114989,43.1459938]]]}}]

‎src/data/Lake_Monona.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"place_id":372093514,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright","osm_type":"relation","osm_id":1997948,"lat":"43.0677790","lon":"-89.3642252","class":"water","type":"lake","place_rank":20,"importance":0.2954185985350713,"addresstype":"lake","name":"Lake Monona","display_name":"Lake Monona, Madison, Dane County, Wisconsin, 53715, United States","boundingbox":["43.0450759","43.0904793","-89.3995757","-89.3249720"],"geojson":{"type":"Polygon","coordinates":[[[-89.3995757,43.0599784],[-89.3978215,43.0574924],[-89.397228,43.0571034],[-89.392131,43.0569953],[-89.3890908,43.0572318],[-89.3886043,43.0575987],[-89.3882181,43.0591226],[-89.3878044,43.0583229],[-89.385126,43.0583591],[-89.384839,43.0586845],[-89.3857719,43.0597372],[-89.3852652,43.0599368],[-89.383712,43.0583826],[-89.3809623,43.0582169],[-89.377433,43.0555319],[-89.3750858,43.0548335],[-89.3725712,43.0530819],[-89.3705344,43.0524537],[-89.3692748,43.0526515],[-89.3679757,43.0522924],[-89.3679684,43.0516037],[-89.3692571,43.0509159],[-89.3701314,43.0499981],[-89.3701638,43.0492399],[-89.3710435,43.0472594],[-89.370791,43.0467854],[-89.3679929,43.0450856],[-89.3666212,43.0451762],[-89.3650956,43.045763],[-89.3634537,43.047715],[-89.3620232,43.0483023],[-89.3586281,43.0474404],[-89.3573777,43.0477471],[-89.3564391,43.0482882],[-89.3552767,43.0498174],[-89.3539147,43.0502457],[-89.3507759,43.0501638],[-89.3485711,43.0508531],[-89.3443212,43.0504217],[-89.3426552,43.0511302],[-89.3414764,43.0512428],[-89.3404905,43.0520828],[-89.3393393,43.0524982],[-89.3387836,43.052363],[-89.3388616,43.0520913],[-89.338324,43.0517556],[-89.3377115,43.051826],[-89.338101,43.054053],[-89.3378772,43.0558064],[-89.3387007,43.0570203],[-89.339893,43.057571],[-89.339625,43.058417],[-89.3401493,43.0576471],[-89.3420342,43.0567855],[-89.3454647,43.0566123],[-89.3456614,43.0586832],[-89.3453455,43.0597374],[-89.3456353,43.0599016],[-89.3458731,43.0595565],[-89.3457851,43.0566606],[-89.349289,43.056168],[-89.350676,43.056904],[-89.351233,43.057573],[-89.3516047,43.0589888],[-89.3513154,43.0601329],[-89.3489835,43.0649025],[-89.346827,43.066483],[-89.344886,43.067099],[-89.34329,43.068129],[-89.340266,43.071648],[-89.338893,43.07208],[-89.337078,43.07189],[-89.334607,43.07255],[-89.3333117,43.0723986],[-89.3332403,43.0717646],[-89.3329681,43.0717177],[-89.3331333,43.072339],[-89.331111,43.073159],[-89.3301291,43.0739204],[-89.327741,43.077646],[-89.325343,43.078708],[-89.324986,43.0797],[-89.325135,43.08104],[-89.3261805,43.0836474],[-89.3281035,43.0861851],[-89.3345308,43.0900324],[-89.3348277,43.0900981],[-89.334738,43.0897063],[-89.3349249,43.090125],[-89.3369602,43.0904793],[-89.3411741,43.0898192],[-89.345073,43.0898105],[-89.3484021,43.0890334],[-89.3503923,43.0882185],[-89.3519827,43.0866852],[-89.3541512,43.085346],[-89.3551392,43.0840124],[-89.3584335,43.0819449],[-89.3606712,43.0811124],[-89.3634645,43.0793667],[-89.3658541,43.0783717],[-89.3684829,43.077475],[-89.3710513,43.0770843],[-89.376309,43.0746519],[-89.3793045,43.0717539],[-89.3836347,43.0687419],[-89.3855524,43.0666069],[-89.3867902,43.0666748],[-89.3877117,43.0662895],[-89.3894037,43.0639445],[-89.3916877,43.0631868],[-89.3943583,43.0641594],[-89.395882,43.0642512],[-89.3970368,43.0638646],[-89.3976369,43.0630634],[-89.3990428,43.0629711],[-89.3995199,43.0624614],[-89.3995757,43.0599784]],[[-89.3892708,43.0636788],[-89.3875878,43.0620666],[-89.3869528,43.0648625],[-89.3863542,43.0647663],[-89.3867867,43.0622779],[-89.3864859,43.061376],[-89.3855662,43.0602223],[-89.3860173,43.0600089],[-89.3873479,43.0614811],[-89.387879,43.0605825],[-89.3876553,43.0618561],[-89.3892708,43.0636788]],[[-89.3881791,43.0594786],[-89.3879805,43.0602558],[-89.387818,43.0602572],[-89.3879029,43.0595249],[-89.3881791,43.0594786]],[[-89.3868927,43.0652262],[-89.3865929,43.0661933],[-89.3859433,43.0660113],[-89.3861214,43.0652726],[-89.3868927,43.0652262]],[[-89.3487688,43.0560094],[-89.3463977,43.0564758],[-89.343589,43.056314],[-89.3442841,43.0553783],[-89.3453623,43.0555155],[-89.348066,43.0552882],[-89.3487688,43.0560094]],[[-89.347846,43.055111],[-89.3451602,43.0553231],[-89.3442838,43.0550919],[-89.3448523,43.0544257],[-89.346512,43.054258],[-89.347846,43.055111]],[[-89.3386892,43.0529804],[-89.3387838,43.0530542],[-89.3386602,43.0529945],[-89.3386892,43.0529804]],[[-89.338802,43.0544474],[-89.3382012,43.0550156],[-89.33821,43.0553739],[-89.338073,43.0547896],[-89.3383337,43.0538663],[-89.3386695,43.0538275],[-89.338802,43.0544474]],[[-89.3386682,43.0529542],[-89.3381712,43.0526629],[-89.3380667,43.0525362],[-89.338103,43.0525167],[-89.3386682,43.0529542]]]}}]

‎src/data/Lake_Wingra.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"place_id":368151119,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright","osm_type":"relation","osm_id":4231143,"lat":"43.0537568","lon":"-89.4197689","class":"water","type":"lake","place_rank":20,"importance":0.18929199030239088,"addresstype":"lake","name":"Lake Wingra","display_name":"Lake Wingra, Bowens Addition, Madison, Dane County, Wisconsin, United States","boundingbox":["43.0483206","43.0592264","-89.4318224","-89.4061005"],"geojson":{"type":"Polygon","coordinates":[[[-89.4318224,43.0512246],[-89.4308525,43.0491987],[-89.431522,43.0483206],[-89.4304148,43.0490482],[-89.4288956,43.0486593],[-89.4269129,43.0488663],[-89.4248143,43.0499457],[-89.4227002,43.050491],[-89.4217201,43.0502809],[-89.4215114,43.0499187],[-89.4183882,43.0498189],[-89.415455,43.0504496],[-89.411795,43.0500975],[-89.4109369,43.0504166],[-89.4094892,43.0525856],[-89.4096008,43.0547995],[-89.408588,43.0572015],[-89.4061005,43.057745],[-89.4076936,43.0582515],[-89.4104081,43.0575425],[-89.4119676,43.0580979],[-89.4142483,43.0578711],[-89.4163935,43.0581758],[-89.417158,43.0586636],[-89.4170782,43.0591921],[-89.4175907,43.0591798],[-89.4183899,43.0585624],[-89.4181369,43.0574309],[-89.4192079,43.0572392],[-89.420833,43.056236],[-89.423873,43.0553169],[-89.424553,43.0554748],[-89.4275236,43.0550002],[-89.4297195,43.0540469],[-89.4315487,43.0521126],[-89.4318224,43.0512246]]]}}]

0 commit comments

Comments
 (0)