Skip to main content

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

VariableTypeDescription
annotationClassSuffixStringAdditional CSS class suffix for styling variants
titleHTMLThe title text/content of the annotated link
titleLinkClassStringCSS class(es) for the title link element
titleLinkHrefURLThe target URL for the title link
titleLinkDataAttributesHTMLCustom data attributes for the link (e.g., data-popup-type)
whichTabStringText description ("a new" or "this") for accessibility
tabOrWindowStringText ("tab" or "window") for accessibility
linkTargetStringHTML target attribute (_self, _blank, etc.)
authorDateAuxHTMLCombined author and date information
abstractHTMLThe abstract/summary content
thumbnailFigureHTMLThumbnail image wrapped in <figure> element
fileIncludesHTMLAdditional 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-field class for styling/scripting

Conditional Logic

The template uses Hakyll's conditional syntax:

  • <[IF condition]>...<[IFEND]> - First-level conditional

Applied to:

  1. Thumbnail figure: Rendered first if present
  2. Author-date-aux: Gets dedicated paragraph if present
  3. Abstract: Rendered in div if present
  4. 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