Skip to content

Commit c13326e

Browse files
committed
update projects
1 parent e2a4237 commit c13326e

29 files changed

+2872
-129
lines changed

assets/scripts/collapse-summary.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/* collapse-summary.js ------------------------------------------------
2+
Makes the “Read More / Read Less” button work on every
3+
.collapse-summary block. Works with Toha’s default HTML (which
4+
already carries the .collapsed class in the markup).
5+
--------------------------------------------------------------------- */
6+
7+
document.addEventListener('DOMContentLoaded', () => {
8+
document.querySelectorAll('.collapse-summary').forEach(container => {
9+
const text = container.querySelector('.summary-text');
10+
const button = container.querySelector('.toggle-summary');
11+
12+
/* --- 1. Measure full height (temporarily un-clamp if needed) ---- */
13+
const hadClass = text.classList.contains('collapsed');
14+
if (hadClass) text.classList.remove('collapsed');
15+
const fullHeight = text.scrollHeight;
16+
if (hadClass) text.classList.add('collapsed'); // put it back
17+
18+
/* --- 2. Compare with the clamped height ------------------------ */
19+
const clampedHeight = text.clientHeight;
20+
21+
if (fullHeight > clampedHeight) {
22+
button.style.display = 'inline-block';
23+
} else {
24+
/* Summary is ≤2 lines → leave it expanded, hide button */
25+
text.classList.remove('collapsed');
26+
return;
27+
}
28+
29+
// Helper: ask Filterizr (or any resize listener) to recalculate layout
30+
function relayoutGrid() {
31+
// 🔹 If Filterizr v2 is present -------------------------------
32+
if (window.Filterizr && typeof window.Filterizr.refresh === 'function') {
33+
// The container has class .container-filter in Toha
34+
const filterInstance = window.Filterizr.getInstance('.container-filter');
35+
filterInstance?.refresh(); // v2 API
36+
return;
37+
}
38+
39+
// 🔹 Fallback: broadcast a resize event -----------------------
40+
// Lots of libraries (Filterizr v1, Isotope, Masonry) listen for this
41+
window.dispatchEvent(new Event('resize'));
42+
}
43+
44+
45+
/* --- 3. Toggle on click ---------------------------------------- */
46+
button.addEventListener('click', () => {
47+
const collapsed = text.classList.toggle('collapsed');
48+
button.textContent = collapsed ? 'Read More' : 'Read Less';
49+
50+
/* wait for the CSS transition to finish before re-laying out */
51+
if (!collapsed) { // just expanded
52+
text.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
53+
}
54+
setTimeout(relayoutGrid, 0); // 20 ms transition buffer
55+
});
56+
});
57+
});
58+

assets/styles/override.scss

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/* ------------- Collapsible project summaries ------------------- */
2+
.collapse-summary .summary-text {
3+
position: relative;
4+
line-height: 1.5;
5+
overflow: hidden;
6+
transition: max-height .3s ease;
7+
}
8+
9+
/* CLAMPED state (Toha already adds .collapsed in the markup) */
10+
.collapse-summary .summary-text.collapsed {
11+
max-height: calc(1.5em * 5); /* exactly 5 lines */
12+
display: -webkit-box;
13+
-webkit-line-clamp: 5;
14+
-webkit-box-orient: vertical;
15+
}
16+
17+
/* EXPANDED state */
18+
.collapse-summary .summary-text:not(.collapsed) {
19+
max-height: 500px; /* tall enough for any summary */
20+
}
21+
22+
/* Fading mask at the bottom while clamped */
23+
.collapse-summary .summary-text.collapsed::after {
24+
content: '';
25+
position: absolute;
26+
left: 0; right: 0; bottom: 0;
27+
height: 1.5em; /* 1 line = 1.5 em */
28+
background: linear-gradient(transparent, white);
29+
pointer-events: none;
30+
}
31+
32+
/* Dark-mode override (Toha sets [data-dark-mode]) */
33+
[data-dark-mode] .collapse-summary .summary-text.collapsed::after {
34+
background: linear-gradient(transparent, var(--dark-context-bg));
35+
}
36+
37+
/* Button */
38+
.toggle-summary {
39+
padding: 0;
40+
font-size: .9em;
41+
color: #248aaa;
42+
margin-top: -.5em;
43+
cursor: pointer;
44+
}
45+
.toggle-summary:hover { text-decoration: underline; }
46+

