MCPcopy Index your code
hub / github.com/writefreely/writefreely / displayNoPosts

Function displayNoPosts

static/js/posts.js:316–326  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

314var hasWritten = H.get('lastDoc', '') !== '';
315
316var displayNoPosts = function() {
317 if (auth) {
318 $posts.el.innerHTML = '';
319 return;
320 }
321 var cta = '<a href="/pad">Create a post</a> and it\'ll appear here.';
322 if (hasWritten) {
323 cta = '<a href="/pad">Finish your post</a> and it\'ll appear here.';
324 }
325 H.getEl("posts").el.innerHTML = '<p class="status">No posts created yet.</p><p class="status">' + cta + '</p>';
326};
327
328if (posts.length == 0) {
329 displayNoPosts();

Callers 2

delPostFunction · 0.85
posts.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected