Skip to main content

annotation-blockquote-not.tmpl

This template produces a clean, flat annotation layout that uses elements throughout without any wrappers.

Pathtemplate/include/annotation-blockquote-not.tmpl
LanguageHTML5/Pandoc
Lines23

Read this when Use this page when tracing the HTML/Pandoc templates and include fragments that shape rendered gwern.net pages around annotation-blockquote-not.tmpl.

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 template is not rendered by the Haskell build system. All template/include/*.tmpl files are bundled into js/transclude-templates-GENERATED.js by build/build_unified_assets.php, and filled at runtime in the browser by the JavaScript transclusion system (fillTemplate() in transclude.js). This variant is the annotation popFrameTemplate (set in annotations.js): it is used when an annotation is displayed inside a popup/popin, where the pop-frame itself already provides the visual container, making a blockquote wrapper redundant.

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 ("new" on desktop, "current" on mobile) for the link tooltip
tabOrWindowStringText ("window" on desktop, "tab" on mobile) for the link tooltip
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 the conditional syntax of the JavaScript template system (implemented by fillTemplate() in transclude.js — not Hakyll):

  • <[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 wrap the abstract in a blockquote following the 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