@(c: lila.coach.Coach.WithUser, coachReviews: lila.coach.CoachReview.Reviews, studies: Seq[lila.study.Study.WithChaptersAndLiked], myReview: Option[lila.coach.CoachReview])(implicit ctx: Context) @moreCss = { @cssTag("coach.css") @if(studies.nonEmpty) { @cssTag("studyList.css") } } @moreJs = { @jsAt("vendor/bar-rating/dist/jquery.barrating.min.js") @if(ctx.isAuth) { @embedJs { $(function() { $(".bar-rating").barrating(); $('.review-form .toggle').click(function() { $(this).remove(); $('.review-form form').show(); }); }); } } } @side = {
View @c.user.username lichess profile
@if(ctx.me.exists(_.id != c.user.id)) { @reviewForm(c, myReview) } @reviews(c, coachReviews)
} @section(title: String, text: Option[lila.coach.CoachProfile.RichText]) = { @text.map { t =>

@title

@richText(t.value)
} } @title = @{ s"${c.user.titleUsername} coaches chess students" } @base.layout(title = title, side = side.some, moreJs = moreJs, moreCss = moreCss, openGraph = lila.app.ui.OpenGraph( title = title, description = shorten(~(c.coach.profile.headline), 152), url = s"$netBaseUrl${routes.Coach.show(c.user.username)}", `type` = "profile", image = c.coach.picturePath.map(p => dbImageUrl(p.value))).some) {
@pic(c, 250) @defining(c.user.profileOrDefault) { profile =>

@c.user.title.map { t => @t }@c.user.realNameOrUsername

@c.coach.profile.headline.map { h =>

@h

} @c.coach.profile.languages.map { l => } @c.coach.profile.hourlyRate.map { r => } @if(ctx.me.??(c.coach.is)) { } else { }
Location @profile.nonEmptyLocation.map { l => @l, } @profile.countryInfo.map { c => @c.name }
Languages @l
Rating @profile.officialRating.map { r => @r.name.toUpperCase: @r.rating, } @c.user.best8Perfs.take(6).filter(c.user.hasEstablishedRating).map { pt => @showPerfRating(c.user, pt) }
Hourly rate @r
Availability @if(c.coach.available.value) { Now accepting students } else { Not accepting students at the moment }
Admin @if(c.coach.isListed) { This page is now public. } else { This page is not public yet. } @if(ctx.me.??(c.coach.is)) { Edit my coach profile }
Contact Send a private message
} @defining(c.coach.profile) { profile =>
@section("About me", profile.description) @section("Playing experience", profile.playingExperience) @section("Teaching experience", profile.teachingExperience) @section("Other experiences", profile.otherExperience) @section("Best skills", profile.skills) @section("Teaching methodology", profile.methodology)
@if(studies.nonEmpty) {

Public studies

@studies.map { s =>
@study.widget(s)
}
} @if(profile.youtubeUrls.nonEmpty) {

Youtube videos @profile.youtubeChannel.map { url => from my channel }

@profile.youtubeUrls.map { url => }
} }
}