forked from cheeaun/hackerweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
templates.js
1 lines (1 loc) · 4.62 KB
/
templates.js
1
(function(a){TEMPLATES={"comments-toggle":new a({code:function(a,b,c){var d=this;d.b(c=c||"");d.b('<button class="comments-toggle">');d.b(d.v(d.f("comments_count",a,b,0)));d.b(" ");d.b(d.v(d.f("i_reply",a,b,0)));d.b("</button>");return d.fl()},partials:{},subs:{}}),comments:new a({code:function(a,b,c){var d=this;d.b(c=c||"");if(d.s(d.f("comments",a,b,1),a,b,0,13,130,"{{ }}")){d.rs(a,b,function(a,b,c){c.b('<li><p class="metadata"><b>');c.b(c.v(c.f("user",a,b,0)));c.b("</b> <time>");c.b(c.v(c.f("time_ago",a,b,0)));c.b("</time></p><p>");c.b(c.t(c.f("content",a,b,0)));c.b("<ul>");c.b(c.rp("<comments_list0",a,b,""));c.b("</ul></li>")});a.pop()}return d.fl()},partials:{"<comments_list0":{name:"comments_list",partials:{},subs:{}}},subs:{}}),"post-comments":new a({code:function(a,b,c){var d=this;d.b(c=c||"");d.b('<div class="post-content"><header><h1><a href="');d.b(d.v(d.f("url",a,b,0)));d.b('" target="_blank">');d.b(d.v(d.f("title",a,b,0)));d.b("<br>");if(d.s(d.f("user",a,b,1),a,b,0,94,157,"{{ }}")){d.rs(a,b,function(a,b,c){if(c.s(c.f("domain",a,b,1),a,b,0,105,146,"{{ }}")){c.rs(a,b,function(a,b,c){c.b('<span class="link-text">');c.b(c.v(c.f("domain",a,b,0)));c.b("</span>")});a.pop()}});a.pop()}d.b('</a></h1><p class="metadata">');if(d.s(d.f("user",a,b,1),a,b,0,204,399,"{{ }}")){d.rs(a,b,function(a,b,c){c.b('<span class="inline-block">');c.b(c.v(c.f("points",a,b,0)));c.b(" ");c.b(c.v(c.f("i_point",a,b,0)));c.b(" by ");c.b(c.v(c.f("user",a,b,0)));c.b('</span> <span class="inline-block">');c.b(c.v(c.f("time_ago",a,b,0)));if(c.s(c.f("comments_count",a,b,1),a,b,0,331,373,"{{ }}")){c.rs(a,b,function(a,b,c){c.b(" · ");c.b(c.v(c.f("comments_count",a,b,0)));c.b(" ");c.b(c.v(c.f("i_comment",a,b,0)))});a.pop()}c.b("</span>")});a.pop()}if(!d.s(d.f("user",a,b,1),a,b,1,0,0,"")){d.b('<span class="inline-block">');d.b(d.v(d.f("time_ago",a,b,0)));d.b("</span>")}d.b('<a href="');d.b(d.v(d.f("hn_url",a,b,0)));d.b('" target="_blank" class="external-link">');d.b(d.v(d.f("short_hn_url",a,b,0)));d.b("</a></p></header>");if(d.s(d.f("has_content",a,b,1),a,b,0,580,879,"{{ }}")){d.rs(a,b,function(a,b,c){c.b('<section class="grouped-tableview">');c.b(c.t(c.f("content",a,b,0)));if(c.s(c.f("has_poll",a,b,1),a,b,0,641,856,"{{ }}")){c.rs(a,b,function(a,b,c){c.b('<ul class="poll">');if(c.s(c.f("poll",a,b,1),a,b,0,667,842,"{{ }}")){c.rs(a,b,function(a,b,c){c.b('<li><span class="poll-details"><b>');c.b(c.v(c.f("item",a,b,0)));c.b('</b> <span class="points">');c.b(c.v(c.f("points",a,b,0)));c.b(" ");c.b(c.v(c.f("i_point",a,b,0)));c.b('</span></span><div class="poll-bar"><span style="width: ');c.b(c.v(c.f("width",a,b,0)));c.b('"></span></div></li>')});a.pop()}c.b("</ul>")});a.pop()}c.b("</section>")});a.pop()}d.b('</div><section class="comments">');if(d.s(d.f("has_comments",a,b,1),a,b,0,944,971,"{{ }}")){d.rs(a,b,function(a,b,c){c.b("<ul>");c.b(c.rp("<comments_list0",a,b,""));c.b("</ul>")});a.pop()}d.s(d.f("has_comments",a,b,1),a,b,1,0,0,"")||d.b('<p class="no-comments">No comments.</p>');d.b("</section>");return d.fl()},partials:{"<comments_list0":{name:"comments_list",partials:{},subs:{}}},subs:{}}),post:new a({code:function(a,b,c){var d=this;d.b(c=c||"");d.b('<li id="story-');d.b(d.v(d.f("id",a,b,0)));d.b('" class="post-');d.b(d.v(d.f("type",a,b,0)));d.b('"><a href="');d.b(d.v(d.f("url",a,b,0)));d.b('" ');if(d.s(d.f("disclosure",a,b,1),a,b,0,77,93,"{{ }}")){d.rs(a,b,function(a,b,c){c.b('class="pad-right')});a.pop()}d.b('"><div class="number">');d.b(d.v(d.f("i",a,b,0)));d.b('.</div><div class="story"><b>');d.b(d.v(d.f("title",a,b,0)));d.b("</b>");if(d.s(d.f("user",a,b,1),a,b,0,186,478,"{{ }}")){d.rs(a,b,function(a,b,c){c.b('<span class="metadata">');if(c.s(c.f("domain",a,b,1),a,b,0,220,265,"{{ }}")){c.rs(a,b,function(a,b,c){c.b('<span class="link-text">');c.b(c.v(c.f("domain",a,b,0)));c.b("</span><br>")});a.pop()}c.b('<span class="inline-block">');c.b(c.v(c.f("points",a,b,0)));c.b(" ");c.b(c.v(c.f("i_point",a,b,0)));c.b(" by ");c.b(c.v(c.f("user",a,b,0)));c.b('</span> <span class="inline-block">');c.b(c.v(c.f("time_ago",a,b,0)));if(c.s(c.f("comments_count",a,b,1),a,b,0,403,445,"{{ }}")){c.rs(a,b,function(a,b,c){c.b(" · ");c.b(c.v(c.f("comments_count",a,b,0)));c.b(" ");c.b(c.v(c.f("i_comment",a,b,0)))});a.pop()}c.b("</span></span>")});a.pop()}if(!d.s(d.f("user",a,b,1),a,b,1,0,0,"")){d.b('<span class="metadata"><span class="inline-block">');d.b(d.v(d.f("time_ago",a,b,0)));d.b("</span></span>")}d.b("</div></a>");if(d.s(d.f("disclosure",a,b,1),a,b,0,606,673,"{{ }}")){d.rs(a,b,function(a,b,c){c.b('<a href="#/item/');c.b(c.v(c.f("id",a,b,0)));c.b('" class="detail-disclosure"><span></span></a>')});a.pop()}d.b("</li>");return d.fl()},partials:{},subs:{}})}})(Hogan.Template)