smr/src/pages/author_index.etlua

46 lines
995 B
Plaintext

<% assert(author,"No author specified") %>
<% assert(bio,"No bio included") %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>&#x1f351;</title>
<link href="/_css/style.css" rel="stylesheet">
<link href="/_css/milligram.css" rel="stylesheet">
</head>
<body class="container">
<h1 class="title">
<a href="https://<%= author %>.<%= domain %>"><%= author %></a>.<a href="https://<%= domain %>"><%= domain %></a>
</h1>
<div class="content">
<%= bio %>
</div>
<div class="content">
<% if #stories == 0 then %>
This author has not made any pastes yet.
<% else %>
<table>
<% for k,v in pairs(stories) do %>
<tr><td>
<a href="<%= v.url %>">
<%- v.title %>
</a>
</td><td>
By <a href="https://<%= author %>.<%= domain %>"><%= author %></a>
</td><td>
<%= v.posted %>
</td></tr>
<% end %>
</table>
<% end %>
</div>
<footer class="footer">
</footer>
</body>
<body>