Forums

Juliette theme development notes


Jimako » 2 months ago

Logo

{NAVBAR_BRANDING} shortcode was used. Customized width of image and HTML markup directly in this shortcode.

Normally you can select 3 options, but because there is only logo available now, available options were changed in theme_config.php

This way:

//$brandingOpts = array('sitename'=>LAN_THEMEPREF_04, 'logo' => LAN_THEMEPREF_05, 'sitenamelogo'=>LAN_THEMEPREF_06);
$brandingOpts = array('logo' => LAN_THEMEPREF_05);

You can play with it. Maybe it works out of the box, maybe some styling fix is needed. 

DONE.


Jimako
Main Admin

Jimako » 2 months ago

Header contact email.

Go to Site Preferences. Find Contact information and delete them. After saving you will see new options and one of them is email. Fill it. 

New theme shortcode was added:

/* {HEADER_CONTACT_EMAIL} */
function sc_header_contact_email()
{
$template = '<a class="reset-anchor text-small mb-0 h6 d-none d-lg-block" href="mailto:{CONTACT_INFO: type=email1}"><i class="far fa-envelope mr-2 text-primary"></i>{CONTACT_INFO: type=email1}</a>';
$contact_shortcodes = e107::getScBatch('contact');
$text = e107::getParser()->parseTemplate($template, true, $contact_shortcodes);

DONE.


Jimako
Main Admin

Jimako » 2 months ago

Finalizing header part

- create headers folder on parent/core theme. Create file header_default.html

- copy there the header code from theme.html and replace it with:

{LAYOUT_HEADER: layout=default&theme=juliette-core}

This way the same header is used for all pages. If you need to separate headers, move this shortcode to layouts file. It works too.

If you need to customized this header, copy it to your final theme in the same position: juliette/headers/header_default.html and change shortcode to:

{LAYOUT_HEADER: layout=default&theme=juliette}

You can rename it, if file name is f.e. header_custom.html, then shortcode will be:

{LAYOUT_HEADER: layout=custom&theme=juliette}

DONE. 


Jimako
Main Admin

Jimako » 2 months ago

I would do the same thing for the footer, it is pretty easy, and the theme works.

<span>{LAYOUT_FOOTER: layout=default&theme=juliette-core}</span>

But as soon you use the menu area in the footer file, the Menu Manager is not able to detect it. 

I tried to report this, https://github.com/e107inc/e107/issues/4386, but... they said it has to work. 

It works only in theme.html or maybe in layouts, but not from an external file. 

I let you there 2 versions of the footer, with a hardcoded logo and a second with a menu area. 

I gave up trying for blind... asked for a working example of how to do this. Still waiting. 

FOR NOW, DONE.


Jimako
Main Admin
Moderator(s): Jimako