Skip to content

Commit

Permalink
V405.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Jan 23, 2025
1 parent a9dca1c commit d1b8475
Show file tree
Hide file tree
Showing 31 changed files with 491 additions and 394 deletions.
11 changes: 10 additions & 1 deletion Changes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Change Log in version 405.1.2 (2024100503)
==========================================
1. Add 'logoalt' setting to provide a description of your logo for accessibility. Multilang compatible.
2. Convert 'msgbadgecolor' into 'notbadgebackgroundcolour' and create 'notbadgecolour' so that both the background and font colour
can be set for the notifications.
3. Fix duplicate custom menu items in 'mobileprimarynav' drawer.

Change Log in version 405.1.1 (2024100502)
==========================================
1. Fix 'Class "core\external\output\icon_system" not found' - #35.
Expand All @@ -12,12 +19,14 @@ Change Log in version 405.1.1 (2024100502)
10. Fix original header search icon colour when open.
11. Fix header search position and default setting value.
12. Tidy header search.
13. Update theme version of FontAwesome free to 6.7.1 from 6.6.0.

Change Log in version 405.1.0 (2024100501)
==========================================
1. Stable release for Moodle 4.5.
2. Fix 'newstickercount' incorrect default value.
3. Add Pace themes from https://codebyzach.github.io/pace/ and add 'pageloadingprogress' and 'pageloadingprogresstheme' settings to new 'General' tab.
3. Add Pace themes from https://codebyzach.github.io/pace/ and add 'pageloadingprogress' and 'pageloadingprogresstheme' settings
to new 'General' tab.
4. Block regions to Frontpage block regions rename.
5. Prevent an open Adaptable settings window overwriting core settings in another.
6. Setting tabs fully alphabetical.
Expand Down
2 changes: 1 addition & 1 deletion classes/output/core_renderer_toolbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -2008,7 +2008,7 @@ public function get_logo($currenttopcat, $shownavbar) {
$this->page->theme->settings->responsivelogo;
$logomarkup = '<div class="pb-2 pr-3 pt-2 bd-highlight' . $responsivelogo . '">';
$logo = '<img src=' . $this->page->theme->setting_file_url($logosetarea, $logosetarea) . ' id="logo"';
$logo .= ' alt="' . get_string('logo', 'theme_adaptable') . '">';
$logo .= ' alt="' . \theme_adaptable\toolbox::get_setting('logoalt', true) . '">';

if ($shownavbar) {
// Logo is not a link to site homepage when there is a navbar.
Expand Down
5 changes: 3 additions & 2 deletions classes/output/navigation/primary.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,13 @@ public function export_for_template(?renderer_base $output = null): array {
if (!empty($target)) {
$thenode->target = $target;
}
$thenode->text = $node->get_text(); // Ensure an icon is shown when no text is. Ref: 'navbardisplaytitles'.
$primarynodes[] = $thenode;
}
$mobileprimarynav = array_merge($primarynodes, $this->get_custom_menu($output));
// Custom menu items obtained in navigation_menu_content().

return [
'mobileprimarynav' => $mobileprimarynav,
'mobileprimarynav' => $primarynodes,
];
}
}
7 changes: 3 additions & 4 deletions db/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,15 @@
'methodname' => 'set_user_preferences',
'description' => 'Set user preferences.',
'type' => 'write',
'capabilities' => 'moodle/site:config',
'loginrequired' => false,
'ajax' => true,
],
];

$services = [
'Adaptable theme FontAwesome map' => [
'functions' => ['theme_adaptable_output_load_fontawesome_icon_map'],
'restrictedusers' => 0,
'enabled' => 1,
'functions' => ['theme_adaptable_output_load_fontawesome_icon_map'],
'restrictedusers' => 0,
'enabled' => 1,
],
];
11 changes: 11 additions & 0 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@ function xmldb_theme_adaptable_upgrade($oldversion = 0) {
upgrade_plugin_savepoint(true, 2024100502, 'theme', 'adaptable');
}

if ($oldversion < 2024100503) {
$value = get_config('theme_adaptable', 'msgbadgecolor');
if (!empty($value)) {
set_config('notbadgebackgroundcolour', $value, 'theme_adaptable');
// Prevent replacement when upgrade has already happened in a version for an older Moodle!
unset_config('msgbadgecolor', 'theme_adaptable');
}

upgrade_plugin_savepoint(true, 2024100503, 'theme', 'adaptable');
}

// Automatic 'Purge all caches'....
purge_all_caches();

Expand Down
Binary file modified fonts/fa-brands-400.ttf
Binary file not shown.
Binary file modified fonts/fa-brands-400.woff2
Binary file not shown.
Binary file modified fonts/fa-regular-400.ttf
Binary file not shown.
Binary file modified fonts/fa-regular-400.woff2
Binary file not shown.
Binary file modified fonts/fa-solid-900.ttf
Binary file not shown.
Binary file modified fonts/fa-solid-900.woff2
Binary file not shown.
Binary file modified fonts/fa-v4compatibility.ttf
Binary file not shown.
Binary file modified fonts/fa-v4compatibility.woff2
Binary file not shown.
10 changes: 8 additions & 2 deletions lang/en/theme_adaptable.php
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,11 @@
$string['headerbkcolor'] = 'Top header background colour';
$string['headerbkcolordesc'] = 'Set the top header background colour.';

$string['msgbadgecolor'] = 'Message badge background colour';
$string['msgbadgecolordesc'] = 'Set the background colour for the messages badge / bubble in the header (displays number of unread messages)';
$string['notbadgecolour'] = 'Notifications badge colour';
$string['notbadgecolourdesc'] = 'Set the colour for the notifications badge / bubble in the header (displays number of unread notifications)';

