|
5 | 5 | from tqdm import tqdm |
6 | 6 |
|
7 | 7 | default_pic = "../../assets/img/octocat.png" |
8 | | -eng_alu_format = """<div> |
9 | | - <figure align="center" text-align="center"> |
10 | | - <a href=""><img style="border-radius: 50%; width:150px" src="{pic}" alt=""></a> |
11 | | - <figcaption><b>{name}</b><br><b>{xlanceid}</b></figcaption> |
12 | | - </figure> |
| 8 | +eng_alu_format = """<div class="member"> |
| 9 | + <a href="#"><img src="{pic}" alt="{name}"></a> |
| 10 | + <div><b>{name}</b><br><b>{xlanceid}</b></div> |
13 | 11 | </div>""" |
14 | | -chi_alu_format = """<div> |
15 | | - <figure align="center" text-align="center"> |
16 | | - <a href=""><img style="border-radius: 50%; width:150px" src="{pic}" alt=""></a> |
17 | | - <figcaption><b>{name}</b><br><b>{xlanceid}</b></figcaption> |
18 | | - </figure> |
| 12 | +chi_alu_format = """<div class="member"> |
| 13 | + <a href="#"><img src="{pic}" alt="{name}"></a> |
| 14 | + <div><b>{name}</b><br><b>{xlanceid}</b></div> |
19 | 15 | </div>""" |
20 | | -eng_stu_format = """<div> |
21 | | - <figure align="center" text-align="center"> |
22 | | - <a href=""><img style="border-radius: 50%; width:150px" src="{pic}" alt=""></a> |
23 | | - <figcaption><b>{name}</b><br><b>{xlanceid}</b></figcaption> |
24 | | - </figure> |
| 16 | +eng_stu_format = """<div class="member"> |
| 17 | + <a href="#"><img src="{pic}" alt="{name}"></a> |
| 18 | + <div><b>{name}</b><br><b>{xlanceid}</b></div> |
25 | 19 | </div>""" |
26 | | -chi_stu_format = """<div> |
27 | | - <figure align="center" text-align="center"> |
28 | | - <a href=""><img style="border-radius: 50%; width:150px" src="{pic}" alt=""></a> |
29 | | - <figcaption><b>{name}</b><br><b>{xlanceid}</b></figcaption> |
30 | | - </figure> |
| 20 | +chi_stu_format = """<div class="member"> |
| 21 | + <a href="#"><img src="{pic}" alt="{name}"></a> |
| 22 | + <div><b>{name}</b><br><b>{xlanceid}</b></div> |
31 | 23 | </div>""" |
32 | 24 |
|
33 | 25 |
|
@@ -79,119 +71,149 @@ def convert_part(chars): |
79 | 71 | page_id: alumni |
80 | 72 | layout: profiles |
81 | 73 | permalink: /members/alumni/ |
82 | | -title: alumni |
| 74 | +title: 🧑🎓Alumni |
83 | 75 | description: Alumni of X-LANCE |
84 | 76 | nav: false |
85 | 77 | --- |
86 | 78 |
|
87 | 79 | <style> |
88 | 80 | .mycontainer { |
89 | | - width:100%; |
90 | | - height: auto; |
91 | | - display: flex; /* 使用flex布局 */ |
92 | | - flex-wrap: wrap; /* 设置子元素自动换行 */ |
93 | | - overflow:auto; |
| 81 | + width: 100%; |
| 82 | + display: flex; |
| 83 | + flex-wrap: wrap; |
| 84 | + justify-content: center; /* 水平居中所有项 */ |
| 85 | + gap: 30px; /* 每项之间的间距 */ |
| 86 | + padding: 20px 0; |
94 | 87 | } |
95 | | -.mycontainer div { |
96 | | - margin: 0 10px; |
97 | | - float:left; |
98 | | -} |
99 | | -</style> |
100 | 88 |
|
101 | | -[//]: # (<h2> 博士后 </h2>) |
| 89 | +.member { |
| 90 | + text-align: center; |
| 91 | + width: 150px; |
| 92 | +} |
102 | 93 |
|
| 94 | +.member img { |
| 95 | + width: 150px; |
| 96 | + border-radius: 50%; |
| 97 | +} |
| 98 | +</style> |
103 | 99 |
|
104 | 100 | <div class="mycontainer">""" |
| 101 | + |
105 | 102 | chi_alumni_md = """--- |
106 | 103 | page_id: alumni |
107 | 104 | layout: profiles |
108 | 105 | permalink: /members/alumni/ |
109 | | -title: 校友 |
| 106 | +title: 🧑🎓校友 |
110 | 107 | description: X-LANCE毕业校友 |
111 | 108 | nav: false |
112 | 109 | --- |
113 | 110 |
|
114 | 111 | <style> |
115 | 112 | .mycontainer { |
116 | | - width:100%; |
117 | | - height: auto; |
118 | | - display: flex; /* 使用flex布局 */ |
119 | | - flex-wrap: wrap; /* 设置子元素自动换行 */ |
120 | | - overflow:auto; |
| 113 | + width: 100%; |
| 114 | + display: flex; |
| 115 | + flex-wrap: wrap; |
| 116 | + justify-content: center; /* 水平居中所有项 */ |
| 117 | + gap: 30px; /* 每项之间的间距 */ |
| 118 | + padding: 20px 0; |
121 | 119 | } |
122 | | -.mycontainer div { |
123 | | - margin: 0 10px; |
124 | | - float:left; |
| 120 | +
|
| 121 | +.member { |
| 122 | + text-align: center; |
| 123 | + width: 150px; |
125 | 124 | } |
126 | | -</style> |
127 | 125 |
|
128 | | -[//]: # (<h2> 博士后 </h2>) |
| 126 | +.member img { |
| 127 | + width: 150px; |
| 128 | + border-radius: 50%; |
| 129 | +} |
| 130 | +</style> |
129 | 131 |
|
130 | 132 |
|
131 | 133 | <div class="mycontainer">""" |
| 134 | + |
132 | 135 | eng_student_md_P = """--- |
133 | 136 | page_id: student |
134 | 137 | layout: page |
135 | 138 | permalink: /members/student/ |
136 | | -title: Students |
| 139 | +title: 🧑💻Students |
137 | 140 | description: Students of X-LANCE |
138 | 141 | nav: false |
139 | 142 | --- |
140 | 143 |
|
141 | 144 | <style> |
142 | 145 | .mycontainer { |
143 | | - width:100%; |
144 | | - height: auto; |
145 | | - display: flex; /* 使用flex布局 */ |
146 | | - flex-wrap: wrap; /* 设置子元素自动换行 */ |
147 | | - overflow:auto; |
| 146 | + width: 100%; |
| 147 | + display: flex; |
| 148 | + flex-wrap: wrap; |
| 149 | + justify-content: center; /* 水平居中所有项 */ |
| 150 | + gap: 30px; /* 每项之间的间距 */ |
| 151 | + padding: 20px 0; |
| 152 | +} |
| 153 | +
|
| 154 | +.member { |
| 155 | + text-align: center; |
| 156 | + width: 150px; |
148 | 157 | } |
149 | | -.mycontainer div { |
150 | | - margin: 0 10px; |
151 | | - float:left; |
| 158 | +
|
| 159 | +.member img { |
| 160 | + width: 150px; |
| 161 | + border-radius: 50%; |
152 | 162 | } |
153 | 163 | </style> |
154 | 164 |
|
155 | 165 |
|
156 | 166 | [//]: # (<h2> Postdocs </h2>) |
157 | 167 | <h2> PhD Candidates </h2> |
158 | 168 | <div class="mycontainer">""" |
| 169 | + |
159 | 170 | chi_student_md_P = """--- |
160 | 171 | page_id: student |
161 | 172 | layout: page |
162 | 173 | permalink: /members/student/ |
163 | | -title: 学生 |
| 174 | +title: 🧑💻学生 |
164 | 175 | description: X-LANCE在读学生 |
165 | 176 | nav: false |
166 | 177 | --- |
167 | 178 |
|
168 | 179 | <style> |
169 | 180 | .mycontainer { |
170 | | - width:100%; |
171 | | - height: auto; |
172 | | - display: flex; /* 使用flex布局 */ |
173 | | - flex-wrap: wrap; /* 设置子元素自动换行 */ |
174 | | - overflow:auto; |
| 181 | + width: 100%; |
| 182 | + display: flex; |
| 183 | + flex-wrap: wrap; |
| 184 | + justify-content: center; /* 水平居中所有项 */ |
| 185 | + gap: 30px; /* 每项之间的间距 */ |
| 186 | + padding: 20px 0; |
| 187 | +} |
| 188 | +
|
| 189 | +.member { |
| 190 | + text-align: center; |
| 191 | + width: 150px; |
175 | 192 | } |
176 | | -.mycontainer div { |
177 | | - margin: 0 10px; |
178 | | - float:left; |
| 193 | +
|
| 194 | +.member img { |
| 195 | + width: 150px; |
| 196 | + border-radius: 50%; |
179 | 197 | } |
180 | 198 | </style> |
181 | 199 |
|
182 | 200 | [//]: # (<h2> 博士后 </h2>) |
183 | 201 |
|
184 | 202 | <h2> 博士研究生 </h2> |
185 | 203 | <div class="mycontainer">""" |
| 204 | + |
186 | 205 | eng_student_md_M = """ |
187 | 206 | <h2> Master Candidates </h2> |
188 | 207 | <div class="mycontainer">""" |
| 208 | + |
189 | 209 | chi_student_md_M = """ |
190 | 210 | <h2> 硕士研究生 </h2> |
191 | 211 | <div class="mycontainer">""" |
| 212 | + |
192 | 213 | eng_student_md_U = """ |
193 | 214 | <h2> Undergraduates </h2> |
194 | 215 | <div class="mycontainer">""" |
| 216 | + |
195 | 217 | chi_student_md_U = """ |
196 | 218 | <h2> 本科生 </h2> |
197 | 219 | <div class="mycontainer">""" |
|
0 commit comments