@@ -19,14 +19,14 @@ function hfun_list_people()
1919 (
2020 node (" div" , class= " card-column" ,
2121 node (" div" , class= " card-body" ,
22- node (" img" , src= " /assets/portrait_placeholder.png " ),
22+ node (" img" , src= p . portrait ),
2323 node (" div" , class= " card-container" ,
24- node (" h2" , node (" a" , href= p. href, p. name)),
24+ node (" h2" , node (" a" , href= p. href, p. name)),
2525 node (" div" , class= " card-title" , p. title),
2626 node (" div" , class= " card-vitae" , p. vitae),
27- node (" div" , class= " card-email" , p. email),
28- node (" p" , node (" a" , href= " mailto: $(p . email) " ,
29- node (" button" , class= " card-button" , " Contact " )
27+ node (" div" , class= " card-email" , node ( " a " , href = " mailto: $( p. email) " , p . email) ),
28+ node (" p" , node (" a" , href= p . href ,
29+ node (" button" , class= " card-button" , " Details " )
3030 )
3131 )
3232 )
@@ -37,6 +37,20 @@ function hfun_list_people()
3737 )
3838end
3939
40+ function person_info (rp)
41+ return (;
42+ date= getvarfrom (:joined , rp),
43+ name= getvarfrom (:name , rp),
44+ title= getvarfrom (:title , rp),
45+ email= getvarfrom (:email , rp),
46+ portrait= getvarfrom (:portrait , rp, " /assets/portrait_placeholder.png" ),
47+ vitae= getvarfrom (:vitae , rp),
48+ alumn= getvarfrom (:alumn , rp, false ),
49+ href= " /$(splitext (rp)[1 ]) " ,
50+ tags= get_page_tags (rp)
51+ )
52+ end
53+
4054function get_people (basepath:: String = " people" )
4155 # find all valid "people/xxx.md" files, exclude the index which is where
4256 # the people list gets placed
@@ -46,27 +60,31 @@ function get_people(basepath::String="people")
4660 append! (paths, joinpath .(root, files))
4761 end
4862 # for each of those people, get their info
49- posts = [
50- (
51- date= getvarfrom (:joined , rp),
52- name= getvarfrom (:name , rp),
53- title= getvarfrom (:title , rp),
54- email= getvarfrom (:email , rp),
55- vitae= getvarfrom (:vitae , rp),
56- alumn= getvarfrom (:alumn , rp, false ),
57- href= " /$(splitext (rp)[1 ]) " ,
58- tags= get_page_tags (rp)
59- )
60- for rp in paths
61- ]
63+ posts = [person_info (rp) for rp in paths]
6264 sort! (posts, by= x -> x. date)
6365
6466 return posts
6567end
6668
6769function hfun_person_header ()
68- name = getlvar (:name , getlvar (:title ))
69- return string (node (" div" , class= " franklin-content" , node (" h1" , name)))
70+ person = person_info (get_rpath ())
71+ return string (node (" div" , class= " franklin-content" ,
72+
73+ node (" div" , class= " profile-header" ,
74+ node (" div" , class= " profile-info" ,
75+ node (" h1" , class= " profile-name" , person. name),
76+ node (" div" , class= " profile-title" , person. title),
77+ node (" div" , class= " profile-vitae" , person. vitae),
78+ node (" div" , class= " profile-email" ,
79+ node (" a" , href= " mailto:$(person. email) " , person. email)
80+ ),
81+ ),
82+ node (" div" , class= " profile-image-container" ,
83+ node (" img" , class= " profile-image" , src= person. portrait, alt= " $(person. name) " )
84+ )
85+ ),
86+
87+ ))
7088end
7189
7290function hfun_list_projects ()
0 commit comments