$string['notbadgebackgroundcolour'] = 'Notifications badge background colour';
$string['notbadgebackgroundcolourdesc'] = 'Set the background colour for the notifications badge / bubble in the header (displays number of unread notifications)';

$string['messagingbackgroundcolor'] = 'Messages main window background colour';
$string['messagingbackgroundcolordesc'] = 'Set the background colour for the messages main chat window.';
Expand Down Expand Up @@ -1212,6 +1215,9 @@
$string['logo'] = 'Logo';
$string['logodesc'] = 'Upload a logo for use on your site. Recommended size is 200px by 80px.';

$string['logoalt'] = 'Logo description';
$string['logoaltdesc'] = 'Provide a description of your logo for accessibility. Multilang compatible.';

$string['favicon'] = 'Favicon';
$string['favicondesc'] = 'Upload a favicon for use on your site using the core setting \'core_admin | favicon\' under \'Site Administration\' -> \'Appearance\' -> \'Logos\'.';

Expand Down
4 changes: 3 additions & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ function theme_adaptable_get_main_scss_content($theme) {
'login',
'menu',
'modal',
'notifications',
'responsive',
'search',
'secondarynavigation',
Expand Down Expand Up @@ -246,7 +247,8 @@ function theme_adaptable_process_scss($scss, $theme) {
'[[setting:headerbgimagetextcolour]]' => '#ffffff',
'[[setting:headertextcolor]]' => '#ffffff',
'[[setting:headertextcolor2]]' => '#ffffff',
'[[setting:msgbadgecolor]]' => '#E53935',
'[[setting:notbadgecolour]]' => '#ffffff',
'[[setting:notbadgebackgroundcolour]]' => '#e53935',
'[[setting:blockbackgroundcolor]]' => '#FFFFFF',
'[[setting:blockheaderbackgroundcolor]]' => '#FFFFFF',
'[[setting:blockbordercolor]]' => '#59585D',
Expand Down
26 changes: 16 additions & 10 deletions scss/fontawesome/_core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
font-weight: var(--#{$fa-css-prefix}-style, #{$fa-style});
}

.#{$fa-css-prefix}-solid,
.#{$fa-css-prefix}-regular,
.#{$fa-css-prefix}-brands,
.fas,
.far,
.fab,
.#{$fa-css-prefix}-sharp-solid,
.#{$fa-css-prefix}-classic,
.#{$fa-css-prefix}-solid,
.#{$fa-css-prefix}-regular,
.#{$fa-css-prefix}-brands,
.#{$fa-css-prefix} {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
Expand All @@ -24,20 +22,28 @@
text-rendering: auto;
}

.fas,
.fas::before,
.far::before,
.fab::before,
.#{$fa-css-prefix}-solid::before,
.#{$fa-css-prefix}-regular::before,
.#{$fa-css-prefix}-brands::before,
.fa::before {
content: var(#{$fa-icon-property});
}

.#{$fa-css-prefix}-classic,
.fas,
.#{$fa-css-prefix}-solid,
.far,
.#{$fa-css-prefix}-regular {
font-family: 'Font Awesome 6 Free';
}

.fab,
.#{$fa-css-prefix}-brands {
.#{$fa-css-prefix}-brands,
.fab {
font-family: 'Font Awesome 6 Brands';
}


%fa-icon {
@include fa-icon;
}
5 changes: 4 additions & 1 deletion scss/fontawesome/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
readers do not read off random characters that represent icons */

@each $name, $icon in $fa-icons {
.#{$fa-css-prefix}-#{$name}::before { content: unquote("\"#{ $icon }\""); }
.#{$fa-css-prefix}-#{$name} {
#{$fa-icon-property}: unquote("\"#{ $icon }\"");
#{$fa-duotone-icon-property}: unquote("\"#{$icon}#{$icon}\"");
}
}

21 changes: 7 additions & 14 deletions scss/fontawesome/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,24 @@
}

// sets a specific icon family to use alongside style + icon mixins
@mixin fa-family-classic() {
@extend .fa-classic;
}

// convenience mixins for declaring pseudo-elements by CSS variable,
// including all style-specific font properties, and both the ::before
// and ::after elements in the duotone case.
// including all style-specific font properties
@mixin fa-icon-solid($fa-var) {
@extend %fa-icon;
@extend .fa-solid;

&::before {
content: unquote("\"#{ $fa-var }\"");
}
& { #{$fa-icon-property}: unquote("\"#{ $fa-var }\""); #{$fa-duotone-icon-property}: unquote("\"#{ $fa-var }#{ $fa-var }\""); }
}
@mixin fa-icon-regular($fa-var) {
@extend %fa-icon;
@extend .fa-regular;

&::before {
content: unquote("\"#{ $fa-var }\"");
}
& { #{$fa-icon-property}: unquote("\"#{ $fa-var }\""); #{$fa-duotone-icon-property}: unquote("\"#{ $fa-var }#{ $fa-var }\""); }
}
@mixin fa-icon-brands($fa-var) {
@extend %fa-icon;
@extend .fa-brands;

&::before {
content: unquote("\"#{ $fa-var }\"");
}
& { #{$fa-icon-property}: unquote("\"#{ $fa-var }\""); #{$fa-duotone-icon-property}: unquote("\"#{ $fa-var }#{ $fa-var }\""); }
}
Loading

0 comments on commit d1b8475

Please sign in to comment.