data/en/sections/projects.yaml

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,28 @@ buttons:
1414
filter: "all"
1515
- name: Machine Learning
1616
filter: "Machine Learning"
17-
- name: Deep Learning
18-
filter: "Deep Learning"
19-
- name: Time Series
20-
filter: "Time Series"
17+
- name: Computer Vision
18+
filter: "Computer Vision"
19+
- name: Data Science
20+
filter: "Data Science"
2121
- name: Math
2222
filter: "Math"
2323

2424
# your projects
2525
projects:
26+
27+
- name: VocationalNYC
28+
url: "http://vocationalnyc-env.eba-uurzafst.us-east-1.elasticbeanstalk.com/"
29+
repo: https://github.com/gcivil-nyu-org/team1-wed-spring25
30+
timeline: "Jan. 2025 - May 2025"
31+
summary: "A full-stack platform that helps connect NYC residents with vocational programmes: Django-powered backend (PostgreSQL, WebSockets), Google Maps API for geo-search, AWS Elastic Beanstalk + Nginx deployment, and a Travis-driven CI/CD pipeline."
32+
tags: ["Web Development", "Django", "PostgreSQL", "AWS", "DevOps", "JavaScript", "Python"]
33+
34+
- name: Information Retrieval System & Retrieval-Augmented Generation
35+
timeline: "Sep. 2024 – Dec. 2024"
36+
summary: Built a search engine from scratch on MS MARCO—block-compressed inverted index, DAAT BM25 ranking—then refactored the pipeline with HNSW and advanced reordering to lift F1 by 25 % and systematically probe “lost-in-the-middle” bias in RAG workflows.
37+
tags: ["Deep learning", "Machine Learning", "Information Retrieval", "RAG", "Search Engine", "LLM", "Python"]
38+
2639
- name: Semantic Segmentation by Pixel-level Time Series Classification
2740
# logo: /images/sections/projects/STC.png
2841
# role: First author
@@ -46,28 +59,28 @@ projects:
4659
timeline: "Sep. 2023 - Nov. 2023"
4760
repo: https://github.com/yang-i-hu/TS_US_Candy/
4861
summary: The project focuses on forecasting the candy production in the U.S. based on the time series data over the past 45 years. Techniques such as Box-Cox transformation and differencing are applied to achieve stationarity, and the optimal SARIMA model is identified using ACF/PACF analysis and Maximum Likelihood Estimation. The model are further validated through comprehensive diagnostic tests and spectral analysis.
49-
tags: [ "Time Series", "Statistical Modeling", "R"]
50-
51-
- name: Digitizing Handwritten Data with OCR
52-
timeline: "Oct. 2023 - Nov. 2023"
53-
summary: Developed an automated workflow to scrape and process PDFs from a government website. Employed template matching and a custom-trained TrOCR model to extract handwritten data
54-
tags: [ "Deep learning", "Computer Vision", "Python"]
55-
62+
tags: [ "Data Science", "Time Series", "Statistical Modeling", "R"]
63+
5664
- name: Efficient Visual Attention Design for Image Super-Resolution
5765
logo: /images/sections/projects/evasr.png
5866
role: AAAI 2024 submission
5967
timeline: "Mar. 2022 - May 2023"
6068
repo: https://github.com/yang-i-hu/EvaSR
61-
summary: Replicated and analyzed 16 Super-Resolution models to assess key characteristics of success models. Collaboratively designed a CNN-based model that achieved state-of-the-art performance while reducing parameter count by 85% through the innovative use of efficient visual attention mechanisms.
62-
tags: [ "Deep learning", "Computer Vision", "Image Super Resolution", "Pytorch","Python"]
69+
summary: Replicated 16 SOTA SR models, discovered key architectural bottlenecks, and co-created EvaSR—an attention-augmented CNN that matches SOTA PSNR while slashing parameters by 85 % and FLOPs by 70 %.
70+
tags: [ "Deep learning", "Machine Learning", "Computer Vision", "Image Super Resolution", "Pytorch","Python"]
71+
72+
- name: Digitizing Handwritten Data with OCR
73+
timeline: "Oct. 2023 - Nov. 2023"
74+
summary: Automated the collection and parsing of thousands of government PDFs, then fine-tuned a TrOCR-base model with custom template-matching to hit 95 %+ character accuracy on challenging handwritten forms—reducing manual data entry time from hours to seconds.
75+
tags: [ "Deep learning","Machine Learning", "Computer Vision", "Python"]
6376

