tweet-blockquote-not.tmpl
Path: template/include/tweet-blockquote-not.tmpl | Language: HTML5/Pandoc | Lines: ~19
Template fragment for rendering tweet content without a blockquote wrapper.
Overview
This template generates the HTML structure for displaying Twitter/X post content in popups and transclusions without using a <blockquote> element. Instead, it uses a semantic <div> wrapper, which is appropriate when the tweet is being presented as informational content rather than as a direct quotation.
The template creates a structured layout with author attribution, timestamp, and links, followed by the tweet content. It includes rich metadata such as link targets, icon metadata for styling, and archived URL references. The "not" variant (no blockquote) is used when the context doesn't require citation semantics, such as when displaying tweets as informational annotations or previews.
This template is part of the annotation system pipeline: Annotation.hs scrapes tweet data, LinkMetadata.hs manages the annotation database, and content.js + extracts.js render the populated template in the browser.
Template Variables
contentTypeClass- CSS class for content type styling (e.g.,content-transform-tweet)authorLinkClass- CSS class for the author link elementauthorLinkHref- URL to the author's Twitter/X profile (defined but not used by the current template)titleLinkHref- URL destination for the title link (often same as tweet URL)whichTab- Text describing tab behavior (e.g., "a new", "the same")tabOrWindow- Text "tab" or "window"linkTarget- HTML target attribute value (e.g.,_blank,_self)authorLinkIconMetadata- Data attributes for icon/avatar stylingauthorPlusAvatar- Author name with avatar imagetweetLinkClass- CSS class for the tweet timestamp linktweetLinkHref- URL to the specific tweetarchivedTweetURLDataAttribute- Data attribute containing archived tweet URLtweetLinkIconMetadata- Data attributes for link icon stylingtweetDate- Formatted date/time of the tweettweetContent- The main body content of the tweet
Output Structure
The template produces this structure:
<div class="content-transform [type-class]">
<p class="data-field tweet-links">
<a class="[author-class]"
title="Open <title-url> in [which] [tab/window]"
href="[title-url]"
target="[target]"
[icon-metadata]
>[author+avatar]</a> on <a
class="[tweet-class]"
title="Open <tweet-url> in [which] [tab/window]"
href="[tweet-url]"
[archived-url-data]
[icon-metadata]
>[date]</a>
</p>
<div class="data-field tweet-content">[tweet body]</div>
</div>
The layout emphasizes attribution (author and timestamp links) followed by content. The data-field classes enable JavaScript targeting for dynamic behavior like link rewriting or content updates.
Template caveats: The author link currently uses titleLinkHref (not authorLinkHref). The tweet link title placeholder in the template is malformed (<<{tweetLinkHref>>), so it does not interpolate as documented.
See Also
- tweet-blockquote-outside.tmpl - Variant with blockquote wrapper for citation contexts
- annotation-blockquote-not.tmpl - Similar "no-blockquote" pattern for annotations
- Annotation.hs - Scrapes tweet metadata and content from Twitter/X
- LinkMetadata.hs - Manages annotation database and metadata
- extracts.js - Displays popup/transclude content
- popups.js - Popup positioning and rendering
- content.js - Content type routing and template selection