Resolute Forest Products Inc (RFP-N) Quote


].join(“”);
}
return template;
}

/**
* Generate a template for the label
* @param {String} label – the label text
* @returns {String}
*/
function displayLabel(label) {
var template = “”;
if (label === “opinion”) {
template = [

“,
“, label, ““,

“,
].join(“”);
}
return template;
}

/**
* Display “Follow”, “Following” buttons
* @param {Object} tData
* @returns {String}
*/
function displayFollowingButton(tData) {
var topicName = tData.topicName;
var topicSlug = tData.topicSlug;
var topicType = tData.topicType;
var topicImg = tData.topicImg;
var isAuthor = topicType === “author”;
var authorImg = isAuthor && topicImg
? “" + topicName + "
: “”;
var template = isAuthor ? “/authors/” : “/topics/”;
var href = window.tgam.env.baseRootAbsoluteUrl + template + topicSlug;
var linkClasses = isAuthor ? “c-topic-link c-topic-link–author” : “c-topic-link”;
return [
” “,
].join(“”);
}

/**
* Generates story card markup
* @param {Object} article – to display
* @param {Object} topicData – (topicName, topicSlug, topicType, topicVariation, topicImg)
* @param {Boolean} addFollowButton
* @returns {String} story card markup
*/
function storyCard(article, topicData, addFollowButton) {
console.info(“[ARC-6637] storyCard”, { article: article, topic: topicData });
if (!article || !topicData) {
return “”;
}
var tName = topicData.topicName;
var tType = topicData.topicType;
var tVariation = topicData.topicVariation;
var followingTopic;
var timeTemplate;
var analyticsModifier = tType + “: “;

if (addFollowButton) {
// Display a follow button beside the topic name
followingTopic = displayFollowingButton(topicData);
timeTemplate = displayDateTag(article);
}
var label = getLabel(article);
var image = getImage(article, label);
var labelTemplate = displayLabel(label);
var imageTemplate = displayImage(image);
var headline = article.headlines.basic;
var href = window.tgam.env.baseUrl + article.canonical_url;
var sophiId = article._id;

var dataAnalyticsClick = JSON.stringify({
type: “link”,
feature: “following feed”,
contentId: sophiId,
label: analyticsModifier + tName.toLowerCase() + “: ” + headline.toLowerCase(),
page: “sec:homepage:personalized feed:” + tVariation,
hierarchy: 1
});

var cardMarkup = “”;
if (!followingTopic) {
cardMarkup = [
“,

“,
” “, imageTemplate, “

1 2 3 4 5 6

Share