Skip to content

Commit

Permalink
Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenckens committed Feb 9, 2024
1 parent e86cf1c commit 1a14bed
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 110 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
![Splashing Images](https://www.studioespresso.co/assets/github-banner-unsplash.png)
# Unsplash for Craft CMS

unsplash.com, integrated right into your Craft CMS control panel 📸


![Unsplash for Craft CMS](https://www.studioespresso.co/assets/Unsplash-Github-banner.png)

# Splashing Images for Craft CMS

unsplash.com integration for Craft CMS

## Installation

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "studioespresso/craft-splashingimages",
"description": "unsplash.com integration for Craft 3",
"description": "unsplash.com integration for Craft CMS",
"type": "craft-plugin",
"version": "5.0.0-alpha.3",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ includes:
- vendor/craftcms/phpstan/phpstan.neon

parameters:
level: 1
level: 3
paths:
- src
4 changes: 1 addition & 3 deletions src/SplashingImages.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ function(PluginEvent $event) {

/**
* Creates and returns the model used to store the plugin’s settings.
*
* @return \craft\base\Model|null
*/
**/
protected function createSettingsModel(): Model
{
return new Settings();
Expand Down
2 changes: 2 additions & 0 deletions src/controllers/DownloadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ public function actionIndex(): \yii\web\Response|false
$asset = new Asset();
$asset->tempFilePath = $tempPath;
$asset->filename = $tmpImage;
/** @phpstan-ignore-next-line */
if ($photo->description) {
$asset->alt = $photo->description;
}
$asset->newFolderId = $folder->id;
$asset->volumeId = $volume->id;
/** @phpstan-ignore-next-line */
$asset->title = 'Photo by ' . $photo->photographer()->name;
$asset->avoidFilenameConflicts = true;
$asset->setScenario(Asset::SCENARIO_CREATE);
Expand Down
102 changes: 0 additions & 102 deletions src/migrations/Install.php

This file was deleted.

1 change: 1 addition & 0 deletions src/services/UnsplashService.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct(array $config = [])
'applicationId' => 'f2f0833b9b95a11260cdbb20622e4990579254f787705ebe298cfdad4415198e',
'utmSource' => 'Craft 3 Unsplash',
]);
parent::__construct($config);
}

public function getPhoto($id): Photo
Expand Down

0 comments on commit 1a14bed

Please sign in to comment.