| Page source: |
1: <script src="${website.cdn("/info/klass.min.js")}"></script>
2:
3: #set ($fromHeadlines = false)
4: #if ($request.getParameter("from_headlines") == true)
5: #set ($fromHeadlines = true)
6: #end
7:
8: ## PICK UP OPTIONS
9: $website.include("options")
10: #set ($options = $request.getAttribute("options"))
11: #set ($locale = "en_us")
12: #set ($locale = $options.get("locale"))
13:
14: ## HACK TO GET STATS URL FROM RENDERER... NEEDS SERVER CHANGE
15: #set ($bioObject = $page.getDataAsObject())
16: #set ($statsURL = $bioObject.statsURL)
17: #if ($statsURL.length() > 0)
18: $website.includeAgain("${statsURL}?tmpl=bio-stats-template")
19: ## various settings to get the variables set
20: #set ($events = $request.getAttribute("bio_events"))
21: #set ($seasons = $request.getAttribute("bio_seasons"))
22: #set ($career = $request.getAttribute("bio_career"))
23: #set ($labels = $request.getAttribute("bio_labels"))
24: #set ($briefs = $request.getAttribute("bio_briefs"))
25: #set ($gamelogs = $request.getAttribute("bio_gamelogs"))
26: #set ($splits = $request.getAttribute("bio_splits"))
27: #set ($statPosition = $request.getAttribute("bio_position"))
28: #set ($positions = $request.getAttribute("bio_positions"))
29: #set ($playerId = $request.getAttribute("bio_player_id"))
30: #set ($highlights = $request.getAttribute("bio_highlights"))
31: #set ($formats = $request.getAttribute("bio_formats"))
32: #set ($gamelogsCategoriesLabels = $request.getAttribute("bio_gamelogs_labels"))
33: #set ($briefsCategoriesLabels = $request.getAttribute("bio_briefs_labels"))
34: #set ($gamesResults = $request.getAttribute("bio_games_results"))
35: #set ($monthsPlayed = $request.getAttribute("bio_months_played"))
36: #set ($rosterTransactions = $request.getAttribute("roster_transactions"))
37: #end
38:
39: #set ($pos = "")
40: #if($attributes.get("position_stat"))
41: #set ($pos = $attributes.get("position_stat"))
42: #else
43: #set ($pos = $attributes.get("position"))
44: #set ($pos = $statPosition)
45: #set ($posVec = $pos.split("/"))
46: #set ($pos = $posVec[0])
47: #end
48: #set ($pos = $pos.toLowerCase())
49: #set ($statPos = $positions.get($pos))
50: #set ($paramPos = $request.getParameter("pos"))
51:
52: #set ($playerId = $attributes.get("playerId"))
53: #set ($stats = $splits.overall)
54: #set ($highlights = $highlights.get($statPos))
55:
56: #set ($showHighlights = true)
57: #if ($options.get("bio_show_highlights") && $options.get("bio_show_highlights") == false)
58: #set ($showHighlights = false)
59: #end
60:
61: #set ($enhancedLayout = false)
62: #if ($options.get("bio_enhanced_layout") == "yes" || $request.getParameter("bio_enhanced_layout") == true || $request.getAttribute("enhanced") == "true")
63: #set ($enhancedLayout = true)
64: #elseif($request.getParameter("bio_enhanced_layout") == false || $request.getAttribute("enhanced") == "false")
65: #set ($enhancedLayout = false)
66: #end
67:
68: #set ($showActionShots = true)
69: #if ($options.get("bio_show_action_shots") && $options.get("bio_show_action_shots") == false)
70: #set ($showActionShots = false)
71: #end
72:
73: #set ($showDate = true)
74: #if ($options.get("news_layout_show_date") == "no")
75: #set ($showDate = false)
76: #end
77:
78: #set ($showLeadin = true)
79: #if ($options.get("news_layout_show_leadin") == "no")
80: #set ($showLeadin = false)
81: #end
82:
83: #set ($dateFormat = "MMMM dd, yyyy")
84: #if ($options.get("site_date_format").length() > 0) #set ($dateFormat = $options.get("site_date_format")) #end
85:
86: #set ($thumbnail-orientation = "ratio ratio-16x9 ratio-adaptive")
87: #if ($options.get("news_thumbnail_orientation") == "portrait") ## default view from options
88: #set ($thumbnail-orientation = "ratio ratio-3x4")
89: #elseif ($options.get("news_thumbnail_orientation") == "landscape")
90: #set ($thumbnail-orientation = "ratio ratio-16x9")
91: #elseif ($options.get("news_thumbnail_orientation") == "adaptive")
92: #set ($thumbnail-orientation = "embed-responsive-adaptive")
93: #elseif ($request.getParameter("thumbnail_orientation") == "portrait") ## default view from include parameter
94: #set ($thumbnail-orientation = "ratio ratio-3x4")
95: #end
96:
97: #set ($showThumb = true)
98: #if ($options.get("news_layout_show_thumb") == "no")
99: #set ($showThumb = false)
100: #end
101: #set ($thumbWidth = 767)
102:
103: #set ($actionShotsLimit = 5)
104: #set ($actionShotsLimit = $tool.math.toInteger($options.get("bio_action_shots_limit")))
105:
106: #set ($showCareer = $wiki.valid() && $seasons)
107: #if ("yes" == $options.get("stats_show_career") && $seasons)
108: #set ($showCareer = true)
109: #end
110:
111: #set ($hasEvents = $events.size() > 0)
112: #set ($hasSynopsis = $synopsis.trim().length() > 0)
113: #set ($htmlStatsURL = "${page.url}-stats")
114: #set ($hasHTMLStats = $website.exists($htmlStatsURL))
115: #set ($bioBriefURL = "${page.url}-brief")
116: #set ($hasBioBrief = $website.exists("$bioBriefURL"))
117: #set ($showRoster = ($page.contentType == "loki/bio" && $page.headlinesFeatured.size() > 0) || ($page.contentType == "loki/bio-network" && $page.sectionPage.children.size() > 1))
118: #if ($options.get("bio_hide_roster") == true)
119: #set ($showRoster = false)
120: #end
121:
122: #if ($hasEvents)
123: $request.setAttribute("icl-dataTables-script", true)
124: #end
125:
126: #set ($view = "")
127: #if ($hasSynopsis || $hasBioBrief)
128: #set ($view = "bio")
129: #elseif ($statsURL.length() > 0)
130: #set ($view = "profile")
131: #elseif ($hasHTMLStats)
132: #set ($view = "htmlstats")
133: #elseif ($releases.size() > 0)
134: #set ($view = "news")
135: #elseif ($playerPhotos.size() > 0)
136: #set ($view = "photos")
137: #elseif ($playerVideos.size() > 0)
138: #set ($view = "videos")
139: #end
140:
141: #if ($options.get("bio_default_view").length() > 0)
142: #set ($checkView = $options.get("bio_default_view"))
143: #else
144: ## THIS ESTABLISHES A DEFAULT TAB FOR NEW BOOTSTRAP THEMES
145: #if ($hasSynopsis || $hasBioBrief)
146: #set ($checkView = "bio")
147: #elseif ($statsURL.length() > 0)
148: #set ($checkView = "profile")
149: #elseif ($releases.size() > 0)
150: #set ($checkView = "news")
151: #end
152: #end
153:
154: #if ($request.getParameter("view"))
155: #set ($checkView = $request.getParameter("view"))
156: #end
157:
158: #if ($checkView == "profile" && $statsURL.length() > 0)
159: #set ($view = "profile")
160: #elseif ($checkView == "bio" && ($hasSynopsis || $hasBioBrief))
161: #set ($view = "bio")
162: #elseif ($checkView == "gamelog" && $statsURL.length() > 0)
163: #set ($view = "gamelog")
164: #elseif ($checkView == "career" && $showCareer)
165: #set ($view = "career")
166: #elseif ($checkView == "splits" && $statsURL.length() > 0)
167: #set ($view = "splits")
168: #elseif ($checkView == "htmlstats" && $hasHTMLStats)
169: #set ($view = "htmlstats")
170: #elseif ($checkView == "news" && $releases.size() > 0)
171: #set ($view = "news")
172: #elseif ($checkView == "photos" && $playerPhotos.size() > 0)
173: #set ($view = "photos")
174: #elseif ($checkView == "videos" && $playerVideos.size() > 0)
175: #set ($view = "videos")
176: #elseif ($checkView == "weplayed")
177: #set ($view = "weplayed")
178: #end
179:
180: #***********************************************
181: # MACROS
182: # *********************************************#
183: #macro (capitalize $name)
184: $name.substring(0,1).toUpperCase()$name.substring(1).toLowerCase()
185: #end
186:
187: #macro (printTitle)
188: #set ($pageTitle = "Bio")
189: #if ($page.title.trim().length() > 0)
190: #set ($pageTitle = $page.title.trim())
191: #end
192:
193: #if ($fromHeadlines || !$website.isIncluded())
194: #if($request.getAttribute("pageTitle").length() > 0)
195: #set ($pageTitle = $request.getAttribute("pageTitle"))
196: #else
197: #set ($pageTitle = "")
198: #end
199: #if ($page.title.length() > 0)
200: #set ($pageTitle = $!page.title)
201: <h1 class="page-title d-none">$!pageTitle</h1>
202: #end
203: #if($pageTitle.trim().length() == 0)
204: #set ($pageTitle = "#capitalize($page.name.trim())")
205: #end
206: $!request.setAttribute("pageTitle", "${pageTitle}")
207:
208: #if ($body.length() > 150)
209: $!request.setAttribute("pageDescription", "$body.substring(1, 150) ...")
210: #else
211: $!request.setAttribute("pageDescription", "$body")
212: #end
213: #end
214: #end
215:
216: #macro (printLeadIn)
217: #if($page.leadIn.length() > 0 && ($fromHeadlines || !$website.isIncluded()))
218: <h2 class="page-sub-title fs-5 d-none">$page.leadIn</h2>
219: #end
220: #end
221:
222: #macro (printThumbnail)
223: #set ($thumbSrc = "$!{page.thumbnailURL}")
224: #set ($thumbAlt = "$!page.title")
225: #if ($page.thumbnailPage.altText.length() > 0)
226: #set ($thumbAlt = "$page.thumbnailPage.altText")
227: #end
228: #if($thumbSrc.length() > 0 )
229: <picture alt="$thumbAlt">
230: <source media="(min-width:1200px)" srcset="${thumbSrc}?max_width=1920">
231: <source media="(min-width:992px)" srcset="${thumbSrc}?max_width=1200">
232: <source media="(min-width:576px)" srcset="${thumbSrc}?max_width=992">
233: <source media="(min-width:0px)" srcset="${thumbSrc}?max_width=576">
234: <img class="img-fluid mx-auto" src="${thumbSrc}?max_width=1920" alt="${thumbAlt}"/>
235: </picture>
236: #end
237: #end
238:
239: #macro (printResultAriaLabel $event)
240: #set ($ariaLabel = "${event.sport} event: ${formatter.formatDate($event.date, 'MMMM d hh:mm a:')}")
241: #if ($event.neutralSite.length() > 0 || $event.home)
242: #set ($ariaLabel = "${ariaLabel} vs.")
243: #else
244: #set ($ariaLabel = "${ariaLabel} at")
245: #end
246: #set ($ariaLabel = "${ariaLabel} ${event.opponent.name}:")
247: #if ($event.neutralSite.length() > 0)
248: #set ($ariaLabel = "${ariaLabel} @ ${event.neutralSite}:")
249: #end
250: #set ($ariaLabel = "${ariaLabel} Box Score")
251: aria-label="$ariaLabel"
252: #end
253:
254: #macro(playIcon $url)
255: <a href="$url" class="play-btn video-btn-overlay" onclick="return(false);" onmouseup="return(false);">
256: <span class="center-icon-pre">
257: <span class="center-icon">
258: <span class="visually-hidden">Play Video</span>
259: <span class="fab fa-youtube"></span>
260: </span>
261: </span>
262: </a>
263: #end
264:
265: #macro (printVideo $article)
266: #if ($article.contentType == "loki/youtube")
267: #set ($videoID = $article.dataAsString)
268: <img src="https://i3.ytimg.com/vi/${videoID}/sddefault.jpg" onerror="this.onerror=null; this.src='https://i3.ytimg.com/vi/${videoID}/mqdefault.jpg';" alt="video thumbnail for $article.thumbnailAlt" class="card-img-top img-fluid" />
269: #playIcon($article.url)
270: #end
271:
272: #if ($article.contentType == "loki/video")
273: <video class="player" muted="true">
274: <source src="${article.url}?dec=" type="video/mp4" />
275: </video>
276: #playIcon($article.url)
277: #end
278: #end
279:
280: ## ARTICLE MENTIONS MACRO
281: #macro (printReleases $items $type)
282: <div class="news-releases news-layout grid bio-news-mentions">
283: <div class="cards">
284: #foreach ($article in $items)
285:
286: ## CATEGORY / TITLE
287: #set ($title = $article.title)
288: #set ($category = "Article")
289:
290: #if($article.contentType == "loki/bio")
291: #set ($category = "Bio")
292: #elseif ($article.contentType == "video/x-flv" || $article.contentType == "loki/video" || $article.contentType == "loki/youtube")
293: #set ($category = "Video")
294: #end
295:
296: #if ($article.url.startsWith("/sports/"))
297: #set ($sportKey = $article.url.split("/").get(2))
298: #if ($sportLabels.containsKey($sportKey))
299: #set ($category = $sportLabels.get($sportKey))
300: #end
301: #else
302: #set ($articleSection = $article.sectionPage)
303: #foreach ($i in [1..5])
304: #if ($articleSection.url.length() == 0)
305: #break
306: #elseif ($articleSection.sectionPage.url.length() == 0) ## if parent is a root section
307: #if ($articleSection.title.length() > 0)
308: #set ($category = $articleSection.title)
309: #else
310: #set ($firstChar = $articleSection.name.substring(0, 1).toUpperCase())
311: #set ($afterFirstChars = $articleSection.name.substring(1))
312: #set ($category = "${firstChar}${afterFirstChars}")
313: #end
314: #break
315: #end
316: #set ($articleSection = $articleSection.sectionPage)
317: #end
318: #end
319: ## END CATEGORY / TITLE
320:
321: #set ($altText = $article.title)
322: #if ($article.thumbnailURL)
323: #if ($article.thumbnailPage.altText.length() > 0)
324: #set ($altText = "$article.thumbnailPage.altText")
325: #end
326: #end
327:
328: #if ($article.thumbnailURL.length() > 0)
329: #set ($src = $article.thumbnailURL)
330: #elseif ($website.exists("/images/setup/default-thumbnail.png"))
331: #set ($src = "/images/setup/default-thumbnail.png")
332: #elseif ($website.exists("/images/setup/thumbnail_default.jpg"))
333: #set ($src = "/images/setup/thumbnail_default.jpg")
334: #else
335: #set ($src = "/info/images/default-thumbnail.png")
336: #end
337: #set ($thumbnailURL = "${src}?max_width=${thumbWidth}")
338:
339: #set ($cardClass = "card")
340: #if ($velocityCount > $showSize)
341: #set ($cardClass = "card hidden")
342: #end
343:
344: <div class="${cardClass} border position-relative">
345: <div class="card-inner position-relative">
346: #if ($showThumb == true)
347: <div class="thumb overflow-hidden card-img-top ${thumbnail-orientation}" style="background-image:url('${thumbnailURL}'); background-size:cover; background-position:center;">
348: <img src="${thumbnailURL}" alt="${altText}" class="img-fluid" />
349: #printVideo($article)
350: </div>
351: #end
352: <div class="card-body border-top rounded-bottom bg-white">
353: <div class="entry-body-header">
354: <ul class="entry-meta list-unstyled d-flex align-items-center justify-content-between mb-0 text-muted small">
355: <li class="entry-category">$category</li>
356: <li class="entry-header-date d-none d-lg-block hide-on-grid-view">
357: <span class="d-flex align-items-center">
358: <span class="fa-regular fa-calendar"></span>
359: <span class="ms-2">$formatter.formatDate($article.date, $dateFormat)</span>
360: </span>
361: </li>
362: </ul>
363: <div class="card-title entry-title fw-bold mb-0">
364: <a class="text-decoration-none stretched-link clamp-2" href="$article.url">$title</a>
365: </div>
366: #if ($showLeadin == true && $article.leadIn.length() > 0)
367: <p class="card-text entry-summary clamp-3">$article.leadIn</p>
368: #end
369: </div>
370: </div>
371: #if ($showDate == true && $article.date)
372: <div class="card-footer border-top rounded-bottom bg-white text-muted p-3">
373: <ul class="list-unstyled d-flex align-items-center m-0">
374: <li class="card-entry-date">
375: <span class="small d-flex align-items-center">
376: <span class="fa-regular fa-calendar"></span>
377: <span class="ms-2 date">$formatter.formatDate($article.date, $dateFormat)</span>
378: </span>
379: </li>
380: </ul>
381: </div>
382: #end
383: </div>
384: </div> ## card
385: #end ## loop
386: </div>
387: </div>
388: #end ## printReleases
389:
390: #macro (gamelogData $p)
391:
392: #set ($p = $positions.get($p))
393: #set ($gamelogs = $gamelogs.get($p))
394:
395: #if ($hasEvents)
396: <div class="stats-box full clearfix">
397: <div class="table-responsive-via-datatables">
398: <table class="table table-hover nowrap w-100" data-searching="false" data-ordering="false" data-paging="false" data-info="false" data-filtering="false" data-scroll-y="50vh" data-module="theme-module/table-sort-bs">
399: <thead class="thead-dark">
400: <tr>
401: <th scope="col">Date</th>
402: <th scope="col" class="text-start">Opponent</th>
403: <th scope="col" class="">Score</th>
404: #foreach ($gamelog in $gamelogs)
405: <th scope="col" class="text-uppercase text-center">$gamelog</th>
406: #end
407: </tr>
408: </thead>
409: <tbody>
410: #foreach ($event in $events)
411: <tr>
412: <td scope="row">$formatter.formatDate($event.event.date, "MMM d")</td>
413: <td class="text-start">
414: #if ($event.event.neutralSite.length() > 0) vs. #elseif (!$event.event.home) at #end
415: $event.event.opponent.name
416: </td>
417: <td class="">
418: #if ($event.event.statusCode >= 0)
419: #if ($event.event.eventId.length() > 0 && $event.stats.size() > 0)
420: <a #printResultAriaLabel($event.event) href="../boxscores/${formatter.formatBoxScoreLink($event.event)}">${event.event.APResult}</a>
421: #else
422: ${event.event.APResult}
423: #end
424: #end
425: </td>
426: #foreach ($gamelog in $gamelogs.keySet())
427: #set ($value = "-")
428: #set ($value = $formatter.formatNumber($event.stats.get($gamelog), $formats.get($gamelog)))
429: <td class="text-center">$value</td>
430: #end
431: </tr>
432: #end
433: </tbody>
434: </table>
435: </div> ## table-responsive
436: </div> ## stats-box
437: #end
438:
439: #end ## macro gamelogData
440:
441: #macro (splitWithLabels $statPosBriefs $label $stats)
442: <tr>
443: <th scope="row" class="text-end">${label}</th>
444:
445: #if ($rosterTransactions && $v == "career")
446: #set($keys = $stats.names())
447: #set($array = $keys.toString().replace('"','').split(","))
448: #foreach ($brief in $statPosBriefs.keySet())
449: #set ($value = "-")
450: #if($array.contains($brief))
451: #set ($value = $!formatter.formatNumber($tool.math.toDouble($stats.get($brief)), $formats.get($brief)))
452: #end
453: <td class="text-center">#if ($value.length() > 0) $value #else - #end</td>
454: #end
455: #else
456: #foreach ($brief in $statPosBriefs.keySet())
457: #set ($value = "-")
458: #set ($value = $!formatter.formatNumber($stats.get($brief), $formats.get($brief)))
459: <td class="text-center">#if ($value.length() > 0) $value #else - #end</td>
460: #end
461: #end
462: </tr>
463: #end
464:
465: #macro (careerData $p)
466: #set ($p = $positions.get($p))
467: #set ($statPosBriefs = $briefs.get($p))
468:
469: <div class="stats-box full clearfix">
470: <div class="table-responsive-via-datatables table-responsive-webkit-overflow-scroll-fix">
471: <table class="table table-hover nowrap w-100" data-searching="false" data-ordering="false" data-paging="false" data-info="false" data-filtering="false" data-scroll-y="50vh" data-module="theme-module/table-sort-bs">
472: <thead class="thead-dark">
473: <tr>
474: <th></th>
475: #foreach ($brief in $statPosBriefs)
476: <th scope="col" class="text-center text-uppercase">$brief</th>
477: #end
478: </tr>
479: </thead>
480: <tbody>
481: #if ($rosterTransactions)
482: #set ($seasonLength = $career.seasons.length())
483: #foreach ($index in [0..$tool.math.sub($seasonLength, 1)])
484: #set($season = $career.seasons[$index])
485: #if($season.seasonStatsURL != "null")
486: #set ($label = "<a href='${season.seasonStatsURL}?view=profile'>$season.seasonName.replaceAll('^[^0-9-]*','') - $season.team.teamName</a>")
487: #else
488: #set ($label = "$season.seasonName.replaceAll('^[^0-9-]*','') - $season.team.teamName ")
489: #end
490: #splitWithLabels($statPosBriefs, $label, $season.player.stats)
491: #end
492: #splitWithLabels($statPosBriefs, "Total", $career.totals)
493: #else
494: #set ($careerTotals = $request.getAttribute("careerTotals"))
495: #set ($careerMap = $request.getAttribute("careerMap"))
496: #foreach ($season in $seasons)
497: ## Check if we did not get stats for this season
498: #if ($careerMap.get($season.seasonName))
499: #set ($label = "<a href='${season.path}?view=profile'>$season.seasonName</a>")
500: #splitWithLabels($statPosBriefs, $label, $careerMap[$season.seasonName])
501: #elseif ($wiki.valid())
502: <tr>
503: <td scope="row" class="text-end">
504: ${season.seasonName}
505: <span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" data-bs-placement="right" title="We could not find the 'players' page in the ${season.seasonName} section.">
506: <span class="fa fa-light fa-circle-info"></span>
507: </span>
508: </td>
509: #foreach ( $i in [0..$tool.math.sub($statPosBriefs.size(), 1)])
510: <td class="text-center"> </td>
511: #end
512: </tr>
513: #end
514: #end
515: #splitWithLabels($statPosBriefs, "Total", $request.getAttribute("careerTotals").overall)
516: #end
517: </tbody>
518: </table>
519: </div> ## table-responsive
520: </div> ## stats-box
521:
522: #end ## macro careerData
523:
524: #macro (printGroupLabel $label $emptyColumnSize)
525: <tr class="group table-active">
526: <td><strong>$label</strong></td>
527: #foreach ( $i in [1..$emptyColumnSize])
528: <td></td>
529: #end
530: </tr>
531: #end
532:
533: #macro (splitsData $p)
534:
535: #set ($p = $positions.get($p))
536: #set ($statPosBriefs = $briefs.get($p))
537:
538: #if ($statPosBriefs.size() > 0)
539: <div class="stats-box full clearfix">
540: <div class="table-responsive-via-datatables">
541: <table class="table table-hover nowrap w-100" data-searching="false" data-ordering="false" data-paging="false" data-info="false" data-filtering="false" data-scroll-y="50vh" data-module="theme-module/table-sort-bs">
542: <thead class="thead-dark">
543: <tr>
544: <th></th>
545: #foreach ($brief in $statPosBriefs)
546: <th scope="col" class="text-center text-uppercase">$brief</th>
547: #end
548: </tr>
549: </thead>
550:
551: <tbody>
552: #printGroupLabel("Event", $statPosBriefs.size())
553: #splitWithLabels($statPosBriefs, "Total", $splits.overall)
554: #splitWithLabels($statPosBriefs, "Conference", $splits.conference)
555: #splitWithLabels($statPosBriefs, "Exhibition", $splits.exhibition)
556:
557: #printGroupLabel("Location", $statPosBriefs.size())
558: #splitWithLabels($statPosBriefs, "Home", $splits.home)
559: #splitWithLabels($statPosBriefs, "Away", $splits.away)
560: #splitWithLabels($statPosBriefs, "Neutral", $splits.neutral)
561:
562: #printGroupLabel("Result", $statPosBriefs.size())
563: #foreach($gameResult in $gamesResults.entrySet())
564: #if ($gameResult.key == "wins")
565: #set ($splitGameResult = $splits.inWins)
566: #elseif ($gameResult.key == "losses")
567: #set ($splitGameResult = $splits.inLosses)
568: #elseif ($gameResult.key == "ties")
569: #set ($splitGameResult = $splits.inTies)
570: #end
571:
572: #splitWithLabels($statPosBriefs, $gameResult.value, $splitGameResult)
573: #end
574:
575:
576: #if ($monthsPlayed and $monthsPlayed.size() > 0)
577:
578: #printGroupLabel("Month", $statPosBriefs.size())
579:
580: #foreach($month in $monthsPlayed)
581: #if ($month == 'January')
582: #set ($splitMonth = $splits.january)
583: #elseif ($month == 'February')
584: #set ($splitMonth = $splits.february)
585: #elseif ($month == 'March')
586: #set($splitMonth = $splits.march)
587: #elseif ($month == 'April')
588: #set($splitMonth = $splits.april)
589: #elseif ($month == 'May')
590: #set ($splitMonth = $splits.may)
591: #elseif ($month == 'June')
592: #set ($splitMonth = $splits.june)
593: #elseif ($month == 'July')
594: #set($splitMonth = $splits.july)
595: #elseif ($month == 'August')
596: #set ($splitMonth = $splits.august)
597: #elseif ($month == 'September')
598: #set($splitMonth = $splits.september)
599: #elseif ($month == 'October')
600: #set($splitMonth = $splits.october)
601: #elseif ($month == 'November')
602: #set ($splitMonth = $splits.november)
603: #elseif ($month == 'December')
604: #set($splitMonth = $splits.december)
605: #end
606:
607: #splitWithLabels($statPosBriefs, $month, $splitMonth)
608: #end ## foreach
609: #end
610: </tbody>
611: </table>
612: </div> ## table-responsive
613: </div> ## stats-box
614: #end
615:
616: #end ## macro splitsData
617:
618: #macro (printRecentGames)
619: #if ($hasEvents)
620: <div class="table-responsive-via-datatables">
621: <table class="table table-hover nowrap w-100" data-searching="false" data-ordering="false" data-paging="false" data-info="false" data-filtering="false" data-scroll-y="50vh" data-module="theme-module/table-sort-bs">
622: <thead class="thead-dark">
623: <tr>
624: <th scope="col text-start">Date</th>
625: <th scope="col text-start">Opponent</th>
626: <th scope="col">Result</th>
627: </tr>
628: </thead>
629: <tbody>
630: #set ($eventEnd = -1)
631: #foreach ($event in $events)
632: #if ($event.event.result.resolved)
633: #set ($eventEnd = $velocityCount)
634: #end
635: #end
636:
637: #set ($eventStart = $eventEnd - 5)
638: #if ($eventStart < 0) #set ($eventStart = 0) #end
639:
640: #foreach ($event in $events)
641: #if ($velocityCount >= $eventStart and $velocityCount <= $eventEnd)
642: <tr>
643: <td scope="row" class="text-start">$formatter.formatDate($event.event.date, "MMM d")</td>
644: <td class="text-start">
645: #if ($event.event.neutralSite.length() > 0) vs.
646: #elseif (!$event.event.home) at
647: #else ## nothing for a home game
648: #end
649: $event.event.opponent.name
650: </td>
651: <td>
652: #if ($event.event.statusCode >= 0)
653: #if ($event.event.eventId.length() > 0 && $event.stats.size() > 0)
654: <a #printResultAriaLabel($event.event) href="../boxscores/${formatter.formatBoxScoreLink($event.event)}">${event.event.APResult}</a>
655: #else
656: ${event.event.APResult}
657: #end
658: #end
659: </td>
660: </tr>
661: #end ## if
662: #end
663: </tbody>
664: </table>
665: </div>
666: #end
667: #end ## macro printRecentGames
668:
669: #macro (printCategories $briefCategoryLabels $v $ariaLabel)
670: <div class="$classTabPaneContent has-child-tabs">
671: <div class="d-flex flex-row text-nowrap align-items-center justify-content-center">
672: <div class="secondary-tab-select-container flex-fill">
673: <select class="tab-nav-select-helper form-select" id="bio-tabs-${v}-select" aria-label="Choose a stat group">
674: #foreach($briefCat in $briefCategoryLabels.entrySet())
675: #set ($briefCatLabel = $briefCat.value)
676: #set ($briefCatKey = $briefCat.key)
677: #if ($locale == "en_gb" && $briefCatLabel == "Defense")
678: #set ($briefCatLabel = "Defence")
679: #end
680: <option value="#${v}-tab-pos-${briefCatKey}-content" #if ($pos == $briefCat.key || $foreach.first) selected #end>${briefCatLabel}</option>
681: #end
682: </select>
683: <script>
684: $('.tab-nav-select-helper').on('change', function(e) {
685: var id = $(this).val();
686: $('a[data-bs-target="' + id + '"]').tab('show');
687: });
688: </script>
689: </div>
690: </div>
691: <div class="$classBioTabChildrenWrapper" data-momentum="false">
692: <ul class="$classBioTabChildren" id="bio-tabs-${v}" role="tablist">
693: #foreach($briefCat in $briefCategoryLabels.entrySet())
694: #set ($briefCatLabel = $briefCat.value)
695: #set ($briefCatKey = $briefCat.key)
696: #if ($locale == "en_gb" && $briefCatLabel == "Defense")
697: #set ($briefCatLabel = "Defence")
698: #end
699: <li class="nav-item flex-fill flex-md-grow-0 flex-md-shrink-0">
700: <a data-bs-toggle="tab" id="${v}-tab-pos-${briefCatKey}" class="nav-link#if ($activePos == $briefCatKey) active#end" data-bs-target="#${v}-tab-pos-${briefCatKey}-content" href="${page.url}?view=${v}&pos=${briefCatKey}" aria-label="${ariaLabel}: ${briefCatLabel}">${briefCatLabel}</a>
701: </li>
702: #end
703: </ul>
704: </div>
705: <div class="tab-content py-3" id="${v}-tab-content">
706: #foreach ($briefCat in $briefCategoryLabels.entrySet())
707: #set ($briefCatLabel = $briefCat.value)
708: #set ($briefCatKey = $briefCat.key)
709: #set ($class = "tab-panel")
710: #if ($briefCat.key == $activePos)
711: #set ($class = "tab-panel active show")
712: #end
713: <div class="tab-pane fade ${class}" id="${v}-tab-pos-${briefCatKey}-content" role="tabpanel" aria-labelledby="${v}-tab-pos-${briefCatKey}">
714: <div class="stats-wrap $classTabPaneContentChild">
715: #if ($v == "splits")
716: #splitsData($briefCat.key)
717: #elseif ($v == "career")
718: #careerData($briefCat.key)
719: #end
720: <caption><p class="text-muted small">$ariaLabel: $briefCatLabel</p></caption>
721: </div>
722: </div>
723: #end
724: </div>
725: </div>
726: #end ## macro printCategories
727:
728: #macro (printHeadshot $class)
729: #if ($headshot.url)
730: <img src="$headshot.url?max_width=510&max_height=600" class="$class" alt="$fullName" />
731: #elseif ($options.get("roster_default_thumbnail").length() > 0)
732: <span class="d-block" aria-hidden="true" style="background-image:url('$options.get("roster_default_thumbnail")'); background-position:center center; background-repeat:no-repeat; background-size:cover;"></span>
733: #else
734: <span class="d-flex align-items-center justify-content-center text-primary ps-img-placeholder-bg">
735: <span class="fa-regular fa-image fa-xl opacity-1"></span>
736: </span>
737: #end
738: #end ## macro printHeadshot
739:
740: #set ($socialBrands = ["facebook", "twitter", "instagram", "youtube", "twitch", "tiktok", "nil"])
741:
742: #macro (buildSocialLink $brand $handle $icons $class)
743: #if($brand == "facebook")
744: #set($socialHost = "https://www.facebook.com")
745: #elseif($brand == "twitter")
746: #set($socialHost = "https://twitter.com")
747: #elseif($brand == "instagram")
748: #set($socialHost = "https://www.instagram.com")
749: #elseif($brand == "tikTok")
750: #set($socialHost = "https://www.tiktok.com")
751: #elseif($brand == "tiktok")
752: #set($socialHost = "https://www.tiktok.com")
753: #elseif($brand == "twitch")
754: #set($socialHost = "https://www.twitch.tv")
755: #elseif($brand == "youtube")
756: #set($socialHost = "https://www.youtube.com")
757: #elseif($brand == "nil")
758: #set($socialHost = "") ## We cannot define a host because the data entry can accept all NIL host services. Opendorse, Influencer, Fanatics, etc.
759: #end
760:
761: #if($socialHost.length() > 0 )
762: #set($url = "${socialHost}/${handle}")
763: #elseif($brand == "nil")
764: #set($url = "${handle}")
765: #else
766: #set($url = "")
767: #end
768:
769: #set($icons = $Boolean.parseBoolean($icons))
770: #if($icons == true)
771: <a href="$url" class="$class" target="_blank"><span aria-label="$brand" class="#if($brand == 'nil')fa-kit #else fa fa-brands #end #if($brand == 'twitter') fa-x-twitter #else fa-$brand.toLowerCase() #end"></span></a>
772: #else
773: <a href="$url" class="$class" target="_blank">$handle</a>
774: #end
775: #end
776:
777: #macro(playerHeading)
778: <div class="player-heading animated h3 bg-primary d-flex align-content-stretch text-white position-relative z-index-1 rounded-top overflow-hidden mb-0">
779: #if ($!attributes.get("number").length() > 0)<span class="number bg-secondary inline-block text-white fs-2 lh-1 p-3">$!attributes.get("number")</span>#end
780: <span class="name inline-block w-100 flex-grow-1 p-3">$fullName</span>
781: <span class="social-handle-link inline-block p-3">
782: <ul class="d-flex align-content-center h-100 gap-3 list-unstyled m-0">
783: #foreach ($field in $fields)
784: #if ($socialBrands.contains($field.key.toLowerCase()) && $attributes.get($field.key).length() > 0)
785: <li class="d-flex flex-column align-content-center justify-content-center">
786: #buildSocialLink($field.value.toLowerCase(), $!attributes.get($field.key), true, "btn btn-lg btn-link text-white p-0")
787: </li>
788: #end
789: #end
790: </ul>
791: </span>
792: </div>
793: <script>
794: $(document).ready(function() {
795: $('.player-heading.animated .name').addClass('visible');
796: $('.player-heading.animated .number').addClass('visible');
797: });
798: </script>
799:
800: #end
801:
802: #macro (printBioInfo)
803: #if ($enhancedLayout)
804: #set ($classList = "d-flex flex-row flex-wrap justify-content-between row")
805: #set ($classListItems = "col-12 col-lg-6 px-md-3")
806: #set ($definitionListItems = "border-bottom m-0 p-2 p-lg-3 h-100")
807: #else
808: #set ($classList = "d-flex flex-column justify-content-start align-items-start")
809: #set ($classListItems = "flex-grow-1 w-100 p-2 border-bottom")
810: #set ($definitionListItems = " m-0 h-100 d-flex flex-column justify-content-start align-items-start")
811: #end
812:
813: #if ($enhancedLayout)
814: #playerHeading()
815: #end
816: <div class="container-fluid">
817: <div class="roster-player-fields mt-3">
818: <ul class="list-unstyled ${classList}">
819: #foreach ($i in [1..10])
820: #set ($stickyKey = "bio_custom${i}_sticky")
821: #if ($options.get($stickyKey).length() > 0 && $attributes.get("custom${i}").length() > 0)
822: <li class="$classListItems bio-field-custom-sticky">
823: <dl class="${definitionListItems}">
824: <dt class="label p-0 me-2">$options.get($stickyKey): </dt>
825: <dd class="value p-0 m-0 text-muted">$!attributes.get("custom${i}")</dd>
826: </dl>
827: </li>
828: #end
829: #end
830:
831: #foreach ($field in $fields)
832: #if (!$field.key.startsWith("custom"))
833: #if ($attributes.get($field.key).length() > 0 && ($field.key != "first_name" && $field.key != "last_name" && $field.key != "number" && $field.key != "full_name"))
834: #if ($field.key == "phone1" || $field.key == "phone2")
835: <li class="$classListItems bio-field-standard">
836: <dl class="${definitionListItems}">
837: <dt class="label p-0 me-2 d-inline">Phone: </dt>
838: <dd class="value p-0 m-0 d-inline text-muted">$!attributes.get($field.key)</dd>
839: </dl>
840: </li>
841: #elseif ($field.key == "email_address")
842: <li class="$classListItems bio-field-standard">
843: <dl class="${definitionListItems}">
844: #set ($emailAdd = $attributes.get($field.key))
845: <dt class="label p-0 me-2 d-inline">Email: </dt>
846: <dd class="value p-0 m-0 text-truncate d-inline text-muted"><a href="mailto:${emailAdd}">$emailAdd</a></dd>
847: </dl>
848: </li>
849: #elseif ($field.key == "weight_class")
850: <li class="$classListItems bio-field-standard">
851: <dl class="${definitionListItems}">
852: <dt class="label p-0 me-2 d-inline">Class: </dt>
853: <dd class="value p-0 m-0 d-inline text-muted">$!attributes.get($field.key)</dd>
854: </dl>
855: </li>
856: #elseif ($socialBrands.contains($field.value.toLowerCase()))
857: <li class="$classListItems bio-field-standard">
858: <dl class="${definitionListItems}">
859: <dt class="label p-0 me-2 d-inline">$field.value: </dt>
860: <dd class="value p-0 m-0 d-inline text-muted">#buildSocialLink($field.value.toLowerCase(), $!attributes.get($field.key), false, "")</dd>
861: </dl>
862: </li>
863: #elseif ($field.key != "position_abbr")
864: <li class="$classListItems bio-field-standard">
865: <dl class="${definitionListItems}">
866: <dt class="label p-0 me-2 d-inline">$field.value: </dt>
867: <dd class="value p-0 m-0 d-inline text-muted">$!attributes.get($field.key)</dd>
868: </dl>
869: </li>
870: #end
871: #end
872: #end
873: #end
874:
875: #foreach ($i in [1..10])
876: #set ($customKey = "bio_custom${i}")
877: #if ($options.get($customKey).length() > 0 && $attributes.get("custom${i}"))
878: <li class="$classListItems bio-field-custom">
879: <dl class="${definitionListItems}">
880: <dt class="label p-0 me-2 d-inline">$options.get($customKey): </dt>
881: <dd class="value p-0 m-0 d-inline text-muted">$!attributes.get("custom${i}")</dd>
882: </dl>
883: </li>
884: #end
885: #end
886: </ul>
887: </div>
888: </div>
889: #end ## macro printBioInfo
890:
891: #macro (printActionShots)
892: #if ($showActionShots)
893: ## FILTERS OUT THE NUMBER OF ACTION PHOTOS
894: #set ($totalPhotoAvaiable = $playerPhotos.size())
895: #set ($playerPhotosFiltered = $playerPhotos)
896: #if ($actionShotsLimit < $totalPhotoAvaiable)
897: #set ($playerPhotosFiltered = $playerPhotos.subList(0, $actionShotsLimit))
898: #end
899: #set ($playerPhotosFiltered = $tool.sorter.sort($playerPhotosFiltered, "lastUpdated:desc"))
900: <div class="action-shots clearfix mb-md-n5 d-none d-sm-none d-md-block rounded">
901: <div id="action-shots-carousel" class="carousel slide carousel-fade" data-bs-interval="12000" data-bs-ride="carousel">
902: <ol class="carousel-indicators pb-sm-3 mb-sm-5">
903: #foreach($photo in $playerPhotosFiltered)
904: <li data-bs-target="#action-shots-carousel" data-bs-slide-to="$foreach.index" class="#if ($foreach.index == 0)active#end"></li>
905: #end
906: </ol>
907: <div class="carousel-inner ratio ratio-21x9">
908: #foreach($photo in $playerPhotosFiltered)
909: #set ($imgAlt = "Large featured action photo of $fullName - Image $foreach.count")
910: #if ($photo.altText.length() > 0)
911: #set ($imgAlt = $photo.altText)
912: #elseif( $photo.title.length() > 0 )
913: #set ($imgAlt = $photo.title)
914: #end
915: <div class="carousel-item#if ($foreach.index == 0) active#end">
916: <img src="${photo.url}?max_width=1200" alt="$imgAlt" class="d-block w-100" data-lastupdated="$photo.lastUpdated" />
917: </div>
918: #end
919: </div>
920: </div>
921: </div>
922: #end
923: #end ## macro printActionShots
924:
925: #macro (printHighlights)
926: #if ($highlights && $showHighlights)
927: <div class="roster-bio-highlights bg-light bg-gradient text-dark bg-opacity-25 w-100 border rounded">
928: <ul class="d-flex flex-row flex-wrap justify-content-between list-unstyled m-0">
929: #foreach ($highlight in $highlights.keySet())
930: #set ($value = "-")
931: #set ($value = $formatter.formatNumber($stats.get($highlight), $formats.get($highlight)))
932: <li class="flex-fill text-center border-end">
933: <dl class="stat d-block m-0 p-3">
934: <dt class="d-block label p-0 m-0 text-uppercase fw-normal small">$!highlights.get($highlight)</dt>
935: <dd class="d-block value p-0 m-0 fs-4 fw-bold lh-1">$value</dd>
936: </dl>
937: </li>
938: #end
939: </ul>
940: </div>
941: #end
942: #end ## macro printHighlights
943:
944: #macro (printRoster)
945: #if ($enhancedLayout)
946: $website.includeAgain("${page.url}?tmpl=roster-switcher-template&id=roster-list")
947: #else
948: #set ($id = "roster-switcher")
949: #if ($request.getParameter("id").length() > 0)
950: #set ($id = $request.getParameter("id"))
951: #end
952:
953: #if ($page.contentType == "loki/bio")
954: #set ($headlinesFeaturedSize = 0)
955: #foreach ($featuredPage in $page.headlinesFeatured)
956: #if ($featuredPage.contentType == "loki/headlines")
957: #set ($headlinesFeaturedSize = $headlinesFeaturedSize + 1)
958: #end
959: #end
960: #if ($headlinesFeaturedSize > 0)
961: <div id="$id" class="float-md-end roster-switcher-template">
962: <div class="input-group">
963: <span class="input-group-text" id="${id-options}-group-text">Related Bios</span>
964: <select class="form-select" id="$id-options" aria-describedby="${id-options}-group-text" onchange="location=this.value;">
965: #set ($listItems = [])
966: #foreach ($featuredPage in $page.headlinesFeatured)
967: #if ($featuredPage.contentType == "loki/headlines")
968: $website.includeAgain("${featuredPage.url}?tmpl=roster-list-template")
969: #set ($headlines = $request.getAttribute("headlines"))
970: #foreach ($bio in $headlines)
971: #set ($b = $bio.getDataAsObject().getAttributes())
972: #set ($fullName = "")
973: #if ($b.get("full_name"))
974: #set ($fullName = $b.get("full_name"))
975: #else
976: #if ($b.get("first_name") && $b.get("last_name"))
977: #set ($firstName = $b.get("first_name"))
978: #set ($lastName = $b.get("last_name"))
979: #set ($fullName = "${firstName} ${lastName}")
980: #end
981: #end
982: #if ($fullName.length() > 0)
983: #if (!$listItems.contains($bio.url))
984: #set($dummy = $listItems.add($bio.url))
985: <option value="${bio.url}" data-url="${bio.url}" data-title="${fullName}" #if ($page.url == $bio.url)selected#end>${fullName}</option>
986: #end
987: #end
988: #end
989: #end
990: #end
991: </select>
992: </div>
993: </div>
994: #end
995: #elseif ($page.contentType == "loki/bio-network")
996: #set ($relatedPlayers = $page.sectionPage.children)
997: #set ($teamNames = {})
998: #foreach ($relatedPlayer in $relatedPlayers)
999: #if ($relatedPlayer.contentType == "loki/bio-network")
1000: #set ($relatedPlayerObj = $relatedPlayer.getDataAsObject().getAttributes())
1001: #set ($teamName = $relatedPlayerObj.get("team"))
1002: #if ($teamName.length() > 0)
1003: #if (!$teamNames.containsValue($teamName))
1004: $!teamNames.put($tool.math.add($teamNames.size(), 1), $teamName)
1005: #end
1006: #end
1007: #end
1008: #end
1009: <div id="$id" class="float-md-end roster-switcher-template">
1010: <div class="input-group">
1011: <span class="input-group-text" id="${id-options}-group-text">Related Bios</span>
1012: <select class="form-select" id="$id-options" aria-describedby="${id-options}-group-text" onchange="location=this.value;">
1013: #foreach ($i in [1..$teamNames.size()])
1014: #if ($teamNames.size() > 1)
1015: <optgroup label="$teamNames.get($i)">
1016: #end
1017:
1018: #foreach ($relatedPlayer in $relatedPlayers)
1019: #if ($relatedPlayer.contentType == "loki/bio-network")
1020: #set ($relatedPlayerObj = $relatedPlayer.getDataAsObject().getAttributes())
1021: #set ($teamName = $relatedPlayerObj.get("team"))
1022: #if ($teamName.length() > 0 && $teamName == $teamNames.get($i))
1023: #set ($playerFirstName = $relatedPlayerObj.get("first_name"))
1024: #set ($playerLastName = $relatedPlayerObj.get("last_name"))
1025: <option value="$relatedPlayer.url" #if ($page.url == $relatedPlayer.url)selected#end>${playerFirstName} ${playerLastName}</option>
1026: #end
1027: #end
1028: #end
1029:
1030: #if ($teamNames.size() > 1)
1031: </optgroup>
1032: #end
1033: #end
1034: </select>
1035: </div>
1036: </div>
1037: #end
1038: #end ## enhancedLayout check
1039: #end ## macro printRoster
1040:
1041: ################################################## END MACROS #############################################################
1042:
1043: #if ($attributes.get("full_name").length() > 0)
1044: #set ($fullName = $attributes.get("full_name"))
1045: #else
1046: #set ($firstName = $!attributes.get("first_name"))
1047: #set ($lastName = $!attributes.get("last_name"))
1048: #set ($fullName = "${firstName} ${lastName}")
1049: #end
1050:
1051: #set ($actionShots = false)
1052: #if ($enhancedLayout && $playerPhotos.size() > 0)
1053: #set ($actionShots = true)
1054: #end
1055:
1056: #if ($enhancedLayout)
1057: #set ($classRoot = "bio-enhanced")
1058: #if ($actionShots && $showActionShots)
1059: #set ($classRoot = "${classRoot} action")
1060: #else
1061: #set ($classRoot = "${classRoot} plain")
1062: #end
1063: #set ($flexClass = "d-flex flex-column align-items-stretch justify-content-start gap-4 w-100 gap-4")
1064: #set ($bioCardClass = "col-auto")
1065: #set ($classBody = "flex-grow-1")
1066: #set ($classBioTabParentsWrapper = "nav-tabs-wrapper position-relative pt-3")
1067: #set ($classBioTabParents = "nav nav-tabs nav-tabs-responsive d-flex with-arrow lined flex-row text-nowrap justify-content-center gap-3")
1068: #set ($classBioTabChildrenWrapper = "nav-tabs-wrapper position-relative py-3 border-bottom d-none")
1069: #set ($classBioTabChildren = "nav nav-tabs nav-tabs-responsive d-flex with-arrow lined flex-row text-nowrap justify-content-center gap-3")
1070: #set ($classTabPaneContent = "tab-pane-contents p-3 border")
1071: #set ($classTabPaneContentChild = "tab-pane-contents p-0")
1072: #else
1073: #set ($classRoot = "bio-wrap ")
1074: #set ($flexClass = "d-flex flex-column align-items-stretch justify-content-start flex-md-row gap-4")
1075: #set ($bioContainerClass = "mt")
1076: #set ($bioCardClass = "min-width-300px max-width-md-300px")
1077: #set ($classBody = "flex-grow-1 overflow-hidden")
1078: #set ($classBioTabParentsWrapper = "nav-tabs-wrapper position-relative tab-nav")
1079: #set ($classBioTabParents = "nav nav-tabs nav-tabs-responsive d-flex with-arrow lined flex-row text-nowrap justify-content-center gap-3")
1080: #set ($classBioTabChildrenWrapper = "nav-tabs-wrapper position-relative tab-nav d-none")
1081: #set ($classBioTabChildren = "nav nav-tabs nav-tabs-responsive d-flex with-arrow lined flex-row text-nowrap justify-content-center gap-3")
1082: #set ($classTabPaneContent = "tab-pane-contents p-3 border")
1083: #set ($classTabPaneContentChild = "tab-pane-contents p-0")
1084:
1085: #end
1086:
1087: ## FULL ROSTER
1088: <div class="bio-template ${classRoot} #if ($highlights) bio-wrap-has-highlights #end d-flex flex-column align-items-stretch justify-content-start gap-4">
1089:
1090: <div class="bio-template-heading d-flex flex-column w-100 justify-content-center align-items-stretch gap-2 mb-3 d-none">
1091: #printTitle()
1092: #printLeadIn()
1093: </div>
1094:
1095: ## RELATED BIOS
1096: #if ($showRoster)
1097: <div class="container-fluid">
1098: <div class="related-bios">#printRoster()</div>
1099: </div>
1100: #end
1101:
1102: #if ($actionShots)
1103: #printActionShots()
1104: #end
1105:
1106: #if ($enhancedLayout)
1107: #else
1108: #playerHeading()
1109: #end
1110:
1111: <div class="roster-bio-container">
1112: <div class="${flexClass}">
1113: <div class="bio-card ${bioCardClass}">
1114: <div class="player-about clearfix">
1115: #if ($enhancedLayout)
1116: <div class="bio-card-enhanced d-flex flex-column flex-md-row align-items-stretch align-items-md-start justify-content-center justify-content-md-start gap-3">
1117: <div class="bcs-image flex-shrink-1 flex-grow-1 min-width-300px max-width-md-300px">
1118: <div class="player-headshot text-center position-relative z-index-1 #if($actionShots)mt-md-n5 #end shadow rounded border overflow-hidden ratio ratio-3x4">
1119: #printHeadshot("img-fluid img-thumbnail")
1120: </div>
1121: </div>
1122: <div class="flex-grow-1">
1123: <div class="player-info">#printBioInfo()</div>
1124: <div class="container-fluid">
1125: <div class="mt-3 mx-3 mt-lg-4 ">
1126: #printHighlights()
1127: </div>
1128: </div>
1129: </div>
1130: </div>
1131: #else
1132: <div class="bio-card-standard d-flex flex-column align-items-stretch justify-content-start gap-3">
1133: <div class="bcs-image flex-shrink-1 min-width-300px max-width-md-300px">
1134: <div class="player-headshot text-center position-relative z-index-1 mb-3 shadow rounded border overflow-hidden ratio ratio-3x4">
1135: #printHeadshot("img-fluid img-thumbnail")
1136: </div>
1137: </div>
1138: <div class="bcs-attributes">
1139: <div class="player-info">#printBioInfo()</div>
1140: </div>
1141: </div>
1142: #end
1143: </div>
1144: </div> ## bio-card
1145:
1146: #if ($view.length() > 0)
1147: $request.setAttribute("icl-responsive-tabs-script", true)
1148:
1149: <div class="bio-body ${classBody}">
1150:
1151: <div class="d-flex flex-column align-items-center justify-content-start gap-3">
1152: #if (!$enhancedLayout) #printHighlights #end
1153: <div class="tab-container w-100">
1154: #if ($statsURL.length() > 0 || $hasHTMLStats || $releases.size() > 0|| $playerPhotos.size() > 0 || $playerVideos.size() > 0)
1155: <div class="$classBioTabParentsWrapper">
1156: <ul class="$classBioTabParents" id="bio-tabs-parents" role="tablist">
1157: #if ($hasSynopsis || $hasBioBrief)
1158: <li class="nav-item">
1159: <a data-bs-toggle="tab" id="bio-tab" class="nav-link #if ($view == "bio") active#end" data-bs-target="#bio" href="${page.url}?view=bio">Bio</a>
1160: </li>
1161: #end
1162:
1163: #if ($statsURL.length() > 0)
1164: <li class="nav-item">
1165: <a data-bs-toggle="tab" id="profile-tab" class="nav-link#if ($view == "profile") active#end" data-bs-target="#profile" href="${page.url}?view=profile">Player Profile</a>
1166: </li>
1167: <li class="nav-item">
1168: <a data-bs-toggle="tab" id="gamelog-tab" class="nav-link#if ($view == "gamelog") active#end" data-bs-target="#gamelog" href="${page.url}?view=gamelog">Game Log</a>
1169: </li>
1170: #if ($showCareer)
1171: <li class="nav-item">
1172: <a data-bs-toggle="tab" id="career-tab" class="nav-link#if ($view == "career") active#end" data-bs-target="#career" href="${page.url}?view=career">Career Stats</a>
1173: </li>
1174: #end
1175: <li class="nav-item">
1176: <a data-bs-toggle="tab" id="splits-tab" class="nav-link#if ($view == "splits") active#end" data-bs-target="#splits" href="${page.url}?view=splits">Split Stats</a>
1177: </li>
1178: #end
1179:
1180: #if ($hasHTMLStats)
1181: <li class="nav-item">
1182: <a data-bs-toggle="tab" id="htmlstats-tab" class="nav-link#if ($view == "htmlstats") active#end" data-bs-target="#htmlstats" href="${page.url}?view=htmlstats">HTML Stats</a>
1183: </li>
1184: #end
1185:
1186: #if ($releases.size() > 0)
1187: <li class="nav-item">
1188: <a data-bs-toggle="tab" id="news-tab" class="nav-link#if ($view == "news") active#end" data-bs-target="#news" href="${page.url}?view=news">News</a>
1189: </li>
1190: #end
1191:
1192: #if ($playerPhotos.size() > 0)
1193: <li class="nav-item">
1194: <a data-bs-toggle="tab" id="photos-tab" class="nav-link#if ($view == "photos") active#end" data-bs-target="#photos" href="${page.url}?view=photos">Photos</a>
1195: </li>
1196: #end
1197:
1198: #if ($playerVideos.size() > 0)
1199: <li class="nav-item">
1200: <a data-bs-toggle="tab" id="videos-tab" class="nav-link#if ($view == "videos") active#end" data-bs-target="#videos" href="${page.url}?view=videos">Videos</a>
1201: </li>
1202: #end
1203:
1204: ## WEPLAYED MOMENTS - THIRD-PARTY SUPPORT PLUGIN
1205: #if (!$page.url.contains("/coaches") && $options.get("weplayed_addon_code"))
1206: <li class="nav-item weplayed-hide-no-data #if ($view == "weplayed") active#end">
1207: <a data-toggle="tab" id="weplayed-tab" class="nav-link#if ($view == "weplayed") active#end" data-target="#weplayed" href="${page.url}?view=weplayed">#Moments</a>
1208: </li>
1209: #end
1210: </ul>
1211: </div>
1212: #end
1213: <div class="tab-content py-3" id="roster-tab-content">
1214: ## BIO
1215: #if ($hasSynopsis || $hasBioBrief)
1216: #set ($class = "tab-panel")
1217: #if ($view == "bio")
1218: #set ($class = "tab-panel active show")
1219: #end
1220:
1221: <div class="tab-pane fade ${class}" id="bio" role="tabpanel" aria-labelledby="bio-tab">
1222: <div class="$classTabPaneContent synopsis">
1223: <h5 class="bio-tabbed-content-heading">Bio</h5>
1224: #if ($hasSynopsis)
1225: $synopsis
1226: #elseif ($hasBioBrief)
1227: $website.include("$bioBriefURL")
1228: #end
1229: </div>
1230: </div> ## tab-panel
1231: #end
1232:
1233: ## STATS
1234: #if ($statsURL.length() > 0)
1235:
1236: ## PROFILE
1237: #set ($class = "tab-panel")
1238: #if ($view == "profile")
1239: #set ($class = "tab-panel active show")
1240: #end
1241:
1242: <div class="tab-pane fade ${class}" id="profile" role="tabpanel" aria-labelledby="profile-tab">
1243: <div class="$classTabPaneContent stats-wrap">
1244: <div class="d-flex flex-column flex-md-row align-items-top justify-content-center gap-3">
1245: <div class="season-stats-overview flex-grow-1 flex-shrink-1 col-12 col-md-6">
1246: <div class="container-fluid p-0">
1247: <div class="bio-tabbed-content-heading h5">Player statistics</div>
1248: ## RANKING
1249: <div class="stats-box mb-3">
1250: #if ($statPos.length() > 0)
1251: $website.include("players?tmpl=stats-bios-rank-template&rank=${playerId}&pos=${statPos}")
1252: #end
1253: </div>
1254: </div>
1255: </div>
1256:
1257: ## LAST SIX GAMES
1258: <div class="recent-games-list flex-grow-1 flex-shrink-1 col-12 col-md-6">
1259: <div class="container-fluid p-0">
1260: <div class="bio-tabbed-content-heading h5">Recent results</div>
1261: <div class="stats-box mb-3">
1262: #printRecentGames()
1263: </div>
1264: </div>
1265: </div>
1266:
1267: </div>
1268: </div> ## stats-wrap
1269: </div> ## tab-content
1270:
1271: ## GAMELOG
1272: #set ($class = "tab-panel")
1273: #if ($view == "gamelog")
1274: #set ($class = "tab-panel active show")
1275: #end
1276:
1277: #set ($activePos = $statPos)
1278: #if ($view == "gamelog" && $paramPos.length() > 0)
1279: #if ($positions.get($paramPos).length() > 0)
1280: #set ($activePos = $positions.get($paramPos))
1281: #end
1282: #end
1283:
1284: <div class="tab-pane fade ${class}" id="gamelog" role="tabpanel" aria-labelledby="gamelog-tab">
1285: #if ($gamelogsCategoriesLabels)
1286: <div class="$classTabPaneContent has-child-tabs">
1287: <div class="d-flex flex-row text-nowrap align-items-center justify-content-center">
1288: <div class="secondary-tab-select-container flex-fill">
1289: <select class="tab-nav-select-helper form-select" id="bio-tabs-gamelog-select" aria-label="Choose a stat group">
1290: #foreach($briefCat in $gamelogsCategoriesLabels.entrySet())
1291: #set ($briefCatLabel = $briefCat.value)
1292: #set ($briefCatKey = $briefCat.key)
1293: #if ($locale == "en_gb" && $briefCatLabel == "Defense")
1294: #set ($briefCatLabel = "Defence")
1295: #end
1296: <option value="#gamelog-tab-pos-${briefCatKey}-content" #if ($pos == $briefCat.key || $foreach.first) selected #end>${briefCatLabel}</option>
1297: #end
1298: </select>
1299: <script>
1300: $('.tab-nav-select-helper').on('change', function(e) {
1301: var id = $(this).val();
1302: $('a[data-bs-target="' + id + '"]').tab('show');
1303: });
1304: </script>
1305: </div>
1306: </div>
1307: <div class="$classBioTabChildrenWrapper" data-momentum="false">
1308: <ul class="$classBioTabChildren" id="bio-tabs-gamelog" role="tablist">
1309: #foreach($gamelogsCatLabel in $gamelogsCategoriesLabels.entrySet())
1310: #set($gamelogsCatLabelVal = $gamelogsCatLabel.value)
1311: #set ($gamelogsCatLabelKey = $gamelogsCatLabel.key)
1312: #if ($locale == "en_gb" && $gamelogsCatLabelVal == "Defense")
1313: #set($gamelogsCatLabelVal = "Defence")
1314: #end
1315: <li class="nav-item flex-fill flex-md-grow-0 flex-md-shrink-0">
1316: <a data-bs-toggle="tab" id="gamelog-tab-pos-${gamelogsCatLabel.key}" class="nav-link#if ($activePos == $gamelogsCatLabel.key) active#end" data-bs-target="#gamelog-tab-pos-${gamelogsCatLabel.key}-content" href="${page.url}?view=gamelog&pos=${gamelogsCatLabel.key}" aria-label="Game Log: ${gamelogsCatLabelVal}">$gamelogsCatLabelVal</a>
1317: </li>
1318: #end
1319: </ul>
1320: </div>
1321: <div class="tab-content py-3" id="gamelog-tab-content">
1322: #foreach($gamelogsCatLabel in $gamelogsCategoriesLabels.entrySet())
1323: #set ($class = "tab-panel")
1324: #if ($gamelogsCatLabel.key == $activePos)
1325: #set ($class = "tab-panel active show")
1326: #end
1327: <div class="tab-pane fade ${class}" id="gamelog-tab-pos-${gamelogsCatLabel.key}-content" role="tabpanel" aria-labelledby="gamelog-tab-pos-${gamelogsCatLabel.key}">
1328: <div class="stats-wrap $classTabPaneContentChild">
1329: <h5 class="bio-tabbed-content-heading visually-hidden">Game Log - <small class="text-muted"> $gamelogsCatLabel.value</small></h5></h4>
1330: #gamelogData($gamelogsCatLabel.key)
1331: </div>
1332: </div>
1333: #end
1334: </div>
1335: </div>
1336: #else
1337: <div class="stats-wrap $classTabPaneContent">#gamelogData($pos)</div>
1338: #end
1339:
1340: </div> ## tab-panel
1341:
1342: ## CAREER
1343: #if ($showCareer)
1344:
1345: #set ($activePos = $statPos)
1346: #if ($view == "career" && $paramPos.length() > 0)
1347: #if ($positions.get($paramPos).length() > 0)
1348: #set ($activePos = $positions.get($paramPos))
1349: #end
1350: #end
1351:
1352: #set ($class = "tab-panel")
1353: #if ($view == "career")
1354: #set ($class = "tab-panel active show")
1355: #end
1356:
1357: <div class="tab-pane fade ${class}" id="career" role="tabpanel" aria-labelledby="career-tab">
1358: #if ($briefsCategoriesLabels)
1359: #printCategories($briefsCategoriesLabels "career" "Career Stats")
1360: #else
1361: <div class="stats-wrap $classTabPaneContent">#careerData($activePos)</div>
1362: #end
1363: </div>
1364: #end
1365:
1366: ## SPLITS
1367: #set ($class = "tab-panel clearfix")
1368: #if ($view == "splits")
1369: #set ($class = "tab-panel active show")
1370: #end
1371:
1372: #set ($activePos = $statPos)
1373: #if ($view == "splits" && $paramPos.length() > 0)
1374: #if ($positions.get($paramPos).length() > 0)
1375: #set ($activePos = $positions.get($paramPos))
1376: #end
1377: #end
1378:
1379: <div class="tab-pane fade ${class}" id="splits" role="tabpanel" aria-labelledby="splits-tab">
1380: #if ($briefsCategoriesLabels)
1381: #printCategories($briefsCategoriesLabels "splits" "Splits Stats")
1382: #else
1383: <div class="stats-wrap $classTabPaneContent">#splitsData($pos)</div>
1384: #end
1385: </div>
1386: #end
1387:
1388: ## HTML STATS
1389: #if ($hasHTMLStats)
1390: #set ($class = "tab-panel clearfix")
1391: #if ($view == "htmlstats")
1392: #set ($class = "tab-panel active show")
1393: #end
1394: <div class="tab-pane fade ${class}" id="htmlstats" role="tabpanel" aria-labelledby="htmlstats-tab">
1395: <div class="$classTabPaneContent">
1396: <h5 class="bio-tabbed-content-heading">Other Stats</h5>
1397: <a href="${htmlStatsURL}" class="bio-htmlstats-identifier">Click to view HTML Stats</a>
1398: </div>
1399: </div>
1400: #end
1401:
1402: ## NEWS
1403: #if ($releases.size() > 0)
1404: #set ($class = "tab-panel clearfix")
1405: #if ($view == "news")
1406: #set ($class = "tab-panel active show")
1407: #end
1408: <div class="tab-pane fade ${class}" id="news" role="tabpanel" aria-labelledby="news-tab">
1409: <div class="$classTabPaneContent">
1410: <h5 class="bio-tabbed-content-heading">News mentions</h5>
1411: #printReleases($releases, "article")
1412: </div>
1413: </div>
1414: #end
1415:
1416: ## PHOTOS
1417: #if ($playerPhotos.size() > 0)
1418: #set ($class = "tab-panel clearfix")
1419: #if ($view == "photos")
1420: #set ($class = "tab-panel active show clearfix")
1421: #end
1422: <div class="tab-pane fade ${class}" id="photos" role="tabpanel" aria-labelledby="photos-tab">
1423: <div class="$classTabPaneContent">
1424: <h5 class="bio-tabbed-content-heading">Photos</h5>
1425: $website.includeAgain("${page.url}?tmpl=bio-photos-template")
1426: </div>
1427: </div>
1428: #end
1429:
1430: ## VIDEOS
1431: #if ($playerVideos.size() > 0)
1432: #set ($class = "tab-panel clearfix")
1433: #if ($view == "videos")
1434: #set ($class = "tab-panel active show clearfix")
1435: #end
1436: <div class="tab-pane fade ${class}" id="videos" role="tabpanel" aria-labelledby="videos-tab">
1437: <div class="$classTabPaneContent">
1438: <h5 class="bio-tabbed-content-heading">Videos</h5>
1439: #printReleases($playerVideos, "video")
1440: </div>
1441: </div>
1442: #end
1443:
1444: ## WEPLAYED MOMENTS - THIRD-PARTY SUPPORT PLUGIN
1445: #if (!$page.url.contains("/coaches") && $options.get("weplayed_addon_code"))
1446: #set ($class = "tab-panel clearfix")
1447: #if ($view == "weplayed")
1448: #set ($class = "tab-panel active show clearfix")
1449: #end
1450: <div class="tab-pane fade ${class} weplayed-hide-no-data" id="weplayed-tab" role="tabpanel" aria-labelledby="weplayed-tab">
1451: <div class="$classTabPaneContent">
1452: <div data-weplayed-widget></div>
1453: </div>
1454: </div>
1455: #end
1456:
1457: </div> ## tab-panels
1458: </div> ## tab-container
1459: </div>
1460: </div> ## body
1461: #end
1462: </div>
1463: </div>
1464:
1465: $wiki
1466: </div> ## ends bio-wrap
1467:
1468: ## GLOBAL ADS SERVER
1469: #if ($website.ads.isAdvertisingEnabled('BIOS'))
1470: $website.includeAgain("global-adserver-slots?adSlot=bios")
1471: #end
1472:
|