Website/templates/person.erb

51 lines
1.7 KiB
Plaintext

<%
name = if defined? name then name else "A Mysterious Stranger" end
use_gnusocial = false
if defined? gnusocial
use_gnusocial = true
gnusocial = [:prefix, :account, :host].zip(gnusocial.split(/@/)).to_h
end
%>
<div class="person">
<% if defined? pic %>
<% 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 %>
<% end %>
<h1><%= name %></h1>
<% if defined? status %>
<h5><%=
case status
when "PhD", "MS", "BS" then status + " student"
else status
end
%></h5>
<% end %>
<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 %>
<% if use_gnusocial %><a href="https://<%=gnusocial[:host]%>/@<%=gnusocial[:account]%>">@<%=gnusocial[:account]%>@<%=gnusocial[:host]%></a><% end %>
<% if defined? scholar %><a href="http://scholar.google.com/citations?user=<%=scholar%>">Google&nbsp;Scholar</a><% end %>
<% if defined? dblp %><a href="http://dblp.uni-trier.de/pers/<%=dblp%>">DBLP</a><% end %>
<% if defined? cv %><a href="<%=cv%>">CV</a><% end %>
</div>
<%= body %>
<% 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 %>
<% pubs = LabMetadata::publications_for(name) %>
<% unless pubs.empty? %>
<h2>Publications</h2>
<%= LabMetadata::render_pubs(pubs) %>
<% end %>
</div>