Website/templates/person.erb
Nick Brown ef3a8d45a1
updating information and assets for myself;
also adding "BA" as a template in `person.erb`.
2022-06-21 11:38:37 -04:00

60 lines
1.9 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", "BA" 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]%>" rel="me">Mastodon</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 %>
<% 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 %>
</div>