$def with (author) $jsdef render_lazy_author_preview(item): $if item: $# The autocomplete plugin moves `top_work` into `works`, but we should support both fields. $ top_work = item['top_work'] or item['works'][0]
$item['key']
$item['name'] $if item['birth_date'] or item['death_date']: ($(item['birth_date'] or ' ')–$(item['death_date'] or ' ')) $if item['work_count'] == 0: No books associated with $item['name'] $elif item['work_count'] == 1: 1 book titled $top_work $else: $item['work_count'] books including $top_work $if item['work_count'] and item['subjects']: Subjects: $(', '.join(item['subjects']))
$if author: $:render_lazy_author_preview(author)