6477
- name: Soccer player transfer market value prediction
6578
logo: /images/sections/projects/evasr.png
6679
role: Machine Learning Course Project
6780
timeline: "Sep. 2022 - Jan. 2023"
6881
repo: https://github.com/yang-i-hu/TMP
69-
summary: The project focuses on predicting the market value of soccer players from the top 5 leagues in the transfer market based on their match performance statistics. Eight machine learning models were tuned, including KNN, Random Forest, and Gradient-boosted Trees. The results of these models are reported along with an Exploratory Data Analysis using R markdown.
70-
tags: [ "Machine Learning", "R"]
82+
summary: Engineered a rich feature set from top-5-league match stats and benchmarked eight machine learning models including KNN, Random Forest, and Gradient-boosted Trees. The results are reported along with an Exploratory Data Analysis using R markdown.
83+
tags: [ "Data Science", "Machine Learning", "R"]
7184

7285
- name: Exploring SO(3) through the lens of Orbifolds
7386
logo: /images/sections/projects/pillowcase.png
@@ -78,7 +91,6 @@ projects:
7891

7992
- name: Differential Geometry Calculator
8093
repo: https://github.com/yang-i-hu/Diff_Geo_Calculator/
81-
summary: A tiny script that may help deal with the tedious calculations in differential geometry.
94+
summary: Authored a lightweight Python tool that symbolically computes curvature, torsion, and Christoffel symbols—turning pages of manual tensor algebra into one-line scripts.
8295
tags: [ "Math", "Python"]
8396

84-

layouts/partials/cards/project.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
>
55
<div class="card mt-1">
66
<div class="card">
7-
<a href="{{ if .repo }}{{ .repo }}{{ else if .url }}{{ .url }}{{ else }}javascript:void(0){{ end }}" {{ if or .repo .url }}target="_blank" rel="noopener"{{ end }}>
7+
<a href="{{ if .url }}{{ .url }}{{ else if .repo }}{{ .repo }}{{ else }}javascript:void(0){{ end }}" {{ if or .repo .url }}target="_blank" rel="noopener"{{ end }}>
88
{{ if .image }}
99
<div class="card-head">
1010
{{ $imageImage:= resources.Get .image}}
@@ -50,7 +50,12 @@ <h5 class="card-title mb-0">{{ .name }}</h5>
5050
</div>
5151
</a>
5252
<div class="card-body text-justify pt-1 pb-1">
53-
<p>{{ .summary | markdownify }}</p>
53+
<div class="collapse-summary">
54+
<p class="card-text summary-text collapsed">{{ .summary | markdownify }}</p>
55+
<button class="btn btn-link btn-sm toggle-summary" type="button" style="display: none;">
56+
Read More
57+
</button>
58+
</div>
5459
<!-- Display project card technology tags -->
5560
<div class="project-card-footer">
5661
{{ if .tags }}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{- $opts := dict "target" "es2019" -}}
2+
{{- $src := resources.Get "scripts/collapse-summary.js" | js.Build $opts | resources.Minify -}}
3+
<script defer src="{{ $src.RelPermalink }}" integrity="{{ $src.Data.Integrity }}"></script>

layouts/partials/scripts.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
{{ partial "helpers/script-bundle.html" }}
1+
{{ partial "helpers/script-bundle.html" }}
2+
{{ partial "custom/collapse-summary.html" . }}

public/404.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
88

9-
<link rel="stylesheet" href="/application.d79d46208302e5928f4ea03547a86d6d59c73d1126b073411867c8ec331a15fc.css" integrity="sha256-151GIIMC5ZKPTqA1R6htbVnHPREmsHNBGGfI7DMaFfw=" />
9+
<link rel="stylesheet" href="/application.012fbad9bd15eea7a2faa7c286d22af5d7283632c9f6ee1be941f8e89cdf0c9b.css" integrity="sha256-AS&#43;62b0V7qei&#43;qfChtIq9dcoNjLJ9u4b6UH46JzfDJs=" />
1010

1111

1212

@@ -463,6 +463,8 @@ <h5>Contact me:</h5>
463463

464464
<script src="/application.858f22819f97a63f4ed57dc82661bb3c05e2e327848de38bfc964289e2937aa4.js" integrity="sha256-hY8igZ&#43;Xpj9O1X3IJmG7PAXi4yeEjeOL/JZCieKTeqQ=" defer></script>
465465

466+
<script defer src="/scripts/collapse-summary.min.js" integrity=""></script>
467+
466468

467469

468470

public/application.012fbad9bd15eea7a2faa7c286d22af5d7283632c9f6ee1be941f8e89cdf0c9b.css

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/application.18749c0769f77e7233f48830ad995a17d04510231188c1331242d3838b2cbef2.css

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/application.3a76426e1ce8f7a0ebdb4ad5f7f92dcc0a05933a62723aaecafed41dfe1f441e.css

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)