Skip to main content
More class and division for theme_header_callbacks Started by ahrasis · · Read 4756 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

More class and division for theme_header_callbacks

The following calls for theme_header_callbacks:

Code: [Select]
		<div class="wrapper">';

call_template_callbacks('th', $context['theme_header_callbacks']);

echo '
</div>

It is nicely wrapped in wrapper class but I think should be given one extra class, useful to cover the overall margin in responsive design.

We got login bar and search bar as default in it but notably, search bar doesn't have its own division. I will suggest that this bar also given it is own division and class.  ::)

I will try to create working part of this idea as my Masa addon is inserted in here as well. I think a properly divided theme_header content will help me or any other mod authors to modify this part as well.  :)

Re: More class and division for theme_header_callbacks

Reply #1

Quote from: ahrasis – It is nicely wrapped in wrapper class but I think should be given one extra class, useful to cover the overall margin in responsive design.
I'm not sure if you mean something like:
Code: [Select]
		<div class="wrapper anotherclass">';
or another div in the loop in function call_template_callbacks.

Quote from: ahrasis – We got login bar and search bar as default in it but notably, search bar doesn't have its own division. I will suggest that this bar also given it is own division and class.  ::)
The login bar is contained into a form with an id. A form and a div are no different (mostly). ;)
Bugs creator.
Features destroyer.
Template killer.

Re: More class and division for theme_header_callbacks

Reply #2

Quote from: emanuele – I'm not sure if you mean something like:
Code: [Select]
		<div class="wrapper anotherclass">';
or another div in the loop in function call_template_callbacks.
Yes. Something like that but may be based on variant.

Quote from: emanuele – The login bar is contained into a form with an id. A form and a div are no different (mostly). ;)

Yeah. Mostly. :P

Re: More class and division for theme_header_callbacks

Reply #3

ehm... you quoted both my proposals! :P Now I'm slightly more confident you are talking about a div in the loop.

What you mean "based on variants"?
The only thing that changes between variants is the variant-specific css loaded, you don't really need anything else.
Bugs creator.
Features destroyer.
Template killer.

Re: More class and division for theme_header_callbacks

Reply #4

I just realized that. So basically only one is needed if you don't mind i.e. additional class beside the wrapper class.

Re: More class and division for theme_header_callbacks

Reply #5

Any name suggestions ?  class="wrapper wrapper_adjust" or something?

Re: More class and division for theme_header_callbacks

Reply #6

I think he is suggesting to modify the template_callback function so that it looks like:
Code: [Select]
foreach ($whatever as $template)
{
  echo '<div class="callback">';
  $template();
  echo '</div>';
}
Bugs creator.
Features destroyer.
Template killer.

Re: More class and division for theme_header_callbacks

Reply #7

Ah, OK.  Best wait for a PR then  O:-)

Re: More class and division for theme_header_callbacks

Reply #8

Thank you @emanuele . That is looking good.