Skip to content

Commit

Permalink
Update contact email and filter publications by author
Browse files Browse the repository at this point in the history
  • Loading branch information
henrylee97 committed Jan 25, 2024
1 parent a8dc04a commit 83e571a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
6 changes: 5 additions & 1 deletion content/members/seokhyun-lee/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ website = 'https://seokhyunlee.info/'
- 2016 ~ 2019, B.S. [Computer Science and Engineering](https://cs.korea.ac.kr/), [Korea University](https://korea.ac.kr/)
- 2016 ~ 2019, B.B.A. [Business Administration](https://biz.korea.ac.kr/), [Korea University](https://korea.ac.kr/)

## Publications

{{< publication-list data="publications" author="Seokhyun Lee" >}}

## Contact Information
Room 614B, Science Library Bldg
College of Informatics
Korea University
Anam-dong 5-ga, Seongbuk-gu
Seoul 136-713, Korea
(email) seokhyun_lee@korea.ac.kr
(email) seokhyunlee@korea.ac.kr
8 changes: 7 additions & 1 deletion layouts/partials/publication/authors.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{{ $highlight := "" }}
{{ if (isset . "highlight") }}
{{ $highlight = .highlight }}
{{ end }}
{{ with .authors }}
{{ $len := (len .) }}
{{ $scratch := newScratch }}
{{ $scratch.Set "show_equal_contrib" false }}
{{ range $index, $element := . }}{{ if and (not (eq $index 0)) (gt $len 2) }}, {{ end }} {{ if and (eq (add $index 1) $len) (gt $len 1) }}and {{ end }}{{ $element }}{{ if strings.HasSuffix $element "*" }}{{ $scratch.Set "show_equal_contrib" true }}{{ end }}{{ end }}
{{ range $index, $element := . }}{{ if and (not (eq $index 0)) (gt $len 2) }}, {{ end }} {{ if and (eq (add $index 1) $len) (gt $len 1) }}and {{ end }}{{ if (eq $highlight $element) }}<span class="fw-bold text-decoration-underline">{{ $element }}</span>{{ else }}{{ $element }}{{ end }}{{ if strings.HasSuffix $element "*" }}{{ $scratch.Set "show_equal_contrib" true }}{{ end }}{{ end }}
{{ if $scratch.Get "show_equal_contrib" }}(* contributed equally){{ end }}
{{ end }}
15 changes: 12 additions & 3 deletions layouts/shortcodes/publication-list.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
{{ $raw := .Get "data" }}
{{ $raw := index $.Site.Data $raw }}
{{ $author := "" }}
{{ with .Get "author" }}
{{ $author = . }}
{{ end }}

{{ $data := dict }}
{{ range $year, $papers := $raw }}
{{ $block := (dict "year" $year "papers" $papers) }}
{{ $data = merge $data (dict $year $block) }}
{{ if (gt (len $author) 0) }}
{{ $papers = where $papers "authors" "intersect" (slice $author) }}
{{ end }}
{{ if (gt (len $papers) 0) }}
{{ $block := (dict "year" $year "papers" $papers) }}
{{ $data = merge $data (dict $year $block) }}
{{ end }}
{{ end }}

{{ range $block := sort $data "year" "desc" }}
Expand All @@ -14,7 +23,7 @@
{{ range $block.papers }}
<li>
<span class="fw-bold">{{ .title }}</span></br>
{{ partial "publication/authors.html" .authors }}</br>
{{ partial "publication/authors.html" (dict "authors" .authors "highlight" $author) }}</br>
{{ partial "publication/target.html" .target }}</br>
{{ with .honor }}{{ partial "publication/honor.html" . }}</br>{{ end }}
{{ partial "publication/materials.html" .materials }}
Expand Down

0 comments on commit 83e571a

Please sign in to comment.