-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.html
60 lines (48 loc) · 2.19 KB
/
template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!-- Template Variables
title: The title of the article
preferred_link: The best link to associate with the article for linking out.
external_link_label: A localized label for the external link.
external_link_stripped: The external link minus the scheme. Useful for displaying the external link.
external_link: The external link of the article if there is one provided by the author.
feed_link_title: The name of the feed associated with this article.
feed_link: The URL of the feed associated with this article.
byline: HTML that combines all the authors and links to them if available.
avatar_src: The image source URL for the feed icon / avatar.
dateline_style: Either "articleDateline" or "articleDatelineTitle" depending on if the title was populated or not.
datetime_long: Long version of a combined publish date and time.
datetime_medium: Medium length version of a combined publish date and time.
datetime_short: Short version of a combined publish date and time.
date_long: Long version of the publish date.
date_medium: Medium version of the publish date.
date_short: Long version of the publish date.
time_long: Long version of the publish time.
time_medium: Medium version of the publish time.
time_short: Long version of the publish time.
text_size_class: The size class that the user has selected in Preferences for article text.
body: The body of the article.
-->
<header class="feedHeader">
<h1 class="articleTitle">
<a href="[[preferred_link]]">[[title]]</a>
</h1>
<div class="meta">
<p>
<a class="dateTime" href="[[preferred_link]]">[[datetime_medium]]</a>
</p>
<p class="[[dateline_style]] byline">
<span class="author">[[byline]]</span>
<a class="feedLink" href="[[feed_link]]">[[feed_link_title]]</a>
</p>
</div>
</header>
<article>
<div id="bodyContainer" class="articleBody [[text_size_class]]">[[body]]</div>
<div class="externalLink"><a href="[[external_link]]">[[external_link]]</a></div>
</article>
<script type="text/javascript">
let externalLinkElement = document.body.getElementsByClassName('externalLink')[0].querySelectorAll('a')[0];
if (externalLinkElement.innerText != '') {
let host = externalLinkElement.hostname;
externalLinkElement.innerHTML = host;
}
</script>