@SimonWpt Would you say the HTML structure of the admin panel is too rigid for your liking (too many elements and subelements as specified in the theme files like
theme/_system/sidebar.html)? If so, merely applying CSS or Tailwind classes to Couch's default markup would indeed seem too time consuming and mind-bending to maintain.
Maybe another approach would be to reorganize the HTML markup itself to make it more flat which can then have Tailwind classes or CSS grid applied. Especially helpful if you plan on making radical visual changes to the admin panel.
So instead of using the default sidebar.html ...
- Code: Select all
<ul id="nav">
<cms:admin_menuitems depth='1'>
[ . . . ]
<li class="nav-group"<cms:if is_menu_collapsed> style="display: none;"</cms:if>>
<ul>
<cms:admin_menuitems depth='1' childof=k_menu_name>
<li>
<a class="<cms:if k_menu_icon >nav-icon</cms:if><cms:if k_is_current> nav-active</cms:if> <cms:show k_menu_class />" title="<cms:show k_menu_name />" href="<cms:show k_menu_link />">
<cms:if k_menu_icon >
<cms:show_icon k_menu_icon />
</cms:if>
<span class="nav-title"><cms:show k_menu_title /></span>
</a>
</li>
</cms:admin_menuitems>
</ul>
</li>
[ . . . ]
</cms:admin_menuitems>
</ul>
... maybe your theme re-interprets the sidebar markup to your liking so it plays nicely with you manner of styling. For instance, I might render the markup like this and use CSS grid for layout.
- Code: Select all
<nav id="sidebar_nav">
<cms:admin_menuitems depth='1'>
[ . . . ]
<section class="nav-group"<cms:if is_menu_collapsed> is-collapsed</cms:if>>
<nav class='sidebar-menu-nav'>
<cms:admin_menuitems depth='1' childof=k_menu_name>
<a class="<cms:if k_menu_icon >has-nav-icon</cms:if><cms:if k_is_current> is-active</cms:if>" title="<cms:show k_menu_name />" href="<cms:show k_menu_link />">
<cms:if k_menu_icon ><span class='nav-icon'><cms:show_icon k_menu_icon /></span></cms:if>
<cms:show k_menu_title />
</a>
</cms:admin_menuitems>
</nav>
</section>
[ . . . ]
</cms:admin_menuitems>
</nav>
If you prefer Tailwind, I imagine you'd just leave out the class names and replace them with Tailwind classes.
Of course that's more work, but if you're really into making a custom theme, I imagine this would be more maintainable than just using CSS applied to Couch's default flavor of markup.
- - - - - - -
@madebym I too find myself always coming back to dear Couch
despite dipping my toes in Processwire, Laravel, etc. Really, it's the pre-built admin panel that I like about Couch. And it's so easy for clients to manage. Of course, some clients would prefer a more shiny and functional admin panel.
And I definitely understand @trendoman's desire for more modern JS-powered editables. Something like
Filestack's approach to uploading assets vs the default KCFinder we have in <cms:editable type='image' />. I use Filestack with some projects for this very reason.