annotation-blockquote-not.tmpl
Path: template/include/annotation-blockquote-not.tmpl | Language: HTML5/Pandoc | Lines: ~22
Template for rendering annotations without any blockquote wrapper elements.
Overview
This template produces a clean, flat annotation layout that uses <div> elements throughout without any <blockquote> wrappers. This is the most structurally straightforward variant of the annotation templates, presenting all annotation components (title, author/date, abstract, thumbnail, file includes) as sibling elements within a containing <div>.
The template is part of gwern.net's annotation system, which provides rich metadata and abstracts for external links. The "blockquote-not" variant is used when the annotation should be rendered without the semantic weight or visual styling that blockquote elements imply. This is common for annotations that appear in contexts where blockquote styling would be inappropriate or visually disruptive.
This layout is generated by the Haskell build system (particularly Annotation.hs and LinkMetadata.hs) based on the annotation data structure and the rendering context determined during compilation.
Template Variables
| Variable | Type | Description |
|---|---|---|
annotationClassSuffix | String | Additional CSS class suffix for styling variants |
title | HTML | The title text/content of the annotated link |
titleLinkClass | String | CSS class(es) for the title link element |
titleLinkHref | URL | The target URL for the title link |
titleLinkDataAttributes | HTML | Custom data attributes for the link (e.g., data-popup-type) |
whichTab | String | Text description ("a new" or "this") for accessibility |
tabOrWindow | String | Text ("tab" or "window") for accessibility |
linkTarget | String | HTML target attribute (_self, _blank, etc.) |
authorDateAux | HTML | Combined author and date information |
abstract | HTML | The abstract/summary content |
thumbnailFigure | HTML | Thumbnail image wrapped in <figure> element |
fileIncludes | HTML | Additional file/attachment information |
Output Structure
The template generates a flat structure with all elements as siblings:
<div class="annotation[suffix]">
[optional thumbnail figure]
<p class="data-field title">
<a class="..." href="..." target="..." data-...>Title</a>
</p>
<!-- If authorDateAux exists: -->
<p class="data-field author-date-aux">[author and date info]</p>
<!-- If abstract exists: -->
<div class="data-field annotation-abstract">[abstract content]</div>
<!-- If fileIncludes exists: -->
<div class="data-field file-includes">[file information]</div>
</div>
Key structural features:
- No blockquote elements: All content uses
<div>and<p>elements - Flat hierarchy: Title, author/date, abstract, and file-includes are all siblings
- Thumbnail placement: Appears as first child if present
- Separate paragraphs: Author/date information gets its own
<p>element rather than sharing with title - Consistent data-field classes: All major components are marked with
data-fieldclass for styling/scripting
Conditional Logic
The template uses Hakyll's conditional syntax:
<[IF condition]>...<[IFEND]>- First-level conditional
Applied to:
- Thumbnail figure: Rendered first if present
- Author-date-aux: Gets dedicated paragraph if present
- Abstract: Rendered in div if present
- File includes: Rendered in div if present
All conditionals are independent - each field is checked and rendered separately without dependencies on other fields.
Comparison with Other Variants
Unlike other annotation templates:
- vs. blockquote-inside: Does not nest abstract inside blockquote within title paragraph
- vs. blockquote-outside: Does not wrap entire annotation in blockquote
- vs. partial-inline: Includes all annotation fields (abstract, thumbnail, etc.), not just title/author
This variant is the most "neutral" template, making it suitable for contexts where annotations need to blend seamlessly with surrounding content without additional semantic markup.
See Also
- annotation-partial-inline.tmpl - Minimal inline annotation format
- Annotation.hs - Scrapes and processes annotation metadata
- LinkMetadata.hs - Builds annotation data structures
- Typography.hs - Applies template rendering during Pandoc processing
- popups.js - Popup system that displays annotations
- extracts.js - Coordinates annotation popup display
- content.js - Content type routing for annotations