AdminLTE icon indicating copy to clipboard operation
AdminLTE copied to clipboard

Name overflow on sidebar

Open jfcaldeira opened this issue 7 years ago • 4 comments

When name is too long is just overflows past the sidebar. Is there a way it just breaks line or something like that?

jfcaldeira avatar Jun 13 '19 11:06 jfcaldeira

Which version of AdminLTE you use? Can you make a screenshot or give a html code example?

REJack avatar Jun 13 '19 11:06 REJack

I am using AdminLTE 3 latest version

image

`     <!-- Sidebar user panel (optional) -->
        <div class="user-panel custom-user-panel custom-navbar-links mt-3 pb-3 mb-3 d-flex ">
            <div class="image">
                <img src="/Images/default-profile.png" class="img-circle elevation-2" alt="User Image" />
            </div>
            <div class="info" >
                <a href="#" class="d-block text-white" >
                    <i class="fas fa-circle mx-1 fa-xs" style="color: #1dff03;"></i>
                    @{
                        var claimsIdentity = User.Identity as System.Security.Claims.ClaimsIdentity;

                        if (claimsIdentity != null)
                        {
                            var c = claimsIdentity.FindFirst(System.Security.Claims.ClaimTypes.Name);

                            if (c != null)
                            {
                                <span class="custom-navbar-links custom-sidebar-name"> @c.Value.ToString() </span>
                            }
                        }
                    }
                </a>
            </div>
        </div>`

jfcaldeira avatar Jun 13 '19 11:06 jfcaldeira

I’ll see over it later and create a fix soon.

REJack avatar Jun 13 '19 12:06 REJack

There is no global fix for this 😞, you can fix this by your self.

Try this it's the easiest way to get this done:

        <!-- Sidebar user panel (optional) -->
        <div class="user-panel custom-user-panel custom-navbar-links mt-3 pb-3 mb-3 d-flex ">
            <div class="image">
                <img src="/Images/default-profile.png" class="img-circle elevation-2" alt="User Image" />
            </div>
            <div class="info" >
                <a href="#" class="d-block text-white text-truncate" >
                    <i class="fas fa-circle mx-1 fa-xs" style="color: #1dff03;"></i>
                    @{
                        var claimsIdentity = User.Identity as System.Security.Claims.ClaimsIdentity;

                        if (claimsIdentity != null)
                        {
                            var c = claimsIdentity.FindFirst(System.Security.Claims.ClaimTypes.Name);

                            if (c != null)
                            {
                                <span class="custom-navbar-links custom-sidebar-name" title="@c.Value.ToString()" data-toggle="tooltip"> @c.Value.ToString() </span>
                            }
                        }
                    }
                </a>
            </div>
        </div>

REJack avatar Jun 15 '19 11:06 REJack