forked from ClearFoundry/ClearScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentry.html
More file actions
42 lines (41 loc) · 1.66 KB
/
entry.html
File metadata and controls
42 lines (41 loc) · 1.66 KB
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
{% if entry.id %}
{% assign title = entry.title | markdownify | strip_html %}
{% else %}
{% assign title = entry.title | markdownify %}
{% endif %}
<article class="entry h-entry">
<header class="entry-header">
<h3 class="entry-title p-name">
{% if entry.link %}
<a class="u-bookmark-of" href="{{ entry.link }}">{{ title }}</a> <a href="{{ entry.url | relative_url }}" rel="bookmark"><span class="link-arrow">→</span></a>
{% else %}
<a href="{{ entry.url | relative_url }}" rel="bookmark">{{ title }}</a>
{% endif %}
</h3>
{% if entry.image.thumbnail %}
{% assign entry_image = entry.image.thumbnail %}
{% unless entry_image contains '://' %}
{% assign entry_image = entry_image | relative_url %}
{% endunless %}
{% assign entry_image = entry_image | escape %}
<img class="entry-image u-photo" src="{{ entry_image }}" alt="">
{% endif %}
</header>
{% unless page.show_excerpts == false %}
<div class="entry-excerpt p-summary">
{% if entry.excerpt %}
{% assign read_more_text = site.data.text[site.locale].read_more | prepend: "<br/>" %}
{% capture read_more %}
<span class="more-link">{{ read_more_text }}</span>
{% endcapture %}
{{ entry.excerpt | strip | remove: "<p>" | replace: "</p>", read_more | markdownify }}
{% endif %}
</div>
{% endunless %}
{% if site.read_time or entry.date and page.layout != 'collection' %}
<footer class="entry-meta">
{% if site.read_time %}{% include read-time.html %}{% endif %}
{% if entry.date %}{% include entry-date.html %}{% endif %}
</footer>
{% endif %}
</article>