formwork
formwork copied to clipboard
Add icons to panel navigation
This pull request introduces icon support for navigation items in the panel, enhancing both the configuration and visual presentation of the sidebar and headers. Navigation items can now specify an icon, which is rendered in the sidebar and in the headers of key views. Minor style adjustments are also included to improve icon alignment.
Navigation icon support and rendering:
- Added an
iconproperty to navigation items inpanel/config/navigation.php, specifying icons for each main navigation section. - Updated the
NavigationItemclass to provide anicon()method for retrieving the icon value. - Modified the sidebar partial (
panel/views/partials/sidebar.php) to render the icon for each navigation item if present.
Header icon enhancements:
- Added icon rendering in the headers of dashboard, pages, files, statistics, users, options, and tools views by inserting a
header-icondiv with the relevant icon. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
Styling adjustments:
- Adjusted sidebar navigation item padding and added margin to icons for better alignment in
_sidebar.scss. [1] [2]