Skip to content

Commit

Permalink
[TASK] Rename extension from DominantImageColor to LazyLoadPlaceholder
Browse files Browse the repository at this point in the history
  • Loading branch information
fsaris committed Mar 5, 2017
1 parent daa1997 commit 5d972fa
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Classes/Resource/Extractor/DominantColorExtractor.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace MiniFranske\DominantImageColor\Resource\Extractor;
namespace MiniFranske\LazyLoadPlaceholder\Resource\Extractor;

/*
* This file is part of the TYPO3 CMS project.
Expand All @@ -20,7 +20,7 @@

/**
* Class DominantColorExtractor
* @package MiniFranske\DominantImageColor\Resource\Extractor
* @package MiniFranske\LazyLoadPlaceholder\Resource\Extractor
*/
class DominantColorExtractor implements ExtractorInterface
{
Expand Down
4 changes: 2 additions & 2 deletions Classes/Service/Base64ImageService.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace MiniFranske\DominantImageColor\Service;
namespace MiniFranske\LazyLoadPlaceholder\Service;

/*
* This file is part of the TYPO3 CMS project.
Expand All @@ -17,7 +17,7 @@

/**
* Class GifBuilderService
* @package MiniFranske\DominantImageColor\Service
* @package MiniFranske\LazyLoadPlaceholder\Service
*/
class Base64ImageService implements SingletonInterface
{
Expand Down
4 changes: 2 additions & 2 deletions Classes/ViewHelpers/LazyImageViewHelper.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace MiniFranske\DominantImageColor\ViewHelpers;
namespace MiniFranske\LazyLoadPlaceholder\ViewHelpers;

/*
* This file is part of the TYPO3 CMS project.
Expand All @@ -13,7 +13,7 @@
*
* The TYPO3 project - inspiring people to share!
*/
use MiniFranske\DominantImageColor\Service\Base64ImageService;
use MiniFranske\LazyLoadPlaceholder\Service\Base64ImageService;
use TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection;
use TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException;

Expand Down
2 changes: 1 addition & 1 deletion Configuration/TCA/Overrides/sys_file_metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'exclude' => 1,
'l10n_mode' => 'exclude',
'l10n_display' => 'defaultAsReadonly',
'label' => 'LLL:EXT:dominant_image_color/Resources/Private/Language/locallang_db.xlf:sys_file_metadata.dominant_color',
'label' => 'LLL:EXT:lazy_load_placeholder/Resources/Private/Language/locallang_db.xlf:sys_file_metadata.dominant_color',
'config' => [
'type' => 'input',
'renderType' => 'colorpicker',
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Dominant image color for lazy loading images in TYPO3
=====================================================
Placeholder images for lazy loading images in TYPO3
===================================================

This extension adds metadata extractor that detects/calculates the dominant color of an images after upload.
The dominant color can be used in FE rendering of images to fill the empty places of the lazy loaded images.

Features:
- metadata extractor to pick/store the dominant color of every uploaded image
- `dic:lazyImage` viewhelper that can be used as replacement of `f:image`
- `llp:lazyImage` viewhelper that can be used as replacement of `f:image`
the `src` becomes a `data:image/svg+xml;base64` string that holds a svg placeholder image in the dominant color
the real image is added to `data-src`
- property `dominant_color` is added to the properties of every image object `{image.properties.dominant_color}`
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Language/locallang_db.xlf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2017-02-25T18:47:00Z"
product-name="dominant_image_color">
product-name="lazy_load_placeholder">
<header/>
<body>
<trans-unit id="sys_file_metadata.dominant_color">
Expand Down
22 changes: 15 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
{
"name": "minifranske/dominant-image-color",
"name": "minifranske/lazy-load-placeholder",
"type": "typo3-cms-extension",
"description": "Determine the dominant image color to use as background for lazy loading images etc",
"description": "Create placeholders for lazy loading images for instance based on the dominant image color",
"keywords": [
"TYPO3",
"extension",
"images",
"lazyloading",
"placeholder",
"dominant-color"
],
"license": ["GPL-2.0+"],
"require": {
"php": ">=5.5.0",
"typo3/cms-core": ">=7.6.0,<8.9.99",
"ksubileau/color-thief-php": "^1.3.0"
},
"replace": {
"dominant_image_color": "self.version",
"typo3-ter/dominant_image_color": "self.version"
"lazy_load_placeholder": "self.version",
"typo3-ter/lazy_load_placeholder": "self.version"
},
"require-dev": {
"mikey179/vfsStream": "1.4.*@dev",
"phpunit/phpunit": "~4.8.0"
},
"autoload": {
"psr-4": {
"MiniFranske\\DominantImageColor\\": "Classes/"
"MiniFranske\\LazyLoadPlaceholder\\": "Classes/"
}
},
"autoload-dev": {
"psr-4": {
"MiniFranske\\DominantImageColor\\Tests\\": "Tests",
"MiniFranske\\LazyLoadPlaceholder\\Tests\\": "Tests",
"TYPO3\\CMS\\Core\\Tests\\": ".Build/vendor/typo3/cms/typo3/sysext/core/Tests/",
"TYPO3\\CMS\\Fluid\\Tests\\": ".Build/vendor/typo3/cms/typo3/sysext/fluid/Tests/"
}
Expand All @@ -35,7 +43,7 @@
"scripts": {
"post-autoload-dump": [
"mkdir -p .Build/Web/typo3conf/ext/",
"[ -L .Build/Web/typo3conf/ext/dominant_image_color ] || ln -snvf ../../../../. .Build/Web/typo3conf/ext/dominant_image_color"
"[ -L .Build/Web/typo3conf/ext/lazy_load_placeholder ] || ln -snvf ../../../../. .Build/Web/typo3conf/ext/lazy_load_placeholder"
]
},
"extra": {
Expand Down
4 changes: 2 additions & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
$EM_CONF[$_EXTKEY] = [
'title' => 'Dominant image color extractor',
'description' => 'Determine the dominant image color to use as background for lazy loading images etc',
'title' => 'Lazy load placeholders',
'description' => 'Create placeholders for lazy loading images for instance based on the dominant image color',
'category' => 'be',
'state' => 'stable',
'clearCacheOnLoad' => 1,
Expand Down
2 changes: 1 addition & 1 deletion ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
defined('TYPO3_MODE') || die('Access denied');

\TYPO3\CMS\Core\Resource\Index\ExtractorRegistry::getInstance()->registerExtractionService(
\MiniFranske\DominantImageColor\Resource\Extractor\DominantColorExtractor::class
\MiniFranske\LazyLoadPlaceholder\Resource\Extractor\DominantColorExtractor::class
);

0 comments on commit 5d972fa

Please sign in to comment.