diff --git a/CHANGELOG.md b/CHANGELOG.md index 8af149c6b..447bc4852 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# v1.7.48 +## 10/28/2024 + +1. [](#new) + * New Trait for fetchPriority attribute on images [#3850](https://github.com/getgrav/grav/pull/3850) +1. [](#improved) + * Fix for #3164. Adds aliases as possible commands during lookup [#3863](https://github.com/getgrav/grav/pull/3863) +1. [](#bugfix) + * Fix style conflict with Clockwork and tooltips [#3861](https://github.com/getgrav/grav/pull/3861) + # v1.7.47 ## 10/23/2024 diff --git a/system/assets/debugger/clockwork.css b/system/assets/debugger/clockwork.css index 39c356f83..4e0287b6b 100644 --- a/system/assets/debugger/clockwork.css +++ b/system/assets/debugger/clockwork.css @@ -30,7 +30,7 @@ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAA/1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAeHh4AAAD///8EBAT7+/sLCwv29vYVFRUvLy/t7e3m5ubCwsKxsbE/Pz+mpqZMTEwcHBzy8vLp6emfn5+AgIA2Njbi4uLf39+rq6tzc3NWVlYhISHa2trW1tbS0tLMzMy7u7uZmZmUlJSMjIxvb29kZGRHR0c7Ozt5eXkqKiq1tbWQkJBqampbW1tSUlLHx8eHh4ckJCRDQ0M3wD42AAAAI3RSTlMA/PibTbQ0x76TVAlw4LhZLOuEYCAN9Hjx0a2ppGZEGYw97djhXHwAAATZSURBVFjDlVcHW+MwDO1eFCjj2McNOzvdpXTTXVbL/P+/5SQ7QSSX5Di1X1onfi/Sk+Q4sTDbKqWK+YuznZ2zi3wxVdqK/Zf92M1nT9gnO8rmd398GX6Z3xaoOFoiAQcx3E5efgmeSuN8F6Xg1x3G06l/wjN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3SDoco4ECL4i5dwURbc8NdDZz2IwKicE8d0KIqWetLE3+lL4hvUuGSeRfVWNLfj/gpOw4smBJBkKQHCzlHGwvAj4woB1gq5NGGLSXtORBPnUQPV5/MPVkDMxbpwG7w4x0xL6Ltxka0A/4NBvV09UVk4DoSn/jl2+JQS9q9KYawisAD4CfhsZ4TH3htylsdEHARIQBusqCKyUpymycgbbkkXEXjT3z7/oKQFTFVuZD2FMJHZIDsO5x2d4aAr2jR+GLwZhtAb028/0yJ9J8dE87jQyKObcjtTXT8dH+fDuKF4/eiPwzH44wTf/yUi6wrpRIOZ9lM1EtXAifFI+CJn9+iX/t2xMQwOMth/UZbASi8btAwR9FHWSpJr75g9Oqbin3VDg+SpwlP6k6TB4ex/7JvmcJx8jydy6XPk8eFTKhyfwCgX71MSvaBHgAAAABJRU5ErkJggg==); } -.tooltip { +.clockwork-badge .tooltip { display: none; /* Hidden by default */ position: absolute; bottom: 35px; /* Position above the badge */ @@ -51,11 +51,11 @@ display: block; /* Show tooltip on hover */ } -.tooltip a { +.clockwork-badge .tooltip a { color: #007BFF; text-decoration: none; } -.tooltip a:hover { +.clockwork-badge .tooltip a:hover { text-decoration: underline; -} \ No newline at end of file +} diff --git a/system/blueprints/config/system.yaml b/system/blueprints/config/system.yaml index b0ad371d0..352d4193f 100644 --- a/system/blueprints/config/system.yaml +++ b/system/blueprints/config/system.yaml @@ -1311,6 +1311,17 @@ form: auto: Auto sync: Sync async: Async + + images.defaults.fetchpriority: + type: select + size: small + label: PLUGIN_ADMIN.IMAGES_FETCHPRIORITY + help: PLUGIN_ADMIN.IMAGES_FETCHPRIORITY_HELP + highlight: auto + options: + auto: Auto + high: High + low: Low images.seofriendly: type: toggle diff --git a/system/config/system.yaml b/system/config/system.yaml index 3495c448b..1280f7d13 100644 --- a/system/config/system.yaml +++ b/system/config/system.yaml @@ -169,6 +169,7 @@ images: defaults: loading: auto # Let browser pick [auto|lazy|eager] decoding: auto # Let browser pick [auto|sync|async] + fetchpriority: auto # Let browser pick [auto|high|low] watermark: image: 'system://images/watermark.png' # Path to a watermark image position_y: 'center' # top|center|bottom diff --git a/system/defines.php b/system/defines.php index c3e1cdd65..6538348de 100644 --- a/system/defines.php +++ b/system/defines.php @@ -9,7 +9,7 @@ // Some standard defines define('GRAV', true); -define('GRAV_VERSION', '1.7.47'); +define('GRAV_VERSION', '1.7.48'); define('GRAV_SCHEMA', '1.7.0_2020-11-20_1'); define('GRAV_TESTING', false); diff --git a/system/src/Grav/Common/Media/Traits/ImageFetchPriorityTrait.php b/system/src/Grav/Common/Media/Traits/ImageFetchPriorityTrait.php new file mode 100644 index 000000000..af20a975a --- /dev/null +++ b/system/src/Grav/Common/Media/Traits/ImageFetchPriorityTrait.php @@ -0,0 +1,40 @@ +get('system.images.defaults.fetchpriority', 'auto'); + } + + // Validate the provided value (similar to loading and decoding attributes) + if ($value !== null && $value !== 'auto') { + $this->attributes['fetchpriority'] = $value; + } + + return $this; + } + +} \ No newline at end of file diff --git a/system/src/Grav/Common/Page/Medium/ImageMedium.php b/system/src/Grav/Common/Page/Medium/ImageMedium.php index 4de211bee..580e9f586 100644 --- a/system/src/Grav/Common/Page/Medium/ImageMedium.php +++ b/system/src/Grav/Common/Page/Medium/ImageMedium.php @@ -16,6 +16,7 @@ use Grav\Common\Media\Interfaces\MediaLinkInterface; use Grav\Common\Media\Traits\ImageLoadingTrait; use Grav\Common\Media\Traits\ImageDecodingTrait; +use Grav\Common\Media\Traits\ImageFetchPriorityTrait; use Grav\Common\Media\Traits\ImageMediaTrait; use Grav\Common\Utils; use Gregwar\Image\Image; @@ -32,6 +33,7 @@ class ImageMedium extends Medium implements ImageMediaInterface, ImageManipulate use ImageMediaTrait; use ImageLoadingTrait; use ImageDecodingTrait; + use ImageFetchPriorityTrait; /** * @var mixed|string diff --git a/system/src/Grav/Console/Application/CommandLoader/PluginCommandLoader.php b/system/src/Grav/Console/Application/CommandLoader/PluginCommandLoader.php index f550c518e..210250c64 100644 --- a/system/src/Grav/Console/Application/CommandLoader/PluginCommandLoader.php +++ b/system/src/Grav/Console/Application/CommandLoader/PluginCommandLoader.php @@ -57,6 +57,14 @@ public function __construct(string $name) $command = new $command_class(); if ($command instanceof Command) { $this->commands[$command->getName()] = $command; + + // If the command has an alias, add that as a possible command name. + $aliases = $this->commands[$command->getName()]->getAliases(); + if (isset($aliases)) { + foreach ($aliases as $alias) { + $this->commands[$alias] = $command; + } + } } } }