Url link in dashboard (workspace)

Hi ,
How to add a url in workspace dashboard for module. eg(in frappedesk app Go To frappedesk in dashboard of frappedesk app.)

Regards

1 Like

You can just add a text block and create a URL (IMO)

@shariquerik can we add arbitrary links on Dashboard?

yeah got the reference from frappedesk. thanks @rmehta

I have added another option to add a URL in the shortcut

i am also using v14, but it is not showing in Version14.

Thanks @shariquerik , this is really cool ! When are we getting an HTML Block ? :wink:

Kind regards,

I have also added HTML Block for the workspace. Check this PR feat: Custom Block for Workspace by shariquerik · Pull Request #21040 · frappe/frappe · GitHub

1 Like

Awesome !!!

Hi @shariquerik

Trust you’re doing great. I’m trying out the new Custom Block feature. Could you possibly share the code used in the PR demo video for creating a custom profile block ? I believe this would be of great help

Many thanks

You can create your own Custom HTML Block (Doctype)

Below HTML, JS & CSS is for Profile Banner

<div id="user-profile-banner">
    <div class="banner">
        <img src="https://picsum.photos/1000/500">
    </div>
    <div class="avatar"></div>
    <div class="name">
        <div class="full-name"></div>
        <div class="email"></div>
    </div>
</div>
let banner = $(root_element).find("#user-profile-banner");

let title = frappe.session.user_fullname;
let email = frappe.session.user_email;
let avatar = frappe.avatar(email);

banner.find(".full-name").text(title);
banner.find(".email").text(email);
banner.find(".avatar").html(avatar);
#user-profile-banner .banner {
    width: 100%;
    height: 150px;
}

#user-profile-banner .banner img {
    object-fit: cover;
    width: 100%;
    height: inherit;
    object-position: center 50%;
    border-top-left-radius: var(--border-radius-lg);
    border-top-right-radius: var(--border-radius-lg);
}

#user-profile-banner {
    margin: -29px -22px 35px;
}

.avatar-small {
    width: 36px;
    height: 36px;
}

.avatar {
    display: inline-block;
    vertical-align: middle;
}

.avatar-frame {
    display: inline-block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--avatar-frame-bg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    border-radius: 50%;
}

.standard-image {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px !important;
    font-weight: normal;
}

#user-profile-banner .name {
    margin-left: 257px;
    margin-top: -70px;
}

#user-profile-banner .full-name {
    font-size: x-large;
    font-weight: 500;
}

#user-profile-banner .email {
    font-size: small;
    font-weight: 400;
    color: var(--text-muted);
}

#user-profile-banner .avatar {
    margin-left: 50px;
    margin-top: -27px;
}

#user-profile-banner .avatar .avatar {
    width: 140px;
    height: 140px;
    border: 4px solid var(--fg-color);
    border-radius: var(--border-radius-full);
}
1 Like