-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from KuriousAgency/v1
video field type
- Loading branch information
Showing
14 changed files
with
647 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
{ | ||
"name": "mikestecker/craft-videoembedder", | ||
"description": "Craft plugin to generate an embed URL from a YouTube or Vimeo URL.", | ||
"type": "craft-plugin", | ||
"version": "1.0.9", | ||
"keywords": [ | ||
"craft", | ||
"cms", | ||
"craftcms", | ||
"craft-plugin", | ||
"video embedder" | ||
], | ||
"support": { | ||
"docs": "https://github.com/mikestecker/craft-videoembedder/blob/v1/README.md", | ||
"issues": "https://github.com/mikestecker/craft-videoembedder/issues" | ||
}, | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Mike Stecker", | ||
"homepage": "http://github.com/mikestecker" | ||
} | ||
], | ||
"require": { | ||
"craftcms/cms": "^3.0.0", | ||
"embed/embed": "^3.3" | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "composer", | ||
"url": "https://asset-packagist.org" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"mikestecker\\videoembedder\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"name": "Video Embedder", | ||
"handle": "video-embedder", | ||
"schemaVersion": "1.0.0", | ||
"hasCpSettings": false, | ||
"hasCpSection": false, | ||
"changelogUrl": "https://raw.githubusercontent.com/mikestecker/craft-videoembedder/v1/CHANGELOG.md", | ||
"class": "mikestecker\\videoembedder\\VideoEmbedder" | ||
} | ||
"name": "mikestecker/craft-videoembedder", | ||
"description": "Craft plugin to generate an embed URL from a YouTube or Vimeo URL.", | ||
"type": "craft-plugin", | ||
"version": "1.1.0", | ||
"keywords": [ | ||
"craft", | ||
"cms", | ||
"craftcms", | ||
"craft-plugin", | ||
"video embedder" | ||
], | ||
"support": { | ||
"docs": "https://github.com/mikestecker/craft-videoembedder/blob/v1/README.md", | ||
"issues": "https://github.com/mikestecker/craft-videoembedder/issues" | ||
}, | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Mike Stecker", | ||
"homepage": "http://github.com/mikestecker" | ||
} | ||
], | ||
"require": { | ||
"craftcms/cms": "^3.0.0", | ||
"embed/embed": "^3.3" | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "composer", | ||
"url": "https://asset-packagist.org" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"mikestecker\\videoembedder\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"name": "Video Embedder", | ||
"handle": "video-embedder", | ||
"schemaVersion": "1.0.0", | ||
"hasCpSettings": false, | ||
"hasCpSection": false, | ||
"changelogUrl": "https://raw.githubusercontent.com/mikestecker/craft-videoembedder/v1/CHANGELOG.md", | ||
"class": "mikestecker\\videoembedder\\VideoEmbedder" | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* Video Embedder plugin for Craft CMS 3.x | ||
* | ||
* Craft plugin to generate an embed URL from a YouTube or Vimeo URL. | ||
* | ||
* @link http://github.com/mikestecker | ||
* @copyright Copyright (c) 2017 Mike Stecker | ||
*/ | ||
|
||
namespace mikestecker\videoembedder\assetbundles\videofield; | ||
|
||
use craft\web\AssetBundle; | ||
use craft\web\assets\cp\CpAsset; | ||
|
||
class VideoFieldAsset extends AssetBundle | ||
{ | ||
// Public Methods | ||
// ========================================================================= | ||
|
||
/** | ||
* Initializes the bundle. | ||
*/ | ||
public function init() | ||
{ | ||
// define the path that your publishable resources live | ||
$this->sourcePath = "@mikestecker/videoembedder/assetbundles/videofield/dist"; | ||
|
||
// define the dependencies | ||
$this->depends = [ | ||
CpAsset::class, | ||
]; | ||
|
||
// define the relative path to CSS/JS files that should be registered with the page | ||
// when this asset bundle is registered | ||
$this->js = [ | ||
'js/Video.js', | ||
]; | ||
|
||
$this->css = [ | ||
'css/Video.css', | ||
]; | ||
|
||
parent::init(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* Video Embedder plugin for Craft CMS 3.x | ||
* | ||
* Craft plugin to generate an embed URL from a YouTube or Vimeo URL. | ||
* | ||
* @link http://github.com/mikestecker | ||
* @copyright Copyright (c) 2017 Mike Stecker | ||
*/ | ||
|
||
div.video-embedder-container { | ||
padding: 14px; | ||
border: 1px solid #e3e5e8; | ||
background: #fafafa; | ||
border-radius: 4px; | ||
margin-top: 4px; | ||
} | ||
div.video-embedder-previewContainer { | ||
position: relative; | ||
display: block; | ||
width: 320px; | ||
padding: 0; | ||
overflow: hidden; | ||
} | ||
div.video-embedder-previewContainer::before { | ||
display: block; | ||
content: ''; | ||
padding-top: 56%; | ||
} | ||
div.video-embedder-previewContainer iframe { | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
border: 0; | ||
} | ||
div.video-embedder-previewContainer.is-loading { | ||
opacity: 0.5; | ||
} | ||
|
||
.video-embedder-tableAttributeHtml { | ||
display: inline-block; | ||
} | ||
.video-embedder-tableAttributeHtml-thumb { | ||
margin-right: 8px; | ||
height: 35px; | ||
} | ||
.video-embedder-tableAttributeHtml-thumb img { | ||
height: 100%; | ||
} |
Oops, something went wrong.