Page source: |
1: #set ($showMobile = false)
2: #if ($request.getParameter('showMobile').length() > 0)
3: #set ($showMobile = true)
4: #end
5:
6: ## Front Row legacy code for verions prior to 2.3
7: #if ($showMobile)
8: ##MOBILE TEMPLATE
9: $website.include("options")
10: #set ($options = $request.getAttribute("options"))
11:
12: ## DEFAULT VALUES
13: #set ($showDate = true)
14: #set ($facebookLike = false)
15: #set ($showThumb = true)
16: #set ($showCaption = true)
17: #set ($thumbWidth = 150)
18:
19: #set ($showDate = $options.get("article_show_date"))
20: #set ($facebookLike = $options.get("article_facebook_like"))
21: #set ($showThumb = $options.get("article_show_thumb"))
22: #set ($showCaption = $options.get("article_show_caption"))
23: #set ($thumbWidth = $options.get("article_mobile_thumb_width"))
24:
25: ## ADD THIS
26: #if ($page.date && $facebookLike == true)
27:
28: #end
29:
30: ## STYLES
31: <style>
32: .mobile-article iframe { max-width:100% }
33: </style>
34:
35: <div class="mobile-article">
36: ## PAGE TITLE
37: <h1>$!page.title</h1>
38:
39: #if ($showDate == true and $page.date)
40: <span class="page-date">$formatter.formatLongDate($!page.date)</span>
41: #end
42:
43: <div class="clear"></div>
44:
45: #if ($page.thumbnailURL && $showThumb == true)
46: <div class="thumb">
47: <img src="$page.thumbnailURL" alt="$!page.thumbnailPage.altText" />
48: #set ($buyPhotoURL = "")
49: #set ($buyPhotoURL = $website.storeURL($page.thumbnailPage))
50: #if ($page.thumbnailPage.buyURL && $buyPhotoURL.length() > 0)
51: <a href="$buyPhotoURL" class="buynow-button" title="Buy Now"></a>
52: #end
53: #if ($showCaption == true && $page.thumbnailPage.title.length() > 0)
54: <h5 class="thumb-title">$!page.thumbnailPage.title</h5>
55: #end
56: </div> ## ends thumb
57: #end
58:
59: ## PAGE BODY
60: $body.replace('src="//www.youtube.com', 'src="https://www.youtube.com'))
61:
62: <div class="clear"></div>
63:
64: #if ($facebookLike == true)
65: ## FACEBOOK LIKE
66: ##<div class="mobile-facebook-like">
67: ##<fb:like href="http://${request.serverName}${page.url}" show_faces="false" width="300" height="30" />
68: ##</div>
69: #end
70:
71: #if ($wiki.valid())
72: <div class="wiki">$wiki</div>
73: #end
74: </div>
75: $wiki
76:
77: #else
78:
79: #######################################
80: ## SUPPORT RESPONSIVE LAYOUT ##
81: #######################################
82:
83: #set ($ajax = false)
84: #if ($request.getParameter("ajax") == true)
85: #set ($ajax = true)
86: $website.decorate("")
87: #end
88:
89: #set ($isMobile = false)
90: #if ($browser.getIphone() || $browser.getMobile())
91: #set ($isMobile = true)
92: #end
93:
94: #set ($isFrontrow = false)
95: #if ($request.getParameter("frontrow") == true)
96: #set ($isFrontrow = true)
97: #end
98:
99: ## DEFAULT VALUES
100: #set ($layoutStyle = "standard")
101: #set ($showDate = true)
102: #set ($facebookLike = true)
103: #set ($tweetButton = true)
104: #set ($showBannerScore = true)
105: #set ($showThumb = true)
106: #set ($showVideo = true)
107: #set ($videoOverlay = true)
108: #set ($showBoxscore = true)
109: #set ($showGallery = true)
110: #set ($showCaption = true)
111: #set ($showOnlyBody = false)
112: #set ($showRelatedLinks = true)
113: #set ($headlineStyle = "h1")
114: #set ($thumbWidth = 450)
115: #set ($infiniteScroll = false)
116: #set ($shareButtons = true)
117:
118: ## PICK UP OPTIONS
119: $website.include("options")
120: #set ($options = $request.getAttribute("options"))
121:
122: ## SET VARIABLES FROM OPTIONS
123: #if ($options.get("article_layout_style") == "modern") #set ($layoutStyle = "modern") #end
124: #if ($options.get("article_layout_style") == "classic") #set ($layoutStyle = "classic") #end
125: #if ($options.get("article_layout_style") == "modern card") #set ($layoutStyle = "modern") #end
126: #if ($options.get("article_show_date") == false) #set ($showDate = false) #end
127: #if ($options.get("article_facebook_like") == false) #set ($facebookLike = false) #end
128: #if ($options.get("article_tweet_button") == false) #set ($tweetButton = false) #end
129: #if ($options.get("article_banner_score") == false) #set ($showBannerScore = false) #end
130: #if ($options.get("article_show_thumb") == false)
131: #set ($showThumb = false)
132: #set ($showVideo = false)
133: #end
134: #if ($options.get("article_show_video") == false) #set ($showVideo = false) #end
135: #if ($options.get("article_video_overlay") == false || $isMobile) #set ($videoOverlay = false) #end
136: #if ($options.get("article_show_boxscore") == false) #set ($showBoxscore = false) #end
137: #if ($options.get("article_show_gallery") == false) #set ($showGallery = false) #end
138: #if ($options.get("article_show_caption") == false) #set ($showCaption = false) #end
139: #if ($options.get("article_show_body") == true) #set ($showOnlyBody = true) #end
140: #if ($tool.math.toInteger($options.get("article_thumb_width"))) #set ($thumbWidth = $tool.math.toInteger($options.get("article_thumb_width"))) #end
141: #set ($headlineStyle = $options.get("article_headline_style"))
142:
143: ## GRAB RELATED ARTICLES
144: #set ($relatedArticles = [])
145: #set ($relatedHeadline = "")
146: #foreach ($headline in $page.headlinesFeatured)
147: #if ($headline.name == "news" && $relatedHeadline.length() == 0)
148: #set ($relatedHeadline = $headline.url)
149: #foreach ($article in $headline.allHeadlines)
150: #if ($article.contentType == "loki/tinymce" && ($article.date && $article.title.length() > 0))
151: #set ($bool = $relatedArticles.add($article))
152: #end
153: #end
154: #end
155: #end
156:
157: ## ONLY TURN ON INFINITY SCROLL WHEN THE PAGE IS A STANDALONE PAGE, AND RELATED ARTICLES FOUND IN ABOVE BLOCK
158: #if ($options.get("article_infinite_scroll") == true && !$website.isIncluded() && $relatedArticles.size() > 0)
159: #set ($infiniteScroll = true)
160: #set ($layoutStyle = "modern")
161: #end
162:
163: ## IF MOBILE TURN OFF INFINITY SCROLL
164: #if ($isMobile)
165: #set ($infiniteScroll = false)
166: #set ($layoutStyle = "classic")
167: #end
168:
169: ## IF FRONTROW TURN OFF DECORATOR, SHARE BUTTONS AND INFINITY SCROLL
170: #if ($isFrontrow)
171: $website.decorate("")
172: #set ($infiniteScroll = false)
173: #set ($shareButtons = false)
174: #end
175:
176: ## OVERRIDE OPTIONS FOR PRINTER FRIENDLY VIEW
177: #if ($request.getParameter("dec") == "printer-decorator")
178: #set ($infiniteScroll = false)
179: #set ($layoutStyle = "standard")
180: #set ($thumbWidth = 450)
181: #set ($showRelatedLinks = false)
182: #set ($facebookLike = false)
183: #set ($tweetButton = false)
184: #end
185:
186: ## WHEN THE FOLLOWING ATTRIBUTE IS SET, TURN OFF THE RELATED LINKS
187: #if ($request.getAttribute("disable_related_links") == "y")
188: #set ($showRelatedLinks = false)
189: #end
190:
191: #if ($showOnlyBody == true)
192:
193: $body
194:
195: #else
196:
197: #set ($relatedPages = $page.relatedInSchedule)
198: #set ($hasSidebar = false)
199: #set ($boxscores = [])
200: #set ($relatedVideo = "")
201: #set ($relatedVideoType = "")
202: #set ($relatedGallery = "")
203:
204: #if ($relatedPages.size() > 0)
205: #foreach ($related in $relatedPages)
206: #if ($showBoxscore)
207: #if ($related.contentType.startsWith("statcrew") && $related.mapType == "BS" && $website.exists($related.url))
208: #set ($r = $boxscores.add($related.url))
209: #set ($hasSidebar = true)
210: #end
211: #end
212:
213: #if ($showVideo)
214: #if (($related.contentType == "video/x-flv" || $related.contentType == "loki/video" || $related.contentType == "loki/youtube") && $related.id != $page.id && $website.exists($related.url) && $relatedVideo.length() == 0)
215: #if ($related.contentType == "video/x-flv")
216: #set ($relatedVideo = "${related.url}?dec=")
217: #set ($relatedVideoType = "video/x-flv")
218: #elseif ($related.contentType == "loki/video")
219: #set ($relatedVideo = "${related.url}?dec=")
220: #set ($relatedVideoType = "video/mp4")
221: #else
222: #set ($relatedVideo = "${related.dataAsString}")
223: #set ($relatedVideoType = "video/youtube")
224: #end
225:
226: ## VIDEOJS PLAYER CSS
227: $website.addCss($website.cdn("/info/videojs/css/video-js.min.css"))
228: #end
229: #end
230:
231: #if ($showGallery)
232: #if ($related.mapType == "GA" && !$website.isExternalLink($related.url) && $website.exists($related.url))
233: #set ($relatedGallery = $related)
234: #end
235: #end
236: #end
237: #end
238:
239: ## MACROS
240: #macro (printSidebar)
241: #if ($hasSidebar)
242: <div class="sidebar">
243: ## GLOBAL ADS SERVER
244: #if ($website.ads.isAdvertisingEnabled('ARTICLES'))
245: $website.includeAgain("global-adserver-slots?adSlot=articles_sidebar")
246: #end
247:
248: #foreach ($boxscore in $boxscores)
249: #set ($includeURL = "${boxscore}?tmpl=brief-stats-template")
250: #if ($showBannerScore)
251: #set ($includeURL = "${includeURL}&showLinescore=false")
252: #end
253: #if ($foreach.count > 1)
254: <br />
255: #end
256: <div class="widget">
257: $website.includeAgain("${includeURL}")
258: <a href="${boxscore}" class="more">full stats</a>
259: </div>
260: #end
261: </div>
262: #end
263: #end ## printSidebar
264:
265: ## PAGE TITLE
266: #macro (printTitle)
267: #if ($page.title.length() > 0)
268: #if ($headlineStyle == "none")
269: <div class="article-title">$!page.title</div>
270: #else
271: <${headlineStyle} class="article-title">$!page.title</${headlineStyle}>
272: #end
273: #end
274: #end ## printTitle
275:
276: ## PAGE DATE
277: #macro (printDate)
278: #if ($page.date && $showDate)
279: <div class="article-date">
280: <div class="date">Posted: $formatter.formatDate($page.date, "MMM dd, yyyy")</div>
281: #* DISABLED 01/03/2024 DUE TO ADDTHIS MODULE BEING DEPRICATED
282: #if ($shareButtons && ($facebookLike || $tweetButton))
283: <div class="like-buttons" data-module="share-buttons">
284: #if ($facebookLike)
285: <div class="fb-like-btn"><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a></div>
286: #end
287: #if ($tweetButton)
288: <div class="tweet-btn"><a class="addthis_button_tweet"></a></div>
289: #end
290: </div>
291: #end
292: *#
293:
294: </div>
295: #end
296: #end ## printDate
297:
298: ## ARTICLE THUMBNAIL
299: #macro (printThumbnail)
300: #if (!$videoOverlay && $relatedVideo.length() > 0)
301: <div class="article-image" style="width:${thumbWidth}px">
302: <div data-module="init-video" data-file="$relatedVideo" data-type="$relatedVideoType" data-image="$!page.thumbnailURL"></div>
303: </div>
304: #else
305: #if ($showThumb && $page.thumbnailURL)
306: #set ($buyPhotoURL = "")
307: #set ($buyPhotoURL = $website.storeURL($page.thumbnailPage))
308:
309: #set ($thumbSrc = $page.thumbnailURL)
310: #if ($layoutStyle == "standard" || ($layoutStyle == "classic" && !$hasSidebar))
311: #set ($thumbSrc = "${thumbSrc}?max_width=${thumbWidth}")
312: #end
313:
314: <div class="article-image">
315: <div class="image">
316:
317: #if ($page.thumbnailPage.altText.length() > 0)
318: <img src="$thumbSrc" alt="$page.thumbnailPage.altText" />
319: #else
320: <img src="$thumbSrc" alt="$!page.title" />
321: #end
322:
323: #if ($page.thumbnailPage.buyURL && $buyPhotoURL.length() > 0)
324: <a href="$buyPhotoURL" class="buynow-btn">Buy Now</a>
325: #end
326:
327: #if ($showCaption == true && $page.thumbnailPage.title.length() > 0)
328: <div class="thumb-caption">$page.thumbnailPage.title</div>
329: #end
330:
331: #if ($relatedVideo.length() > 0)
332: <a href="${relatedVideo}" class="play-btn" data-module="init-video" data-module-binding="always" data-trigger="true" data-overlay="true" data-file="$relatedVideo" data-type="$relatedVideoType">Play Video</a>
333: #end
334: </div>
335: </div>
336: #end
337: #end
338: #end ## printThumbnail
339:
340: ## ARIA LABEL FOR RELATED LINK
341: #macro (printLinkAriaLabel $event $label)
342: #if (!$event)
343: #set ($ariaLabel = $label)
344: #else
345: #set ($ariaLabel = "${event.sport} event: ${formatter.formatDate($event.date, 'MMMM d hh:mm a:')}")
346: #if ($event.neutralSite.length() > 0 || $event.home)
347: #set ($vsOrAt = "vs.")
348: #else
349: #set ($vsOrAt = "at")
350: #end
351: #if ($event.teams.size() > 1)
352: #set ($ariaLabel = "${ariaLabel} ${event.teams.get(0).name} ${vsOrAt} ${event.teams.get(1).name}:")
353: #elseif ($event.teams.size() == 1)
354: #set ($ariaLabel = "${ariaLabel} ${event.teams.get(0).name}:")
355: #end
356: #if ($event.neutralSite.length() > 0)
357: #set ($ariaLabel = "${ariaLabel} @ ${event.neutralSite}:")
358: #end
359: #set ($ariaLabel = "${ariaLabel} ${label}")
360: #end
361: aria-label="$ariaLabel"
362: #end
363:
364: ## RELATED LINKS
365: #macro (printRelatedLinks)
366: #if ($showRelatedLinks && $relatedPages.size() > 0)
367: #set ($printedLinks = {})
368: #set ($eventLinks = [])
369: #set ($relatedEvents = $page.schedule.getEventsWithLink($page.url))
370: #if (!$relatedEvents.isEmpty())
371: #set ($relatedEvent = $relatedEvents[0])
372: #if (!$relatedEvent.links.isEmpty())
373: #set ($eventLinks = $relatedEvent.links)
374: #end
375: #end
376: $request.setAttribute("disable_related_links", "y")
377: <div class="related-links" data-module="jscroll" data-momentum="false">
378: <div>
379: <ul class="clearfix">
380: #foreach ($related in $relatedPages)
381: #if ($related.id != $page.id)
382: <li>
383: #set ($linkText = $related.mapLabel)
384: #set ($linkUrl = $related.url)
385: #set ($linkMapType = $related.mapType)
386: #set ($linkFound = false)
387: #if (!$eventLinks.isEmpty())
388: #set ($link = $eventLinks[0])
389: #foreach ($l in $eventLinks)
390: #if ($related.url == $l.url)
391: #set ($link = $l)
392: #set ($linkFound = true)
393: #end
394: #end
395: #end
396: #if ($linkFound == true)
397: #set ($linkText = $link.name)
398: #set ($linkUrl = $link.url)
399: #set ($linkMapType = $link.mapType)
400: #end
401: #set ($linkTypeCounter = 1)
402: #set ($linkTypeLabel = $linkText)
403: #if ($printedLinks.containsKey("${$linkText}"))
404: #set ($linkTypeCounter = $printedLinks.get("${linkText}") + 1)
405: #set ($linkTypeLabel = "$linkTypeLabel ${linkTypeCounter}")
406: #end
407: #set ($ignore = $printedLinks.put($linkText, $linkTypeCounter))
408:
409: <a #printLinkAriaLabel($relatedEvent, $linkTypeLabel) href="$linkUrl" #if ($website.isExternalLink($linkUrl))target="_blank"#end>
410: <span class="gicon-${linkMapType.toLowerCase()}"></span>
411: ${linkText}
412: </a>
413: </li>
414: #end
415: #end
416: </ul>
417: </div>
418: </div>
419: #end
420: #end ## printRelatedLinks
421:
422: #macro (printRelatedArticles)
423: #set ($relatedArticles = $tool.sorter.sort($relatedArticles, "date:desc"))
424: <div class="rel-articles">
425: <div class="container">
426: #foreach ($article in $relatedArticles)
427: <div #if ($article.url == $page.url) class="preview active loaded" #else class="preview" #end>
428: <div class="thumb">
429: #if ($article.thumbnailURL)
430: <img data-src="$article.thumbnailURL?max_width=280&max_height=160&crop=true" alt="$!article.title" class="lazyload" />
431: #else
432: <img data-src="/images/setup/thumbnail_default.jpg?max_width=280&max_height=160&crop=true" alt="$!article.title" class="lazyload" />
433: #end
434: </div>
435: <div class="info">
436: <span class="date">$formatter.formatLongDate($article.date)</span>
437: <a href="$article.url" class="title">$article.title</a>
438: </div>
439: </div>
440: #end
441: </div>
442: </div>
443: #end ## printRelatedArticles
444:
445: #macro (printArticleLayout)
446:
447: #set ($sidebarClass = "no-sidebar")
448: #if ($hasSidebar)
449: #set ($sidebarClass = "has-sidebar")
450: #end
451:
452: <div class="rich-v2 ${layoutStyle} ${sidebarClass} clearfix" data-module="article-rich" data-title="$!page.title" data-url="$page.url">
453:
454: ## RELATED LINKS
455: #printRelatedLinks
456:
457: ## PAGE TITLE
458: #printTitle
459:
460: ## BANNER SCORE
461: #if ($showBannerScore && $boxscores.size() > 0)
462: #foreach ($boxscore in $boxscores)
463: <div class="banner-score">$website.include("${boxscore}?tmpl=brief-stats-template&showLinescore=true&extended=false")</div>
464: #end
465: #end
466:
467: ## BANNER IMAGE
468: #if ($layoutStyle == "modern")
469: #printThumbnail
470: #end
471:
472: <div class="article-body clearfix">
473:
474: #if ($layoutStyle == "modern")
475: #if (!$isMobile)
476: #printSidebar
477: #end
478:
479: #elseif ($layoutStyle == "classic")
480: #if (!$isMobile)
481: #printSidebar
482: #end
483:
484: #printThumbnail
485:
486: #elseif ($layoutStyle == "standard")
487: #printThumbnail
488:
489: #if (!$isMobile)
490: #printSidebar
491: #end
492: #end
493:
494: <div class="article-text">
495:
496: ## PAGE DATE
497: #printDate
498:
499: ## ARTICLE BODY
500: $body
501:
502: ## ARTICLE FOOTER
503: #if (!$request.getAttribute("disable_article_footer"))
504: <div class="article-footer clearfix">$website.include("article-footer")</div>
505: #end
506:
507: ## SHARE BUTTONS
508: #if ($shareButtons && $infiniteScroll && !$website.isIncluded())
509: $!request.setAttribute("showBookmark", false)
510: $website.include("share-buttons")
511: #end
512:
513: </div>
514:
515: ## SIDEBAR (for mobile print here)
516: #if ($isMobile)
517: #printSidebar
518: #end
519:
520: </div> ## article-body
521:
522: #if ($isMobile)
523: #printRelatedLinks
524: #end
525:
526: ## RELATED PHOTO GALLERY
527: #if ($relatedGallery.url)
528: #set ($photos = $relatedGallery.allHeadlines)
529: #if ($photos.size() > 0)
530: <div class="related-gallery">
531: <h2 class="related-title">Related Photos</h2>
532: <div class="photos">
533: <div class="photo-slider" data-module="jscroll" data-snap=".item" data-show-prev-next="true" data-show-buttons="true">
534: <div>
535: #foreach ($photo in $photos)
536: #set ($imgAlt = "")
537: #if ($photo.altText.length() > 0)
538: #set ($imgAlt = $photo.altText)
539: #elseif ($photo.title.length() > 0)
540: #set ($imgAlt = $photo.title)
541: #else
542: #set ($imgAlt = "Photo for $page.title image $velocityCount")
543: #end
544: <div class="item">
545: <a href="${relatedGallery.url}"><img data-src="${photo.url}?max_height=140" alt="$!{imgAlt}" class="lazyload" /></a>
546: </div>
547: #end
548: </div>
549: </div>
550: </div>
551: </div>
552: #end
553: #end
554:
555: $wiki
556:
557: </div> ## rich-v2
558:
559: ## GLOBAL ADS SERVER
560: #if ($website.ads.isAdvertisingEnabled('ARTICLES'))
561: $website.includeAgain("global-adserver-slots?adSlot=articles")
562: #end
563:
564: #end ## printArticleLayout
565:
566: ######### END MACROS ####################
567:
568: #if ($infiniteScroll && !$ajax)
569: $!request.setAttribute("pageClass", "release-page")
570: <div class="infinite-articles" data-module="infinite-articles">
571: <div class="articles">
572: #printArticleLayout
573: </div>
574:
575: #printRelatedArticles
576: </div>
577: #else
578: #printArticleLayout
579: #end
580:
581: #end ## ends only-body check
582: #end ## showMobile check
583:
584: $!request.setAttribute("icl-videojs-script", true)
585: $!request.setAttribute("icl-videojs-flash-script", true)
|