Skip to content

Commit d184489

Browse files
committed
Front page: add News (news.madisonstudents.com) as a wide card
1 parent d48b02c commit d184489

4 files changed

Lines changed: 35 additions & 8 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The front page of [madisonstudents.com](https://madisonstudents.com): free tools
88
| Housing: rentals near campus on one map | [housing.madisonstudents.com](https://housing.madisonstudents.com) | [madison-rentals](https://github.com/WEBGRS/madison-rentals) |
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) |
11+
| News: daily UW–Madison and Madison news, rated and summarized in Chinese | [news.madisonstudents.com](https://news.madisonstudents.com) | [uw-digest](https://github.com/WEBGRS/uw-digest) |
1112

1213
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.
1314

‎img/news.webp‎

51.3 KB
Loading

‎index.html‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1">
66
<title>Madison Students</title>
7-
<meta name="description" content="Free tools for students in Madison: course grades and planning, rentals near campus, every place to eat, and a guide to everyday places around campus.">
7+
<meta name="description" content="Free tools for students in Madison: course grades and planning, rentals near campus, every place to eat, a guide to everyday places around campus, and daily campus news in Chinese.">
88
<meta name="theme-color" content="#eef3ef">
99
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%231f5d80'/%3E%3Cpath d='M0 20 C8 17 14 22 20 19 S28 16 32 18 V32 H0Z' fill='%23a9cde0'/%3E%3Ctext x='16' y='17' font-family='Arial,sans-serif' font-weight='800' font-size='14' fill='white' text-anchor='middle'%3EMS%3C/text%3E%3C/svg%3E">
1010
<link rel="preconnect" href="https://fonts.googleapis.com">
@@ -14,21 +14,21 @@
1414
:root {
1515
--land: #eef3ef; --lake: #a9cde0; --shore: #2f6f93; --ink: #0f2a3a; --ink-2: #2e4a5a; --pin: #0f2a3a;
1616
--chip: #ffffff; --chip-line: #c9d7dd;
17-
--courses: #e9a23b; --housing: #3d8dba; --food: #6ba547; --guide: #c95a63;
17+
--courses: #e9a23b; --housing: #3d8dba; --food: #6ba547; --guide: #c95a63; --news: #5b6fb3;
1818
color-scheme: light;
1919
}
2020
@media (prefers-color-scheme: dark) {
2121
:root:not([data-theme="light"]) {
2222
--land: #0e1a21; --lake: #17384c; --shore: #5aa2c9; --ink: #e9f2f6; --ink-2: #b9ccd6; --pin: #e9f2f6;
2323
--chip: #15262f; --chip-line: #2a4350;
24-
--courses: #c7862a; --housing: #2f7aa5; --food: #548c35; --guide: #a9475a;
24+
--courses: #c7862a; --housing: #2f7aa5; --food: #548c35; --guide: #a9475a; --news: #4a5b9c;
2525
color-scheme: dark;
2626
}
2727
}
2828
:root[data-theme="dark"] {
2929
--land: #0e1a21; --lake: #17384c; --shore: #5aa2c9; --ink: #e9f2f6; --ink-2: #b9ccd6; --pin: #e9f2f6;
3030
--chip: #15262f; --chip-line: #2a4350;
31-
--courses: #c7862a; --housing: #2f7aa5; --food: #548c35; --guide: #a9475a;
31+
--courses: #c7862a; --housing: #2f7aa5; --food: #548c35; --guide: #a9475a; --news: #4a5b9c;
3232
color-scheme: dark;
3333
}
3434
* { box-sizing: border-box; }
@@ -79,11 +79,18 @@
7979
.t-housing { --accent: var(--housing); }
8080
.t-food { --accent: var(--food); }
8181
.t-guide { --accent: var(--guide); }
82+
.t-news { --accent: var(--news); }
83+
@media (min-width: 761px) {
84+
.tool.wide { grid-column: 1 / -1; }
85+
.tool.wide a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; align-items: center; }
86+
.tool.wide h2 { margin-top: 0; }
87+
}
8288
.tool h2 {
8389
margin: 18px 0 6px; font-size: 30px; line-height: 1.1; font-weight: 750; letter-spacing: -.01em;
8490
font-variation-settings: "wdth" 118;
8591
}
8692
.tool p { margin: 0; max-width: 46ch; color: var(--ink-2); }
93+
.txt { display: block; }
8794
footer .wrap { padding-top: 52px; padding-bottom: 96px; font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 18px; }
8895
footer a { color: inherit; }
8996

@@ -149,6 +156,11 @@ <h2 data-i18n="food">Food</h2>
149156
<h2 data-i18n="guide">Campus guide</h2>
150157
<p data-i18n="guideD">Groceries, campus offices, clinics, gyms, banks and transit, each explained with sources.</p>
151158
</a></li>
159+
<li class="tool t-news wide"><a href="https://news.madisonstudents.com/">
160+
<span class="shot"><img src="img/news.webp" width="960" height="600" alt="" decoding="async"></span>
161+
<span class="txt"><h2 data-i18n="news">News</h2>
162+
<p data-i18n="newsD">UW–Madison and Madison news from fourteen official and local sources, checked every morning, rated for students and summarized in Chinese.</p></span>
163+
</a></li>
152164
</ul>
153165
</div></main>
154166

@@ -165,6 +177,7 @@ <h2 data-i18n="guide">Campus guide</h2>
165177
housing: "租房", housingD: "校园周边的出租房,汇总房东官网和学校租房平台,放在一张地图上。",
166178
food: "吃饭", foodD: "麦迪逊所有能吃饭的地方,一张地图看完六个平台的评分,以及哪些外卖平台能点。",
167179
guide: "校园指南", guideD: "超市、学校办事处、诊所、健身房、银行、交通,每个地方都有说明和信息来源。",
180+
news: "新闻", newsD: "每天早上汇总 14 个官方和本地来源的威大与麦迪逊新闻,按对学生的重要性打分,用中文摘要。",
168181
note: "学生个人项目,与威斯康星大学麦迪逊分校无官方关系。", osm: "湖岸线", contrib: "贡献者"
169182
};
170183
var EN = {};

