MCPcopy
hub / github.com/ampproject/amphtml / getLiveBlogItemWithBindAttributes

Function getLiveBlogItemWithBindAttributes

build-system/server/app.js:760–783  ·  view source on GitHub ↗

* @return {string}

()

Source from the content-addressed store, hash-verified

758 * @return {string}
759 */
760function getLiveBlogItemWithBindAttributes() {
761 const now = Date.now();
762 // Generate a 3 to 7 worded headline
763 const numOfParagraphs = range(1, 2);
764 const body = Array.apply(null, new Array(numOfParagraphs))
765 .map(() => {
766 return `<p>${bacon(range(50, 90))}</p>`;
767 })
768 .join('\n');
769
770 return `<!doctype html>
771 <html amp><body>
772 <amp-live-list id="live-blog-1">
773 <div items>
774 <div id="live-blog-item-${now}" data-sort-time="${now}">
775 <div class="article-body">
776 ${body}
777 <p> As you can see, bacon is far superior to
778 <b><span [text]='favoriteFood'>everything!</span></b>!</p>
779 </div>
780 </div>
781 </div>
782 </amp-live-list></body></html>`;
783}
784
785app.use(
786 '/examples/live-blog(-non-floating-button)?.amp.html',

Callers 1

app.jsFile · 0.85

Calls 3

rangeFunction · 0.85
nowMethod · 0.80
applyMethod · 0.80

Tested by

no test coverage detected