Skip to content

Commit f56b24c

Browse files
committed
Add projects
1 parent 79a1b9e commit f56b24c

File tree

4 files changed

+99
-69
lines changed

4 files changed

+99
-69
lines changed

content/projects/dynasor.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "Dynasor"
3+
description: "Speed up reasoning models without training."
4+
link: "https://github.com/hao-ai-lab/Dynasor"
5+
layout: "project"
6+
---
7+

content/projects/fast-video.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "Fast Video"
3+
description: "Accelerate large video diffusion models by 3x."
4+
link: "https://github.com/hao-ai-lab/fastvideo"
5+
layout: "project"
6+
---
7+

layouts/_default/project.html

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{{ define "main" }}
2+
<article class="project-single">
3+
<header class="project-header">
4+
<h1>{{ .Title }}</h1>
5+
{{ with .Description }}
6+
<div class="project-description">{{ . | markdownify }}</div>
7+
{{ end }}
8+
</header>
9+
10+
<div class="project-content">
11+
{{ .Content }}
12+
</div>
13+
</article>
14+
15+
<style>
16+
.project-single {
17+
max-width: 800px;
18+
margin: 2rem auto;
19+
padding: 0 1rem;
20+
}
21+
22+
.project-header {
23+
margin-bottom: 2rem;
24+
}
25+
26+
.project-header h1 {
27+
font-size: 2.5rem;
28+
margin-bottom: 1rem;
29+
color: #333;
30+
}
31+
32+
.project-description {
33+
font-size: 1.2rem;
34+
color: #666;
35+
line-height: 1.6;
36+
}
37+
38+
.project-content {
39+
font-size: 1.1rem;
40+
line-height: 1.8;
41+
color: #444;
42+
}
43+
44+
@media (max-width: 768px) {
45+
.project-single {
46+
margin: 1rem auto;
47+
}
48+
49+
.project-header h1 {
50+
font-size: 2rem;
51+
}
52+
}
53+
</style>
54+
{{ end }}

layouts/section/project.html

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

33
{{- if (and site.Params.profileMode.enabled .IsHome) -}}
44
{{- partial "index_profile.html" . -}}
5-
{{- else }}{{/* if not profileMode */}}
5+
{{- else }}
66

77
{{- if not .IsHome | and .Title -}}
88
<header class="page-header">
@@ -14,101 +14,63 @@ <h1>{{ .Title }}</h1>
1414
</header>
1515
{{- end -}}
1616

17-
<!-- Add CSS inside the template -->
1817
<style>
19-
.posts-grid {
18+
.projects-grid {
2019
display: grid;
21-
grid-template-columns: repeat(3, 1fr); /* Three posts per row */
22-
gap: 20px;
23-
padding: 20px;
20+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
21+
gap: 2rem;
22+
padding: 2rem;
2423
}
2524

26-
.post-preview {
25+
.project-card {
2726
background: #fff;
2827
border-radius: 8px;
2928
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
30-
overflow: hidden;
29+
padding: 1.5rem;
3130
transition: transform 0.2s ease-in-out;
32-
padding: 15px;
3331
}
3432

35-
.post-preview:hover {
33+
.project-card:hover {
3634
transform: translateY(-5px);
3735
}
3836

39-
.post-image img {
40-
width: 100%;
41-
height: auto;
42-
display: block;
43-
}
44-
45-
.post-details {
46-
padding: 15px;
47-
}
48-
49-
.post-details h2 {
37+
.project-title {
5038
font-size: 1.5rem;
51-
margin-bottom: 10px;
39+
margin-bottom: 1rem;
40+
color: #333;
5241
}
5342

54-
.post-details p {
55-
font-size: 1rem;
56-
color: #555;
57-
}
58-
59-
@media (max-width: 1024px) {
60-
.posts-grid {
61-
grid-template-columns: repeat(2, 1fr); /* Two columns for medium screens */
62-
}
43+
.project-description {
44+
color: #666;
45+
line-height: 1.6;
6346
}
6447

6548
@media (max-width: 768px) {
66-
.posts-grid {
67-
grid-template-columns: repeat(1, 1fr); /* One column for small screens */
68-
}
69-
}
70-
71-
/* Project-specific responsive title */
72-
@media (max-width: 360px) {
73-
.post-details h2 {
74-
font-size: 1.2rem; /* Smaller font size for very small screens */
75-
}
76-
.post-details p {
77-
font-size: 0.6rem; /* Smaller font size for very small screens */
49+
.projects-grid {
50+
grid-template-columns: 1fr;
51+
padding: 1rem;
7852
}
7953
}
8054
</style>
8155

82-
<!-- Updated layout for three-column grid -->
83-
<div class="posts-grid">
84-
{{- $pages := where .Site.RegularPages "Type" "in" (slice "summary") -}}
85-
{{- $paginator := .Paginate $pages -}}
86-
{{- range $paginator.Pages -}}
87-
<article class="post-preview">
88-
{{- with .Params.cover.image -}}
89-
<div class="post-image">
90-
<img src="{{ . | absURL }}" alt="{{ $.Params.cover.alt }}">
91-
</div>
92-
{{- end -}}
93-
<div class="post-details">
94-
<h2><a href="{{ .Permalink }}" style="color: black !important;">{{ .Title }}</a></h2>
95-
<time datetime="{{ .Date }}">{{ .Date.Format "January 2, 2006" }}</time>
96-
{{- if .Params.author -}}
97-
<p class="post-author"> {{ .Params.author }}</p>
98-
{{- else if .Params.authors -}}
99-
<p class="post-author"> {{ delimit .Params.authors ", " }}</p>
56+
<div class="projects-grid">
57+
{{- $pages := where .Site.RegularPages "Section" "projects" -}}
58+
{{- range $pages -}}
59+
<article class="project-card">
60+
<h2 class="project-title">
61+
<a href="{{ .Params.link }}" style="color: inherit; text-decoration: none;">{{ .Title }}</a>
62+
</h2>
63+
<div class="project-description">
64+
{{- if .Description -}}
65+
{{ .Description | markdownify }}
66+
{{- else -}}
67+
{{ .Summary | plainify | truncate 160 }}
10068
{{- end -}}
10169
</div>
10270
</article>
10371
{{- end -}}
10472
</div>
10573

106-
{{- if gt $paginator.TotalPages 1 -}}
107-
<footer class="pagination-footer">
108-
{{ template "_internal/pagination.html" . }}
109-
</footer>
110-
{{- end -}}
111-
112-
{{- end }}{{/* end profileMode */}}
74+
{{- end }}
11375

114-
{{- end }}{{/* end main */}}
76+
{{- end }}

0 commit comments

Comments
 (0)