Skip to content

Commit

Permalink
fix sortby func
Browse files Browse the repository at this point in the history
  • Loading branch information
xhd0728 committed Sep 25, 2024
1 parent 4a75c17 commit f53bbc7
Show file tree
Hide file tree
Showing 29 changed files with 149 additions and 77 deletions.
32 changes: 9 additions & 23 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
{% assign image = page.footer | default: site.footer | relative_url %}
{% assign dark = page.footer-dark | is_nil: site.footer-dark | is_nil: true %}

<footer
class="background"
style="--image: url('{{ image }}')"
{% if dark == true or dark == false %}
data-dark="{{ dark }}"
{% endif %}
data-size="wide"
>
<footer class="background" style="--image: url('{{ image }}')" {% if dark==true or dark==false %} data-dark="{{ dark }}"
{% endif %} data-size="wide">
<!--
<div>
Extra details like contact info or address
Expand All @@ -17,26 +11,18 @@

<div>
{% for link in site.links %}
{% assign key = link[0] %}
{% assign value = link[1] %}
{% include button.html type=key text="" link=value style="bare" %}
{% assign key = link[0] %}
{% assign value = link[1] %}
{% include button.html type=key text="" link=value style="bare" %}
{% endfor %}
</div>

<div>
&copy; {{ site.time | date: "%Y" }}
{{ site.title }}
&nbsp; | &nbsp; Built with
<a href="https://github.com/greenelab/lab-website-template">
Lab Website Template
</a>
&nbsp; | &nbsp; 辽宁省沈阳市浑南区创新路195号计算机科学与工程学院 &nbsp; | &nbsp; 邮编: 110169
</div>

<input
type="checkbox"
class="dark-toggle"
data-tooltip="Dark mode"
aria-label="toggle dark mode"
oninput="onDarkToggleChange(event)"
>
</footer>
<input type="checkbox" class="dark-toggle" data-tooltip="Dark mode" aria-label="toggle dark mode"
oninput="onDarkToggleChange(event)">
</footer>
88 changes: 38 additions & 50 deletions _includes/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,55 +5,43 @@
| data_filter: include.filters
%}

{% assign years = data
| group_by_exp: "d", "d.date | date: '%Y'"
| sort: "name"
| reverse
%}

{% for year in years %}
{% assign data = year.items %}

{% if years.size > 1 %}
{{--}}<h3 id="{{ year.name }}">{{ year.name }}</h3>
{% assign data = data | sort: "date" | reverse %}
{% endif %}
<!-- 对数据按照 year 字段进行排序 -->
{% assign sorted_data = data | sort: "year" %}

{% for d in data %}
{% assign style = d.style | default: include.style %}
{% for d in sorted_data %}
{% assign style = d.style | default: include.style %}

{%
include {{ include.component | append: ".html" }}
affiliation=d.affiliation
author=d.author
authors=d.authors
buttons=d.buttons
caption=d.caption
content=d.content
date=d.date
description=d.description
excerpt=d.excerpt
height=d.height
icon=d.icon
id=d.id
image=d.image
last_modified_at=d.last_modified_at
link=d.link
lookup=d.lookup
name=d.name
publisher=d.publisher
repo=d.repo
role=d.role
slug=d.slug
style=style
subtitle=d.subtitle
tags=d.tags
text=d.text
title=d.title
tooltip=d.tooltip
type=d.type
url=d.url
width=d.width
%}
{% endfor %}
{% endfor %}
{%
include {{ include.component | append: ".html" }}
affiliation=d.affiliation
author=d.author
authors=d.authors
buttons=d.buttons
caption=d.caption
content=d.content
date=d.date
description=d.description
excerpt=d.excerpt
height=d.height
icon=d.icon
id=d.id
image=d.image
last_modified_at=d.last_modified_at
link=d.link
lookup=d.lookup
name=d.name
publisher=d.publisher
repo=d.repo
role=d.role
slug=d.slug
style=style
subtitle=d.subtitle
tags=d.tags
text=d.text
title=d.title
tooltip=d.tooltip
type=d.type
url=d.url
width=d.width
%}
{% endfor %}
59 changes: 59 additions & 0 deletions _includes/list.html.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{% assign emptyarray = "" | split: "," %}
{% assign data = site.data[include.data]
| default: site[include.data]
| default: emptyarray
| data_filter: include.filters
%}

{% assign years = data
| group_by_exp: "d", "d.date | date: '%Y'"
| sort: "name"
| reverse
%}

{% for year in years %}
{% assign data = year.items %}

{% if years.size > 1 %}
{{--}}<h3 id="{{ year.name }}">{{ year.name }}</h3>
{% assign data = data | sort: "date" | reverse %}
{% endif %}

{% for d in data %}
{% assign style = d.style | default: include.style %}

{%
include {{ include.component | append: ".html" }}
affiliation=d.affiliation
author=d.author
authors=d.authors
buttons=d.buttons
caption=d.caption
content=d.content
date=d.date
description=d.description
excerpt=d.excerpt
height=d.height
icon=d.icon
id=d.id
image=d.image
last_modified_at=d.last_modified_at
link=d.link
lookup=d.lookup
name=d.name
publisher=d.publisher
repo=d.repo
role=d.role
slug=d.slug
style=style
subtitle=d.subtitle
tags=d.tags
text=d.text
title=d.title
tooltip=d.tooltip
type=d.type
url=d.url
width=d.width
%}
{% endfor %}
{% endfor %}
1 change: 1 addition & 0 deletions _members/buqiang-xu.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Buqiang Xu
image: images/headshots/buqiang_xu.jpg
role: bs
year: 2024
links:
email: [email protected]
---
Expand Down
1 change: 1 addition & 0 deletions _members/haidong-xin.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Haidong Xin
image: images/headshots/haidong_xin.png
role: ms
year: 2024
links:
email: [email protected]
home-page: https://xinhaidong.top
Expand Down
7 changes: 7 additions & 0 deletions _members/han-zhang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Han Zhang
role: graduated
year: 2021
---

