Website/templates/person.erb

60 lines
1.9 KiB
Plaintext
Raw Normal View History

2016-05-25 16:58:50 -04:00
2017-06-02 15:38:02 -04:00
<%
name = if defined? name then name else "A Mysterious Stranger" end
2017-11-28 14:51:36 -05:00
use_gnusocial = false
if defined? gnusocial
use_gnusocial = true
gnusocial = [:prefix, :account, :host].zip(gnusocial.split(/@/)).to_h
end
2017-06-02 15:38:02 -04:00
%>
2016-05-25 16:58:50 -04:00
<div class="person">
<% if defined? pic %>
2017-07-09 10:59:06 -04:00
<% if pic.is_a? Hash %>
<img class="photo" src="<%=pic["file"]%>" width="<%=pic["width"]%>" height="<%=pic["height"]%>" />
<% elsif pic.is_a? String %>
<img class="photo" src="<%=pic%>" />
<% end %>
2016-05-25 16:58:50 -04:00
<% end %>
<h1><%= name %></h1>
2017-08-17 15:03:30 -04:00
<% if defined? status %>
<h5><%=
case status
when "PhD", "MS", "BS", "BA" then status + " student"
2017-08-17 15:03:30 -04:00
else status
end
%></h5>
<% end %>
2016-05-25 16:58:50 -04:00
<div class="links">
<% if defined? github %><a href="http://github.com/<%=github%>">GitHub</a><% end %>
<% if defined? twitter %><a href="http://twitter.com/<%=twitter%>">Twitter</a><% end %>
2019-06-28 15:47:50 -04:00
<% if use_gnusocial %><a href="https://<%=gnusocial[:host]%>/@<%=gnusocial[:account]%>" rel="me">Mastodon</a><% end %>
2018-06-14 01:36:12 -04:00
<% if defined? scholar %><a href="http://scholar.google.com/citations?user=<%=scholar%>">Google&nbsp;Scholar</a><% end %>
2017-07-09 09:57:25 -04:00
<% if defined? dblp %><a href="http://dblp.uni-trier.de/pers/<%=dblp%>">DBLP</a><% end %>
2016-05-25 16:58:50 -04:00
<% if defined? cv %><a href="<%=cv%>">CV</a><% end %>
</div>
<%= body %>
2017-11-28 14:51:36 -05:00
<% if use_gnusocial and false %>
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://<%=gnusocial[:host]%>/users/<%=gnusocial[:account]%>"></iframe>
</div>
<% end # if defined? gnusocial %>
2018-10-26 22:29:57 -04:00
<% if defined? projects and not projects.empty? %>
<h2>Projects</h2>
<ul>
<% projects.each do |project| %>
<li><%= LabMetadata.project_link(project) %></li>
<% end %>
</ul>
<% end %>
<% pubs = LabMetadata::publications_for(name) %>
<% unless pubs.empty? %>
<h2>Publications</h2>
<%= LabMetadata::render_pubs(pubs) %>
<% end %>
2016-05-25 16:58:50 -04:00
</div>