ElkArte Community

Elk Development => Theme development => Topic started by: ahrasis on January 15, 2015, 02:41:18 am

Title: More class and division for theme_header_callbacks
Post by: ahrasis on January 15, 2015, 02:41:18 am
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.  :)
Title: Re: More class and division for theme_header_callbacks
Post by: emanuele on January 15, 2015, 03:53:59 am
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). ;)
Title: Re: More class and division for theme_header_callbacks
Post by: ahrasis on January 15, 2015, 04:15:31 am
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
Title: Re: More class and division for theme_header_callbacks
Post by: emanuele on January 15, 2015, 04:31:18 am
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.
Title: Re: More class and division for theme_header_callbacks
Post by: ahrasis on January 17, 2015, 02:02:34 am
I just realized that. So basically only one is needed if you don't mind i.e. additional class beside the wrapper class.
Title: Re: More class and division for theme_header_callbacks
Post by: Spuds on January 17, 2015, 10:21:28 am
Any name suggestions ?  class="wrapper wrapper_adjust" or something?
Title: Re: More class and division for theme_header_callbacks
Post by: emanuele on January 17, 2015, 12:31:50 pm
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>';
}
Title: Re: More class and division for theme_header_callbacks
Post by: Spuds on January 17, 2015, 01:19:21 pm
Ah, OK.  Best wait for a PR then  O:-)
Title: Re: More class and division for theme_header_callbacks
Post by: ahrasis on January 18, 2015, 02:48:34 am
Thank you @emanuele . That is looking good.