This repository was archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtemplate.html
156 lines (139 loc) · 5.47 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!-- inject:template-content -->
{% macro translate(text) %}{% if not options.i18n[settings.language] %}{{ text }}{% elif not options.i18n[settings.language][text] %}{{ text }}{% else %}{{ options.i18n[settings.language][text] }}{% endif %}{% endmacro %}
<div data-timeline class="lb-timeline {{ settings.language }}">
{% block timeline_top %}
{% if settings.showTitle and blog.title %}
<h1>{{ blog.title }}</h1>
{% endif %}
{% if settings.showDescription and blog.description %}
<div class="description">
{{ blog.description | safe }}
</div>
{% endif %}
{% if settings.showImage and blog.picture_url %}
<img src="{{ blog.picture_url }}" />
{% endif %}
{% if settings.stickyPosition == 'top'%}
<div class="timeline-top timeline-top--loaded">
<section data-timeline-sticky class="lb-posts list-group{% if not api_response.stickyPosts._items|length %} sticky--empty{% endif %}">
{% for item in api_response.stickyPosts._items %}
{% if not item.deleted %}
{% include "template-post.html" %}
{% endif %}
{% endfor %}
</section>
</div>
{% endif %}
{% endblock %}
{% block timeline_header %}
<!-- Header -->
<div class="header-bar">
{% if not settings.hidePostOrder %}
<div class="sorting-bar">
<div class="sorting-bar__orders">
<div class="sorting-bar__dropdownBtn" data-js-sort_dropdown_button>
{% if settings.postOrder == 'editorial' %}
{{ translate("Editorial") }}
{% elif settings.postOrder == 'newest_first' %}
{{ translate("Newest first") }}
{% elif settings.postOrder == 'oldest_first' %}
{{ translate("Oldest first") }}
{% endif %}
</div>
<div class="sorting-bar__dropdownContent">
<div
class="sorting-bar__order {%if settings.postOrder == 'editorial' %}sorting-bar__order--active{% endif %}"
data-js-orderby_editorial>
{{ translate("Editorial") }}
</div>
<div
class="sorting-bar__order {%if settings.postOrder == 'newest_first' %}sorting-bar__order--active{% endif %}"
data-js-orderby_descending>
{{ translate("Newest first") }}
</div>
<div
class="sorting-bar__order {%if settings.postOrder == 'oldest_first'%}sorting-bar__order--active{% endif %}"
data-js-orderby_ascending>
{{ translate("Oldest first") }}
</div>
</div>
</div>
</div>
{% endif %}
<div class="header-bar__actions"></div>
{% if settings.hasHighlights %}
<button class="header-bar__highlight" data-js-show-highlighted><span>{{ translate('Highlights') }}</span></button>
{% endif %}
{% if settings.canComment %}
<button class="header-bar__comment" data-js-show-comment-dialog>
{{ translate("Comment") }}
</button>
{% endif %}
{% if settings.showLiveblogLogo or output.logo_url %}
{% if output.logo_url %}
<div class="header-bar__logo">
<img src="{{ output.logo_url }}"/>
</div>
{% else %}
<a class="header-bar__logo" href="https://www.liveblog.pro" target="_blank">
<span>{{ translate("Powered by") }}</span>
<img src="{{ assets_root }}images/lb-logo.svg" />
</a>
{% endif %}
{% endif %}
</div>
<!-- Header End -->
{% endblock %}
<!-- Comment -->
{% if settings.canComment %}
{% include "template-comment.html" %}
{% endif %}
<!-- Comment End -->
{% block timeline_body %}
<!-- Timeline -->
<div class="timeline-body timeline-body--loaded">
<div data-one-new-update class="lb-post new-updates mod--displaynone">
<div>{{ translate("See one new update") }}</div>
</div>
<div data-new-updates class="lb-post new-updates mod--displaynone">
<div>{{ translate("See new updates") }}</div>
</div>
{% if settings.stickyPosition == 'bottom' %}
<section data-timeline-sticky class="lb-posts list-group sticky{% if not api_response.stickyPosts._items|length %} sticky--empty{% endif %}">
{% for item in api_response.stickyPosts._items %}
{% if not item.deleted %}
{% include "template-post.html" %}
{% endif %}
{% endfor %}
</section>
{% endif %}
<div data-empty-message class="lb-post empty-message {% if api_response.posts._items|length %}mod--displaynone{% endif %}">
<div>{{ translate("No posts for now") }}</div>
</div>
<section data-timeline-normal class="lb-posts list-group normal">
{% if api_response.posts._items|length > 0 %}
{% for item in api_response.posts._items %}
{% if not item.deleted %}
{% include "template-post.html" %}
{% endif %}
{% endfor %}
{% endif %}
</section>
{% if api_response.posts._meta.max_results < api_response.posts._meta.total %}
<button data-load-more class="lb-button load-more-posts">
{{ translate("Load more posts") }}
</button>
{% endif %}
</div>
<!-- Timeline End -->
{% endblock %}
</div>
{% include "template-embed-providers.html" %}
{% if include_js_options %}
<script type="text/javascript">
window.LB = {{ json_options|safe }};
</script>
{% endif %}
<!-- endinject -->
<!-- inject:template-analytics -->
<!-- endinject -->