userDetail.pug 806 Bytes
extends layouts/main
include mixins/videoBlock

block content
    .user-profile
        .user-profile__header
            img.u-avatar(src=user.avatarUrl.startsWith("http") ? user.avatarUrl : `/${user.avatarUrl}`)
            h4.profile__username=user.name
        if loggedUser && loggedUser.id === user.id
            .user-profile__btns
                a(href=`/users${routes.editProfile}`)
                    button 🖌 Edit Profile
                a(href=`/users${routes.changePassword}`)
                    button 🔒 Change Password 
        .home-videos
            each item in user.videos
                +videoBlock({
                    id: item.id,
                    title : item.title,
                    views: item.views,
                    videoFile:item.fileUrl
                })