This is Han Zhang's Personal Page.
1 change: 1 addition & 0 deletions _members/hanbin-wang.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Hanbin Wang
image: images/headshots/hanbin_wang.jpg
role: graduated
year: 2023
links:
email: [email protected]
home-page: https://wanghanbinpanda.github.io/
Expand Down
1 change: 1 addition & 0 deletions _members/haolan-wang.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Haolan Wang
image: images/headshots/haolan_wang.jpg
role: ms
year: 2023
---

This is Haolan Wang's Personal Page.
1 change: 1 addition & 0 deletions _members/mingyan-wu.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Mingyan Wu
image: images/headshots/mingyan_wu.jpg
role: ms
year: 2024
links:
email: [email protected]
---
Expand Down
1 change: 1 addition & 0 deletions _members/qiushi-xiong.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Qiushi Xiong
image: images/headshots/qiushi_xiong.jpg
role: ms
year: 2023
links:
email: [email protected]
home-page: https://qiushixiong.github.io/
Expand Down
1 change: 1 addition & 0 deletions _members/sen-mei.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Sen Mei
image: images/headshots/sen_mei.jpg
role: ms
year: 2022
links:
email: [email protected]
home-page: https://mssssss123.github.io/
Expand Down
1 change: 1 addition & 0 deletions _members/shaohua-duan.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Shaohua Duan
image: images/headshots/shaohua_duan.jpg
role: ms
year: 2024
links:
email: [email protected]
---
Expand Down
1 change: 1 addition & 0 deletions _members/shuliang-liu.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Shuliang Liu
image: images/headshots/shuliang_liu.jpg
role: ms
year: 2024
links:
email: [email protected]
---
Expand Down
1 change: 1 addition & 0 deletions _members/sijia-yao.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Sijia Yao
image: images/headshots/sijia_yao.jpg
role: ms
year: 2023
---

This is Sijia Yao's Personal Page.
1 change: 1 addition & 0 deletions _members/tianshuo-zhou.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Tianshuo Zhou
image: images/headshots/tianshuo_zhou.png
role: ms
year: 2022
links:
email: [email protected]
home-page: https://whale-z.github.io/
Expand Down
1 change: 1 addition & 0 deletions _members/tingran-zhang.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Tingran Zhang
image: images/headshots/tingran_zhang.jpg
role: bs
year: 2023
links:
email: [email protected]
---
Expand Down
1 change: 1 addition & 0 deletions _members/weiqing-yang.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Weiqing Yang
image: images/headshots/weiqing_yang.jpg
role: ms
year: 2023
---

This is Weiqing Yang's Personal Page.
1 change: 1 addition & 0 deletions _members/xingsheng-zhu.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Xingsheng Zhu
image: images/headshots/xingsheng_zhu.jpg
role: ms
year: 2024
links:
email: [email protected]
---
Expand Down
1 change: 1 addition & 0 deletions _members/xinze-li.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Xinze Li
image: images/headshots/xinze_li.jpg
role: phd
year: 2024
links:
email: [email protected]
home-page: https://eureka336.github.io/
Expand Down
1 change: 1 addition & 0 deletions _members/yibin-liu.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Yibin Liu
image: images/headshots/yibin_liu.jpg
role: bs
year: 2023
links:
email: [email protected]
home-page: https://10-oasis-01.github.io/
Expand Down
1 change: 1 addition & 0 deletions _members/yifan-ji.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Yifan Ji
image: images/headshots/yifan_ji.jpg
role: ms
year: 2024
links:
email: [email protected]
---
Expand Down
1 change: 1 addition & 0 deletions _members/yuanhuiyi-lyu.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Yuanhuiyi Lyu
image: images/headshots/yuanhuiyi_lyu.png
role: graduated
year: 2021
links:
email: [email protected]
home-page: https://qc-ly.github.io/
Expand Down
1 change: 1 addition & 0 deletions _members/yuqing-lan.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Yuqing Lan
image: images/headshots/yuqing_lan.jpg
role: phd
year: 2020
links:
email: [email protected]
home-page: https://yuqinglanok.github.io/
Expand Down
1 change: 1 addition & 0 deletions _members/zhenghao-liu.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Zhenghao Liu
image: images/headshots/zhenghao_liu.jpg
role: pi
year: 2021
links:
email: [email protected]
home-page: https://edwardzh.github.io
Expand Down
1 change: 1 addition & 0 deletions _members/zhipeng-xu.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Zhipeng Xu
image: images/headshots/zhipeng_xu.png
role: ms
year: 2023
links:
email: [email protected]
home-page: https://pab1x.github.io/
Expand Down
1 change: 1 addition & 0 deletions _members/zhuoyang-wu.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Zhuoyang Wu
image: images/headshots/zhuoyang_wu.jpg
role: ms
year: 2024
links:
email: [email protected]
---
Expand Down
Loading

0 comments on commit f53bbc7

Please sign in to comment.