Skip to content

Commit dca83d9

Browse files
authored
Merge pull request #56 from ut01/fix/student-resources-and-navigation
Add student resources and fix responsive navigation
2 parents fe384bf + 0bf1e23 commit dca83d9

17 files changed

Lines changed: 818 additions & 76 deletions

.github/workflows/check-site.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Check site
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build-and-browser-tests:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 15
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: '3.3'
20+
bundler-cache: true
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: '22'
24+
cache: npm
25+
- run: npm ci
26+
- run: npx playwright install --with-deps chromium webkit
27+
- run: npm test

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.jekyll-cache
2+
.sass-cache/
23
_site/
34
.DS_Store
45
Thumbs.db
@@ -11,8 +12,6 @@ dist/dist
1112
*/file_analysis.txt
1213

1314
# Ruby/Jekyll files
14-
Gemfile
15-
Gemfile.lock
1615
.bundle/
1716
vendor/
1817

@@ -192,3 +191,5 @@ cython_debug/
192191
.pypirc
193192
.gstack/
194193
.worktrees/
194+
test-results/
195+
playwright-report/

CONTRIBUTING.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Contributing / 参与贡献
2+
3+
Help UT Austin students find reliable resources in English and Chinese. Small, focused changes are welcome: report a broken link, improve search keywords, verify a guide, or fix a navigation bug.
4+
5+
欢迎通过修复链接、补充中英文关键词、核对指南或修复导航问题,帮助 UT Austin 学生找到可靠资源。每次贡献聚焦一个明确问题即可。
6+
7+
## Choose a task / 选择任务
8+
9+
- **Resource links:** Check one category in `_data/links.yml` for outdated URLs and use the current official destination. Explain any required login in your PR.
10+
- **Search:** Add useful English and Chinese synonyms to an existing entry's `keywords`, then verify that both find the intended card.
11+
- **Guides:** Compare one page in `guides/` with the official sources it cites. Correct outdated steps and update its source dates when you verify it.
12+
- **Navigation:** Reproduce a problem at a narrow mobile width and a desktop width; include the steps, browser, and expected result in an issue or PR.
13+
14+
- **资源链接:** 检查 `_data/links.yml` 中一个分类的链接,替换为当前官方地址;在 PR 中说明是否需要登录。
15+
- **搜索:** 为现有条目的 `keywords` 补充实用的中英文同义词,并确认两种语言都能找到对应卡片。
16+
- **指南:** 对照官方来源核对 `guides/` 中的一篇指南,修正过时步骤,并按实际核对时间更新来源日期。
17+
- **导航:** 分别在手机和桌面宽度下复现问题,在 issue 或 PR 中提供步骤、浏览器和预期结果。
18+
19+
Check [existing issues](https://github.com/ut01/ut01.github.io/issues) for related work. If you want to maintain a category or help review contributions, comment on [#26](https://github.com/ut01/ut01.github.io/issues/26) with your preferred area, relevant experience, and availability. A maintainer coordinates access separately; a fork is enough to submit your first PR.
20+
21+
先查看[已有 issue](https://github.com/ut01/ut01.github.io/issues),了解是否有人在处理相关问题。若想长期维护某个分类或参与审核,请在 [#26](https://github.com/ut01/ut01.github.io/issues/26) 中说明意向领域、相关经验和可投入的时间。仓库权限由维护者另行协调;首次提交 PR 只需 Fork。
22+
23+
## Edit the right file / 修改对应文件
24+
25+
Homepage resource cards come from `_data/links.yml`. Add a link under an existing section's `links:` list using the same indentation:
26+
27+
首页资源卡片来自 `_data/links.yml`。请按现有缩进,在对应分类的 `links:` 列表中添加条目:
28+
29+
```yaml
30+
- url: "https://global.utexas.edu/"
31+
title: "Texas Global"
32+
icon: "fad fa-link"
33+
keywords: "Texas Global, international, global engagement, 国际事务, 国际交流"
34+
```
35+
36+
This is a format example; check whether the resource already exists before adding it. Keep titles short and keywords relevant. Reuse an icon already displayed successfully on the site. New categories need both `section` and `section_zh`.
37+
38+
以上为格式示例;添加前请确认资源尚未收录。标题应简短,关键词应相关。优先复用网站已正常显示的图标。新分类应同时填写 `section` 和 `section_zh`。
39+
40+
Use `index.html` for homepage layout, `assets/navigation.js` for homepage interactions, and `_includes/block-grid.html` for card markup. Edit shared styles in `style.scss` and `_sass/*.scss`; Jekyll generates `style.css` from these sources. Guides are standalone HTML files in `guides/`; follow the bilingual titles, official-source disclaimer, source footer, and return link described in [CLAUDE.md](CLAUDE.md). Register new guides in `_data/links.yml` with English and Chinese keywords.
41+
42+
首页布局位于 `index.html`,首页交互位于 `assets/navigation.js`,卡片模板位于 `_includes/block-grid.html`。共用样式请修改 `style.scss` 和 `_sass/*.scss`,Jekyll 会从这些源文件生成 `style.css`。指南是 `guides/` 中的独立 HTML 文件;请遵循 [CLAUDE.md](CLAUDE.md) 中的双语标题、官方来源免责声明、来源页脚和返回链接规范。新增指南还需在 `_data/links.yml` 中登记,并提供中英文关键词。
43+
44+
## Validate your change / 检查修改
45+
46+
With Ruby 3.3 and Bundler installed, run these commands from the repository root and open http://127.0.0.1:4000:
47+
48+
安装 Ruby 3.3 和 Bundler 后,在仓库根目录运行以下命令,然后打开 http://127.0.0.1:4000:
49+
50+
```bash
51+
bundle install
52+
bundle exec jekyll serve --host 127.0.0.1 --port 4000
53+
```
54+
55+
A plain HTTP server does not render the homepage's Liquid templates or YAML-driven cards. Open the rendered site to verify link and search changes. For a build without a preview server, run `bundle exec jekyll build`.
56+
57+
普通 HTTP 服务器无法渲染首页 Liquid 模板和 YAML 生成的卡片;检查链接和搜索时请使用生成后的网站。仅构建、不启动预览服务器时,运行 `bundle exec jekyll build`。
58+
59+
For navigation or interaction changes, run the browser regression suite with Node.js and npm installed:
60+
61+
修改导航或交互后,请在安装 Node.js 和 npm 的环境中运行浏览器回归检查:
62+
63+
```bash
64+
npm ci
65+
npx playwright install chromium webkit
66+
npm test
67+
```
68+
69+
The suite starts its own Jekyll server on port 4173 and runs Chromium and WebKit checks. Install the Ruby dependencies above first and leave that port available.
70+
71+
检查会自动在 4173 端口启动 Jekyll 服务器,并运行 Chromium 和 WebKit 检查。请先安装上述 Ruby 依赖,并确保该端口可用。
72+
73+
Before submitting:
74+
75+
1. Run `git diff --check` and review your diff for unrelated changes.
76+
2. Open each changed destination and check that it serves the intended task. If it requires an EID or another account, report how far you could verify it.
77+
3. Search for the changed card with at least one English and one Chinese keyword.
78+
4. Check the relevant page at mobile and desktop widths. For interaction changes, also check keyboard access and any open/close behavior.
79+
5. Include screenshots for visible layout changes and describe any checks you could not run.
80+
81+
提交前:
82+
83+
1. 运行 `git diff --check`,检查差异中是否包含无关修改。
84+
2. 打开每个修改后的目标地址,确认其用途正确。如需 EID 或其他账号,说明实际验证到哪一步。
85+
3. 分别使用至少一个英文词和一个中文词搜索对应卡片。
86+
4. 检查相关页面在手机及桌面宽度下的表现。交互修改还应检查键盘操作及打开、关闭行为。
87+
5. 布局变化请附截图,并说明无法执行的检查。
88+
89+
## Submit and review / 提交与审核
90+
91+
Fork the repository, create a branch, and open a PR against `main`. State the problem, what changed, the related issue, and your validation results. Link official sources for factual guide updates. Keep private application details, credentials, and student records out of issues, screenshots, and commits.
92+
93+
Fork 仓库、创建分支,并向 `main` 提交 PR。说明问题、修改内容、相关 issue 和检查结果。指南中的事实更新请附官方来源链接。Issue、截图和提交中请勿包含私人申请信息、凭据或学生记录。
94+
95+
A maintainer reviews correctness, bilingual discoverability, accessibility, and scope before merging. Respond to review comments in the same PR. Repository invitations and external promotion require separate coordination; a documentation or code change does not complete those actions.
96+
97+
维护者会在合并前检查内容准确性、中英文搜索、无障碍操作及修改范围。请在同一 PR 中回应审核意见。协作者邀请和外部推广需另行协调,文档或代码修改本身不代表这些事项已经完成。

Gemfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
source "https://rubygems.org"
2+
3+
# Match GitHub Pages' Jekyll and Sass versions for local previews.
4+
gem "jekyll", "3.10.0"
5+
gem "jekyll-sass-converter", "1.5.2"
6+
gem "jekyll-sitemap", "1.4.0"
7+
gem "webrick", "~> 1.9"

Gemfile.lock

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.9.0)
5+
public_suffix (>= 2.0.2, < 8.0)
6+
colorator (1.1.0)
7+
concurrent-ruby (1.3.8)
8+
csv (3.3.6)
9+
em-websocket (0.5.3)
10+
eventmachine (>= 0.12.9)
11+
http_parser.rb (~> 0)
12+
eventmachine (1.2.7)
13+
ffi (1.17.4)
14+
ffi (1.17.4-aarch64-linux-gnu)
15+
ffi (1.17.4-aarch64-linux-musl)
16+
ffi (1.17.4-arm-linux-gnu)
17+
ffi (1.17.4-arm-linux-musl)
18+
ffi (1.17.4-arm64-darwin)
19+
ffi (1.17.4-x86-linux-gnu)
20+
ffi (1.17.4-x86-linux-musl)
21+
ffi (1.17.4-x86_64-darwin)
22+
ffi (1.17.4-x86_64-linux-gnu)
23+
ffi (1.17.4-x86_64-linux-musl)
24+
forwardable-extended (2.6.0)
25+
http_parser.rb (0.8.1)
26+
i18n (1.15.2)
27+
concurrent-ruby (~> 1.0)
28+
jekyll (3.10.0)
29+
addressable (~> 2.4)
30+
colorator (~> 1.0)
31+
csv (~> 3.0)
32+
em-websocket (~> 0.5)
33+
i18n (>= 0.7, < 2)
34+
jekyll-sass-converter (~> 1.0)
35+
jekyll-watch (~> 2.0)
36+
kramdown (>= 1.17, < 3)
37+
liquid (~> 4.0)
38+
mercenary (~> 0.3.3)
39+
pathutil (~> 0.9)
40+
rouge (>= 1.7, < 4)
41+
safe_yaml (~> 1.0)
42+
webrick (>= 1.0)
43+
jekyll-sass-converter (1.5.2)
44+
sass (~> 3.4)
45+
jekyll-sitemap (1.4.0)
46+
jekyll (>= 3.7, < 5.0)
47+
jekyll-watch (2.2.1)
48+
listen (~> 3.0)
49+
kramdown (2.5.2)
50+
rexml (>= 3.4.4)
51+
liquid (4.0.4)
52+
listen (3.10.0)
53+
logger
54+
rb-fsevent (~> 0.10, >= 0.10.3)
55+
rb-inotify (~> 0.9, >= 0.9.10)
56+
logger (1.7.0)
57+
mercenary (0.3.6)
58+
pathutil (0.16.2)
59+
forwardable-extended (~> 2.6)
60+
public_suffix (7.0.5)
61+
rb-fsevent (0.11.2)
62+
rb-inotify (0.11.1)
63+
ffi (~> 1.0)
64+
rexml (3.4.4)
65+
rouge (3.30.0)
66+
safe_yaml (1.0.5)
67+
sass (3.7.4)
68+
sass-listen (~> 4.0.0)
69+
sass-listen (4.0.0)
70+
rb-fsevent (~> 0.9, >= 0.9.4)
71+
rb-inotify (~> 0.9, >= 0.9.7)
72+
webrick (1.9.2)
73+
74+
PLATFORMS
75+
aarch64-linux-gnu
76+
aarch64-linux-musl
77+
arm-linux-gnu
78+
arm-linux-musl
79+
arm64-darwin
80+
ruby
81+
x86-linux-gnu
82+
x86-linux-musl
83+
x86_64-darwin
84+
x86_64-linux-gnu
85+
x86_64-linux-musl
86+
87+
DEPENDENCIES
88+
jekyll (= 3.10.0)
89+
jekyll-sass-converter (= 1.5.2)
90+
jekyll-sitemap (= 1.4.0)
91+
webrick (~> 1.9)
92+
93+
CHECKSUMS
94+
addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af
95+
colorator (1.1.0) sha256=e2f85daf57af47d740db2a32191d1bdfb0f6503a0dfbc8327d0c9154d5ddfc38
96+
concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
97+
csv (3.3.6) sha256=aba61e7e507a66f03d45cb1f3c4b6359861c3504038b422962875dce099e4456
98+
em-websocket (0.5.3) sha256=f56a92bde4e6cb879256d58ee31f124181f68f8887bd14d53d5d9a292758c6a8
99+
eventmachine (1.2.7) sha256=994016e42aa041477ba9cff45cbe50de2047f25dd418eba003e84f0d16560972
100+
ffi (1.17.4) sha256=bcd1642e06f0d16fc9e09ac6d49c3a7298b9789bcb58127302f934e437d60acf
101+
ffi (1.17.4-aarch64-linux-gnu) sha256=b208f06f91ffd8f5e1193da3cae3d2ccfc27fc36fba577baf698d26d91c080df
102+
ffi (1.17.4-aarch64-linux-musl) sha256=9286b7a615f2676245283aef0a0a3b475ae3aae2bb5448baace630bb77b91f39
103+
ffi (1.17.4-arm-linux-gnu) sha256=d6dbddf7cb77bf955411af5f187a65b8cd378cb003c15c05697f5feee1cb1564
104+
ffi (1.17.4-arm-linux-musl) sha256=9d4838ded0465bef6e2426935f6bcc93134b6616785a84ffd2a3d82bc3cf6f95
105+
ffi (1.17.4-arm64-darwin) sha256=19071aaf1419251b0a46852abf960e77330a3b334d13a4ab51d58b31a937001b
106+
ffi (1.17.4-x86-linux-gnu) sha256=38e150df5f4ca555e25beca4090823ae09657bceded154e3c52f8631c1ed72cf
107+
ffi (1.17.4-x86-linux-musl) sha256=fbeec0fc7c795bcf86f623bb18d31ea1820f7bd580e1703a3d3740d527437809
108+
ffi (1.17.4-x86_64-darwin) sha256=aa70390523cf3235096cf64962b709b4cfbd5c082a2cb2ae714eb0fe2ccda496
109+
ffi (1.17.4-x86_64-linux-gnu) sha256=9d3db14c2eae074b382fa9c083fe95aec6e0a1451da249eab096c34002bc752d
110+
ffi (1.17.4-x86_64-linux-musl) sha256=3fdf9888483de005f8ef8d1cf2d3b20d86626af206cbf780f6a6a12439a9c49e
111+
forwardable-extended (2.6.0) sha256=1bec948c469bbddfadeb3bd90eb8c85f6e627a412a3e852acfd7eaedbac3ec97
112+
http_parser.rb (0.8.1) sha256=9ae8df145b39aa5398b2f90090d651c67bd8e2ebfe4507c966579f641e11097a
113+
i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
114+
jekyll (3.10.0) sha256=c4213b761dc7dfe7d499eb742d0476a02d8503e440c2610e19774ee7f0db8d90
115+
jekyll-sass-converter (1.5.2) sha256=53773669e414dc3bb070113befacb808576025a28cfa4a4accc682e90a9c1101
116+
jekyll-sitemap (1.4.0) sha256=0de08c5debc185ea5a8f980e1025c7cd3f8e0c35c8b6ef592f15c46235cf4218
117+
jekyll-watch (2.2.1) sha256=bc44ed43f5e0a552836245a54dbff3ea7421ecc2856707e8a1ee203a8387a7e1
118+
kramdown (2.5.2) sha256=1ba542204c66b6f9111ff00dcc26075b95b220b07f2905d8261740c82f7f02fa
119+
liquid (4.0.4) sha256=4fcfebb1a045e47918388dbb7a0925e7c3893e58d2bd6c3b3c73ec17a2d8fdb3
120+
listen (3.10.0) sha256=c6e182db62143aeccc2e1960033bebe7445309c7272061979bb098d03760c9d2
121+
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
122+
mercenary (0.3.6) sha256=2a084b18f5692c86a633e185d5311ba6d11fc46c802eb414ae05368178078a82
123+
pathutil (0.16.2) sha256=e43b74365631cab4f6d5e4228f812927efc9cb2c71e62976edcb252ee948d589
124+
public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
125+
rb-fsevent (0.11.2) sha256=43900b972e7301d6570f64b850a5aa67833ee7d87b458ee92805d56b7318aefe
126+
rb-inotify (0.11.1) sha256=a0a700441239b0ff18eb65e3866236cd78613d6b9f78fea1f9ac47a85e47be6e
127+
rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
128+
rouge (3.30.0) sha256=a3d353222aa72e49e2c86726c0bcfd719f82592f57d494474655f48e669eceb6
129+
safe_yaml (1.0.5) sha256=a6ac2d64b7eb027bdeeca1851fe7e7af0d668e133e8a88066a0c6f7087d9f848
130+
sass (3.7.4) sha256=808b0d39053aa69068df939e24671fe84fd5a9d3314486e1a1457d0934a4255d
131+
sass-listen (4.0.0) sha256=ae9dcb76dd3e234329e5ba6e213f48e532c5a3e7b0b4d8a87f13aaca0cc18377
132+
webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
133+
134+
BUNDLED WITH
135+
4.0.9

README.CN.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![English](https://img.shields.io/badge/lang-English-blue.svg)](README.md)
44
[![中文](https://img.shields.io/badge/lang-中文-brown.svg)](README.CN.md)
5-
[![Website](https://img.shields.io/website?url=https%3A//ut01.github.io)](https://ut01.github.io/) [![GitHub stars](https://img.shields.io/github/stars/ut01/ut01.github.io)](https://github.com/ut01/ut01.github.io) [![GitHub forks](https://img.shields.io/github/forks/ut01/ut01.github.io)](https://github.com/ut01/ut01.github.io/fork) [![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![Discuss on Reddit](https://img.shields.io/badge/Discuss_on-Reddit-orange?logo=reddit)](https://www.reddit.com/r/UTAustin/comments/1loxvxu/new_to_ut_austin_tired_of_clicking_through_5/)
5+
[![Website](https://img.shields.io/website?url=https%3A//ut01.github.io)](https://ut01.github.io/) [![GitHub stars](https://img.shields.io/github/stars/ut01/ut01.github.io)](https://github.com/ut01/ut01.github.io) [![GitHub forks](https://img.shields.io/github/forks/ut01/ut01.github.io)](https://github.com/ut01/ut01.github.io/fork) [![CC BY-SA 4.0 License](https://img.shields.io/badge/License-CC_BY--SA_4.0-blue.svg)](LICENSE) [![Discuss on Reddit](https://img.shields.io/badge/Discuss_on-Reddit-orange?logo=reddit)](https://www.reddit.com/r/UTAustin/comments/1loxvxu/new_to_ut_austin_tired_of_clicking_through_5/)
66

77
> **UT Austin学生的一站式导航** 🤘
88
> 快速访问重要的大学链接,无需深度导航
@@ -91,27 +91,21 @@ ut01.github.io prioritizes user privacy while providing analytics insights for s
9191

9292
## 参与贡献
9393

94-
想要添加链接或修复问题?欢迎贡献!
94+
想要添加链接或修复问题?请阅读[中英双语贡献指南](CONTRIBUTING.md),了解本地预览、检查方法和 PR 审核要求。
9595

96-
### 快速步骤
97-
1. **Fork** 此仓库
98-
2. **编辑** `index.html` 按照模板:
99-
```html
100-
<!-- 添加新链接 -->
101-
{% include block-grid.html url="https://example.utexas.edu" title="服务名称" icon="fad fa-icon-name" %}
102-
```
103-
3. **提交** pull request
96+
1. Fork 此仓库并创建分支。
97+
2.`_data/links.yml` 的对应分类中添加或修改链接。标题保持简短,搜索关键词包含中英文;图标可沿用网站中已正常显示的图标。
98+
3. 预览网站,检查目标页面以及中英文搜索,再提交 PR,附上相关 issue 和检查结果。
10499

105-
### 查找图标
106-
[FontAwesome](https://fontawesome.com/search) 搜索图标并更新 `icon` 属性。
100+
适合初次贡献的任务包括修复一个失效链接、补充一个中文搜索词,或根据官方来源核对一篇指南。若想长期维护某个分类或帮助审核更新,请在[协作者招募 issue(#26](https://github.com/ut01/ut01.github.io/issues/26) 中说明你的兴趣和可投入的时间。通过 Fork 提交贡献无需仓库写入权限。
107101

108102
---
109103

110104
## 技术详情
111105

112106
- **框架**: Jekyll 配自定义模板
113107
- **托管**: GitHub Pages
114-
- **许可证**: MIT (修改自 [SmartHypercube/ustclife](https://github.com/SmartHypercube/ustclife))
108+
- **许可证**: [CC BY-SA 4.0](LICENSE)修改自 [SmartHypercube/ustclife](https://github.com/SmartHypercube/ustclife)
115109
- **维护**: 学生驱动的更新
116110

117111
---
@@ -132,4 +126,4 @@ ut01.github.io prioritizes user privacy while providing analytics insights for s
132126

133127
*将ut01.github.io设为主页,再也不用到处找UT链接了!*
134128

135-
</div>
129+
</div>

0 commit comments

Comments
 (0)