Hello everyone,
I've just worked this afternoon on a problem I had and as I found one solution I decided to post what I have done. Hope this will be usefull. That's all.
Problem: when we try to change the Main Menu font style in the backend, nothing happen in the frontend.
Proposed resolution: 3 steps.
- in sites/all/themes/at-commerce/theme-setting.php , change:
$form['at']['font']['main_menu_font_wrapper']['main_menu_font_container']['main_menu_font'] = array(
'#type' => 'select',
'#title' => t('Font'),
'#default_value' => theme_get_setting('main_menu_font'),
'#options' => array(
'ptf-sss' => t('Candara, Trebuchet MS, Helvetica Neue, Arial, Helvetica, sans-serif'),
'ptf-ssl' => t('Verdana, Geneva, Arial, Helvetica, sans-serif'),
'ptf-a' => t('Arial, Helvetica, sans-serif'),
'ptf-cc' => t('Calibri, Candara, Arial, Helvetica, sans-serif'),
'ptf-m' => t('Segoe UI, Myriad Pro, Myriad, Arial, Helvetica, sans-serif'),
'ptf-l' => t('Lucida Sans Unicode, Lucida Sans, Lucida Grande, Verdana, Geneva, sans-serif'),
'ptf-ss' => t('Garamond, Perpetua, Times New Roman, serif'),
'ptf-sl' => t('Georgia, Baskerville, Palatino, Palatino Linotype, Book Antiqua, Times New Roman, serif'),
'ptf-ms' => t('Consolas, Monaco, Courier New, Courier, monospace'),
),
);into
$form['at']['font']['main_menu_font_wrapper']['main_menu_font_container']['main_menu_font'] = array(
'#type' => 'select',
'#title' => t('Font'),
'#default_value' => theme_get_setting('main_menu_font'),
'#options' => array(
'mmf-sss' => t('Candara, Trebuchet MS, Helvetica Neue, Arial, Helvetica, sans-serif'),
'mmf-ssl' => t('Verdana, Geneva, Arial, Helvetica, sans-serif'),
'mmf-a' => t('Arial, Helvetica, sans-serif'),
'mmf-cc' => t('Calibri, Candara, Arial, Helvetica, sans-serif'),
'mmf-m' => t('Segoe UI, Myriad Pro, Myriad, Arial, Helvetica, sans-serif'),
'mmf-l' => t('Lucida Sans Unicode, Lucida Sans, Lucida Grande, Verdana, Geneva, sans-serif'),
'mmf-ss' => t('Garamond, Perpetua, Times New Roman, serif'),
'mmf-sl' => t('Georgia, Baskerville, Palatino, Palatino Linotype, Book Antiqua, Times New Roman, serif'),
'mmf-ms' => t('Consolas, Monaco, Courier New, Courier, monospace'),
),
);
- in sites/all/themes/at-commerce/css/styles.settings.css
Go to /* Font-Family Presets */
in /* sans-serif small */
Add .mmf-sss #nav-wrapper like that:
body.bf-sss,
.bf-sss .form-text,
.snf-sss #site-name,
.ssf-sss #site-slogan,
.ptf-sss #page-title,
.ntf-sss .article-title,
.ctf-sss .comment-title,
.btf-sss .block-title,
.mmf-sss #nav-wrapper{
font-family: "Trebuchet MS", "Helvetica Neue", Arial, Helvetica, sans-serif;
}Proceed the same way with the orthers type of font.
You need to understand that "f" is for "font", so:
bf = basic font (default font)
snf= site name font
ssf= site slogan font
ptf= page title font
ntf= node title font
ctf= comment title font
btf= block title font
mmf= main menu font
sss= sans-serif small
ssl= sans-serif large
a = sans-serf arial/helvetica
etc.
Nota : the css can be updated to for case (c --> bc, snc, ssc etc) , weight (w --> bw, snw, ssc etc), alignment (a...) and shadow (s...)
- in sites/all/themes/at-commerce/templates/page.tpl.php, replace:
<?php if ($page['menu_bar']): ?>
<?php print render($page['menu_bar']); ?>
<?php endif; ?>by
<?php if ($page['menu_bar']): ?>
<div id="nav-wrapper">
<?php print render($page['menu_bar']); ?>
</div>
<?php endif; ?>
Comments
Comment #1
Jeff Burnz commentedAwesome Ccile, and obvious oversight on my part, thank-you for the detailed report and suggested fixes - I have added these to the theme and will commit to the dev version shortly.
Comment #2
Jeff Burnz commentedOK, either I committed this already or will do very shortly, marking as fixed.