@(s: lila.streamer.Streamer.WithUserAndStream, activities: Vector[lila.activity.ActivityView], following: Boolean)(implicit ctx: Context) @import lila.streamer.Stream.{ Twitch, YouTube } @side = { @if(s.streamer.approval.chatEnabled) {
@s.stream match { case Some(YouTube.Stream(_, _, videoId, _)) => { } case _ => { @s.streamer.twitch.map { twitch => } } }
}
@menu("show", s.withoutStream.some)
} @moreCss = { @cssTag("streamer.show.css") @cssTag("activity.css") } @moreJs = { @embedJs { $('button.follow').click(function() { var klass = 'active'; $(this).toggleClass(klass); $.ajax({ url: '/rel/' + ($(this).hasClass('active') ? 'follow/' : 'unfollow/') + $(this).data('user'), method:'post' }); }); } } @title = @{ s"${s.titleName} streams chess" } @base.layout(title = title, side = side.some, moreCss = moreCss, moreJs = moreJs, openGraph = lila.app.ui.OpenGraph( title = title, description = shorten(~(s.streamer.headline.map(_.value) orElse s.streamer.description.map(_.value)), 152), url = s"$netBaseUrl${routes.Streamer.show(s.user.username)}", `type` = "video", image = s.streamer.picturePath.map(p => dbImageUrl(p.value))).some) { @s.stream match { case Some(YouTube.Stream(_, _, videoId, _)) => {
} case _ => { @s.streamer.twitch.map { twitch =>
}.getOrElse {
OFFLINE
} } }
@header(s, following.some)
@richText(s.streamer.description.fold("")(_.value))
@s.user.best6Perfs.map { pt => @showPerfRating(s.user, pt) } @views.html.activity.list(s.user, activities)
}