איך אני יכול לשנות את סדר הכפתורים בכותרת?

סיכום מבוסס בינה מלאכותית

User anton21m is trying to customize the header of their Discourse forum to match a design sketched by their company’s designer. They have successfully removed icons from production but are struggling to move the profile button to the beginning. awesomerobot suggested using CSS to reorder the icons by setting display: flex and adjusting the order property. anton21m modified the code to fit their needs, and it worked.

hello everyone, I want to completely redo the header of the discourse.
The designer of our company sketched such a design for me, and with the help of css did not bring it much

However, I got a problem to move the profile button to the beginning, I searched for sources and found something \app\assets\javascripts\discourse\app\widgets\header.js
Using this help I was able to remove the icons from production and a little more [Solved] How to use virtual-dom's "h" helper in <head> for header-dropdown hamburger widget override? + How to override @computed method?

However, I could not move
The forum now looks like this:


And you need this: (move account button and change icon)

Where do I need to dig to do this:

2 לייקים

You can do something like this with CSS:

.d-header-icons { 
  display: flex;
}

.header-dropdown-toggle.current-user { 
  order: 1; 
}
.header-dropdown-toggle.search-dropdown { 
  order: 2; 
}
.header-dropdown-toggle.hamburger-dropdown { 
  order: 3; 
}
5 לייקים

Thanks, very good.

Modifying it a bit helped me

2 לייקים

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.