silverbulletmd / silverbullet

The knowledge tinkerer's notebook
https://silverbullet.md
MIT License
2.36k stars 169 forks source link

Change top bar to flexbox #753

Closed onespaceman closed 7 months ago

onespaceman commented 7 months ago

Fixes https://github.com/silverbulletmd/silverbullet/blob/a8d042f9b27184f7894f7aab38df9ad058492059/web/components/top_bar.tsx#L49-L51

and allows moving action buttons to left of title and reorder the sync button with the order attribute in css.

#sb-top .sb-actions {
  order: -1;
}

#sb-top .sb-actions button:first-child {
  order: 99;
}
zefhemel commented 7 months ago

I tested this and it seems to work. I'm very happy about this. CSS is definitely my weakness and honestly one that I'm not very interested in improving. If you would continue to contribute more CSS related improvements (I bet there's tons to be made) I'd be very grateful. Thanks!

zefhemel commented 7 months ago

@onespaceman I reverted this change because it introduced a regression in layout: the title is no longer aligned the the main content: see https://github.com/silverbulletmd/silverbullet/pull/760 could you have a look?

zefhemel commented 7 months ago

For the record, this happened on silverbullet.md. You can emulate this by running silverbullet on the website folder in this repo.