forked from VulcanJS/Vulcan
-
Notifications
You must be signed in to change notification settings - Fork 8
/
custom.html
220 lines (181 loc) · 7.41 KB
/
custom.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<template name="custom_post_title">
{{#if isMainPage}}
<a class="custom_post_title" title="{{this.url}}" target="_blank" href="{{this.url}}">{{custom_title}}</a>
{{else}}
<a class="custom_post_title" href="{{custom_link}}">{{custom_title}}</a>
{{/if}}
<br/>
<!-- <p class="custom_post_headline">
{{services_headline}}
</p> -->
</template>
<template name="custom_post_body">
<div class="post-body markdown" aria-live="polite">{{{makeVideo}}}</div>
</template>
<template name="custom_post_info">
<div class="{{moduleClass}}" aria-live="off">
{{#if postedAt}}<span class="post-time">{{timeAgo postedAt}}</span>{{/if}}
</div>
</template>
<!-- <template name="custom_post_info">
</template> -->
<template name="custom_post_domain">
</template>
<template name="custom_post_comments_link">
</template>
<template name="custom_post_rank">
</template>
<template name="custom_post_share">
</template>
<template name="custom_post_admin">
</template>
<template name="custom_post_thumbnail">
{{#if isEmpty services_thumbnail}}
{{#if isMainPage}}
<a target="_blank" href="{{this.url}}">
<div class="post-thumbnail-container post-thumbnail" style="background-image:url( {{services_thumbnail}} )">
<div class="post-thumbnail-loading">{{>spinner}}</div>
</div>
</a>
{{else}}
<a href="/posts/{{this._id}}/{{this.slug}}">
<div class="post-thumbnail-container post-thumbnail" style="background-image:url( {{services_thumbnail}} )">
<div class="post-thumbnail-loading">{{>spinner}}</div>
</div>
</a>
{{/if}}
{{else}}
<!-- <div class="post-thumbnail-container post-thumbnail" style="background-image:url()">
</div> -->
{{/if}}
</template>
<template name="custom_post_admin2">
{{#if isMainPage}}
<span class="{{moduleClass}} post-admin" aria-live="off">
{{#if isAdmin}}
<!-- <div class="post-admin-stats">
<span title="{{_ 'score'}}">{{{icon "score"}}} {{shortScore}} <span class="sr-only">{{_ "score"}}</span></span>
<span title="{{_ 'clicks'}}">{{{icon "clicks"}}} {{clickCount}} <span class="sr-only">{{_ "clicks"}}</span></span>
<span title="{{_ 'views'}}">{{{icon "views"}}} {{viewCount}} <span class="sr-only">{{_ "views"}}</span></span>
</div> -->
<div class="post-admin-actions">
<a href="{{pathFor 'postEdit' _id=_id}}" class="edit-link" title="{{_ 'edit'}}">{{{icon "edit"}}} <span class="sr-only">{{_ "edit"}}</span></a>
{{#if showApprove}}
<a href="#" class="approve-link" title="{{_ 'approve'}}">{{{icon "approve"}}} <span class="sr-only">{{_ "approve"}}</span></a>
{{/if}}
{{#if showReject}}
<a href="#" class="reject-link" title="{{_ 'reject'}}">{{{icon "reject"}}} <span class="sr-only">{{_ "reject"}}</span></a>
{{/if}}
<a href="#" class="delete-link" title="{{_ 'delete'}}">{{{icon "delete"}}} <span class="sr-only">{{_ "delete"}}</span></a>
</div>
{{else}}
{{#if canEdit this}}
<div class="post-admin-actions">
<a href="{{pathFor 'postEdit' _id=_id}}" class="edit-link" title="{{_ 'edit'}}">{{{icon "edit"}}} <span class="sr-only">{{_ "edit"}}</span></a>
<a href="#" class="delete-link" title="{{_ 'delete'}}">{{{icon "delete"}}} <span class="sr-only">{{_ "delete"}}</span></a>
</div>
{{/if}}
{{/if}}
</span>
{{/if}}
</template>
<!------- AVATARS -------->
<template name="custom_post_actions">
</template>
<template name="custom_post_avatars">
</template>
<template name="custom_post_discuss">
</template>
<template name="custom_post_discuss2">
<div class="post-discuss {{moduleClass}}">
<a class="discuss-link go-to-comments action" href="{{this.getPageUrl}}" title="{{_ 'discuss'}}">
{{{icon "comment"}}}
<span class="action-count">{{commentCount}}</span>
<span class="sr-only"> {{_ "comments"}}</span>
</a>
</div>
</template>
<template name="custom_post_avatars2">
<div class="post-avatars {{moduleClass}}" aria-hidden="true" aria-live="off">
<a href="{{getProfileUrl userId}}" title="{{getDisplayName userId}}" class="avatar-link avatar-small author-avatar">
{{> avatar userId=userId shape="circle"}}
</a>
{{#if commenters}}
<div class="post-commenters">
{{#each commenters}}
<a href="{{getProfileUrl this}}" title="{{getDisplayName this}}" class="avatar-link avatar-small commenter-avatar">
{{> avatar userId=this shape="circle"}}
</a>
{{/each}}
</div>
{{/if}}
</div>
</template>
<!------- USER PAGE -------->
<template name="custom_user_upvoted_posts">
<div class="user-profile-votes grid grid-module">
<!-- <h3>{{_ "upvoted_posts"}}</h3> -->
<h3>Favorites</h3>
{{> posts_list_controller arguments}}
</div>
</template>
<!------- VOTE -------->
<template name="custom_post_vote">
{{#unless isMainPage}}
<div class="post-vote {{moduleClass}}">
<div class="vote-actions {{actionsClass}}" style="padding-right:4px;">
<a class="vote-action upvote-link" href="#" title="Save to favorites">
{{{icon "best"}}}
<span class="sr-only">{{_ "upvote_"}}</span>
<span class="points">{{baseScore}}</span>
</a>
</div>
</div>
{{/unless}}
</template>
<template name="custom_post_vote2">
<span class="vote-actions {{actionsClass}}">
<a class="vote-action upvote-link" href="#" title="Save to favorites" style="background-color:#eeeeee;margin-left:1px;margin-right:4px;padding-right:4px;">
{{{icon "best"}}}
<span class="sr-only">{{_ "upvote_"}}</span>
<span class="points">{{baseScore}}</span>
</a>
</span>
</template>
<!------- SHARE -------->
<template name="custom_post_share2">
<span class="custom_share" style="margin-right:2px;">
<a class="share-option-twitter" href="//twitter.com/intent/tweet?text={{encodedTitle}}:&url={{getSiteUrl}}{{this.getPageUrl}}&hashtags=CreativeAI" target="_blank">{{{icon "twitter"}}}</a>
<a class="share-option-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{getSiteUrl}}{{this.getPageUrl}}" target="_blank">{{{icon "facebook"}}}</a>
</span>
</template>
<!------- POST CONTENT -------->
<template name="custom_post_content">
{{#if isMainPage}}
<div class="post-content {{moduleClass}}" style="font-size:1.25em;">
<div class="post-info" >
{{> modules zone="postHeading" zoneClass="post-heading" moduleData=this}}
{{> modules zone="postMeta" zoneClass="post-meta" moduleClass="post-meta-item" moduleData=this}}
<div class="btn_custom" style="margin-bottom:4px;margin-top:10px;">
{{#if haslink}}
<a style="background-color:#5898f1;padding:6px;border-radius:3px;font-weight:600;color:white;padding-left:25px;padding-right:25px;" title="{{gotolink}}" target="_blank" href="{{gotolink}}">GO TO LINK</a>
{{/if}}
{{> custom_post_vote2}}
{{> custom_post_share2}}
{{> custom_post_admin2}}
</div>
</div>
{{> modules zone="postThumbnail" moduleData=this}}
</div>
{{else}}
<div class="post-content {{moduleClass}}">
{{> modules zone="postThumbnail" moduleData=this}}
<div class="post-info">
{{> modules zone="postHeading" zoneClass="post-heading" moduleData=this}}
{{> modules zone="postMeta" zoneClass="post-meta" moduleClass="post-meta-item" moduleData=this}}
{{> custom_post_avatars2}}
{{> custom_post_discuss2}}
</div>
</div>
{{/if}}
</template>