‎src/index.template.html‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1">
66
<title>Madison Students</title>
7-
<meta name="description" content="Free tools for students in Madison: course grades and planning, rentals near campus, every place to eat, and a guide to everyday places around campus.">
7+
<meta name="description" content="Free tools for students in Madison: course grades and planning, rentals near campus, every place to eat, a guide to everyday places around campus, and daily campus news in Chinese.">
88
<meta name="theme-color" content="#eef3ef">
99
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%231f5d80'/%3E%3Cpath d='M0 20 C8 17 14 22 20 19 S28 16 32 18 V32 H0Z' fill='%23a9cde0'/%3E%3Ctext x='16' y='17' font-family='Arial,sans-serif' font-weight='800' font-size='14' fill='white' text-anchor='middle'%3EMS%3C/text%3E%3C/svg%3E">
1010
<link rel="preconnect" href="https://fonts.googleapis.com">
@@ -14,21 +14,21 @@
1414
:root {
1515
--land: #eef3ef; --lake: #a9cde0; --shore: #2f6f93; --ink: #0f2a3a; --ink-2: #2e4a5a; --pin: #0f2a3a;
1616
--chip: #ffffff; --chip-line: #c9d7dd;
17-
--courses: #e9a23b; --housing: #3d8dba; --food: #6ba547; --guide: #c95a63;
17+
--courses: #e9a23b; --housing: #3d8dba; --food: #6ba547; --guide: #c95a63; --news: #5b6fb3;
1818
color-scheme: light;
1919
}
2020
@media (prefers-color-scheme: dark) {
2121
:root:not([data-theme="light"]) {
2222
--land: #0e1a21; --lake: #17384c; --shore: #5aa2c9; --ink: #e9f2f6; --ink-2: #b9ccd6; --pin: #e9f2f6;
2323
--chip: #15262f; --chip-line: #2a4350;
24-
--courses: #c7862a; --housing: #2f7aa5; --food: #548c35; --guide: #a9475a;
24+
--courses: #c7862a; --housing: #2f7aa5; --food: #548c35; --guide: #a9475a; --news: #4a5b9c;
2525
color-scheme: dark;
2626
}
2727
}
2828
:root[data-theme="dark"] {
2929
--land: #0e1a21; --lake: #17384c; --shore: #5aa2c9; --ink: #e9f2f6; --ink-2: #b9ccd6; --pin: #e9f2f6;
3030
--chip: #15262f; --chip-line: #2a4350;
31-
--courses: #c7862a; --housing: #2f7aa5; --food: #548c35; --guide: #a9475a;
31+
--courses: #c7862a; --housing: #2f7aa5; --food: #548c35; --guide: #a9475a; --news: #4a5b9c;
3232
color-scheme: dark;
3333
}
3434
* { box-sizing: border-box; }
@@ -79,11 +79,18 @@
7979
.t-housing { --accent: var(--housing); }
8080
.t-food { --accent: var(--food); }
8181
.t-guide { --accent: var(--guide); }
82+
.t-news { --accent: var(--news); }
83+
@media (min-width: 761px) {
84+
.tool.wide { grid-column: 1 / -1; }
85+
.tool.wide a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; align-items: center; }
86+
.tool.wide h2 { margin-top: 0; }
87+
}
8288
.tool h2 {
8389
margin: 18px 0 6px; font-size: 30px; line-height: 1.1; font-weight: 750; letter-spacing: -.01em;
8490
font-variation-settings: "wdth" 118;
8591
}
8692
.tool p { margin: 0; max-width: 46ch; color: var(--ink-2); }
93+
.txt { display: block; }
8794
footer .wrap { padding-top: 52px; padding-bottom: 96px; font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 18px; }
8895
footer a { color: inherit; }
8996

