zhe/hugo-theme-slim

Menu would be out of order if the menu title longer

Closed this issue · 4 comments

Your theme is awesome! Thanks for your working.
Pleasy fix this!

zhe commented

Hi @ghuiii, are you really using this looooooooong word to describe your feelings? 😂

Back to this issue, I didn't set a width to .nav to keep it fluid. I'm not sure how wide the user will need for this nav, 70 or 80px? To quick fix it, I would set a width to the outer div, say 80px, and make the ul text-overflow: ellipsis.

.nav-list {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

What do you say?

Not really!
But it's normal to use some like “读书笔记”,“个人感受”…… Then Slim will not work well.

zhe commented

screen shot 2015-12-28 at 2 45 50 pm

Alright. We can add transform: translateX(-100%); to move the nav to the left based on 100% of its current width.

zhe commented

Commit 50b9b88