Adding required bits so theme_more can also set a small logo.
$string['region-side-pre'] = 'Left';
$string['secondarybackground'] = 'Secondary background colour';
$string['secondarybackground_desc'] = 'The background colour of any secondary content, such as blocks.';
+$string['sitelogo'] = 'Site logo';
+$string['sitename'] = 'Display site name along with small logo';
+$string['sitenamedesc'] = 'This setting is only applied if a "Small logo" is set. If no small logo is set the site name is always displayed in the navigation bar, but if it is you can use this setting to display it or not.';
+$string['smalllogo'] = 'Small logo';
+$string['smalllogodesc'] = 'This logo is displayed in the navbar next to the site name, if a "Logo" is set, then it is only displayed on the pages where the logo is not displayed.';
$string['textcolor'] = 'Text colour';
$string['textcolor_desc'] = 'The colour of the text.';
* @return bool
*/
function theme_more_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = array()) {
- if ($context->contextlevel == CONTEXT_SYSTEM && ($filearea === 'logo' || $filearea === 'backgroundimage')) {
+ if ($context->contextlevel == CONTEXT_SYSTEM &&
+ ($filearea === 'logo' || $filearea === 'smalllogo' || $filearea === 'backgroundimage')) {
$theme = theme_config::load('more');
// By default, theme files must be cache-able by both browsers and proxies.
if (!array_key_exists('cacheability', $options)) {
$setting->set_updatedcallback('theme_reset_all_caches');
$settings->add($setting);
+ // Small logo file setting.
+ $name = 'theme_more/smalllogo';
+ $title = get_string('smalllogo', 'theme_more');
+ $description = get_string('smalllogodesc', 'theme_more');
+ $setting = new admin_setting_configstoredfile($name, $title, $description, 'smalllogo');
+ $setting->set_updatedcallback('theme_reset_all_caches');
+ $settings->add($setting);
+
+ // Show site name along with small logo.
+ $name = 'theme_more/sitename';
+ $title = get_string('sitename', 'theme_more');
+ $description = get_string('sitenamedesc', 'theme_more');
+ $setting = new admin_setting_configcheckbox($name, $title, $description, 1);
+ $setting->set_updatedcallback('theme_reset_all_caches');
+ $settings->add($setting);
+
// Custom CSS file.
$name = 'theme_more/customcss';
$title = get_string('customcss', 'theme_more');
float: right;
}
+img.small-logo {
+ float: left;
+ height: 35px;
+ margin: 3px 10px 3px 0;
+}
+
+.dir-rtl img.small-logo {
+ float: right;
+ margin: 3px 0 3px 10px;
+}
+
+@media (max-width: 767px) {
+ .dir-rtl img.small-logo,
+ img.small-logo {
+ margin: 3px;
+ }
+}
+
+@media (max-width: 480px) {
+ .navbar img.small-logo {
+ max-width: 150px;
+ }
+ /* Applying accesshide styles */
+ .navbar .small-logo-container + .brand {
+ position: absolute;
+ left: -10000px;
+ font-size: 1em;
+ font-weight: normal;
+ }
+}
+
/* Custom CSS Settings
-------------------------*/
[[setting:customcss]]
defined('MOODLE_INTERNAL') || die;
-$plugin->version = 2015111600;
+$plugin->version = 2015111601;
$plugin->requires = 2015111000;
$plugin->component = 'theme_more';
$plugin->dependencies = array(
'theme_bootstrapbase' => 2015111000,
- 'theme_clean' => 2015111000,
+ 'theme_clean' => 2015111601,
);