@@ -149,6 +156,11 @@ <h2 data-i18n="food">Food</h2>
149156
<h2 data-i18n="guide">Campus guide</h2>
150157
<p data-i18n="guideD">Groceries, campus offices, clinics, gyms, banks and transit, each explained with sources.</p>
151158
</a></li>
159+
<li class="tool t-news wide"><a href="https://news.madisonstudents.com/">
160+
<span class="shot"><img src="img/news.webp" width="960" height="600" alt="" decoding="async"></span>
161+
<span class="txt"><h2 data-i18n="news">News</h2>
162+
<p data-i18n="newsD">UW–Madison and Madison news from fourteen official and local sources, checked every morning, rated for students and summarized in Chinese.</p></span>
163+
</a></li>
152164
</ul>
153165
</div></main>
154166

@@ -165,6 +177,7 @@ <h2 data-i18n="guide">Campus guide</h2>
165177
housing: "租房", housingD: "校园周边的出租房,汇总房东官网和学校租房平台,放在一张地图上。",
166178
food: "吃饭", foodD: "麦迪逊所有能吃饭的地方,一张地图看完六个平台的评分,以及哪些外卖平台能点。",
167179
guide: "校园指南", guideD: "超市、学校办事处、诊所、健身房、银行、交通,每个地方都有说明和信息来源。",
180+
news: "新闻", newsD: "每天早上汇总 14 个官方和本地来源的威大与麦迪逊新闻,按对学生的重要性打分,用中文摘要。",
168181
note: "学生个人项目,与威斯康星大学麦迪逊分校无官方关系。", osm: "湖岸线", contrib: "贡献者"
169182
};
170183
var EN = {};

0 commit comments

Comments
 (0)