@nib-components/content-video-panel v2.3.12
Setting up your component
Delete this section after you've setup the component
Before the component is accepted into the DLS:
Github: Create the repository under your own username/organisation
When the component is accepted into the DLS:
Github: Transfer ownership of the repository tofrontendBuildKite: Create aNew PipelineBuildKite: Enter the following settings:
- Name:
content-link - Git Repository:
git@git.nib.com.au:frontend/content-link.git
BuildKite:Removethe defaultStepand add aRead steps from repositorystep
- And add
cd deploy && bundle install && bundle update sceptre sceptre-dotnet sceptre-app && bundle exec sceptre-app pipeline uploadto the Commands to run textbox - And add
os=linuxto the Agent Targeting Rules textbox
BuildKite:Create Pipelineand follow the instructions to add the webhook to GithubEnterpriseBuildKite: Go toSettings
- Check
Build pull requests from third-party forked repositoriesand clickSave Github Enterprise Settings - Copy the
Markdownbadge fromSettingsand past it below.
Github: Edit the readme to remove these steps and kick off aNew buildGithub: Protect themasterbranch
- Go to
Settings>Branches - Choose the
masterbranch - Check
Protect this branch - Check
Require status checks to pass before merging - Check
Include administratorsandRequire branches to be up to date before merging - Check all
Status checks found in the last week for this repository
@nib-components/content-video-panel
A video panel that contains a video. It's also a panel. The name says it all really.
Installation
npm install --save @nib-components/content-video-panelUsage
import VideoPanel from '@nib-components/content-video-panel';
<VideoPanel/><VideoPanel/>
Properties
title
The title that will appear above the video
caption
The description for the video that will appear underneath, to the left.
source
The source link that appears underneath the video, to the right. It maps to the 'source' content model in contentful.
videoType
This describes what the video actually is, ie YouTube or H.264. It must have an id to indicate what the type is.
Sample Properties
{
id: 'myMockVideoPanel',
title: 'Here is a Cat Video',
caption: 'This is a mock caption',
source: {
id: 'myLink',
text: 'Here is the source link',
href: 'https://docs.joeworkman.net/rapidweaver/stacks/youtube/video-id',
trackingTag: 'foobar'
},
videoType: {
type: 'youTubeVideoType',
id: 'catVideo',
videoId: 'XyNlqQId-nk'
}
};Change log
1.0.0
Initial release.
Contributing
You can edit the files in ./src, whilst running npm run watch. This will compile for the ./dist folder.
Contentful
The video-panel schema, mapping, decorator and tracking tag decorator can be imported from @nib-components/content-link -
import Link, { videoPanelSchema, videoPanelMapping, videoPanelDecorator } from @nib-components/video-panel;A Video Panel entry should be added to the relevant Contentful space with the following entries -
| Name | Field ID | Type | Required/Optional | |
|---|---|---|---|---|
| Label | label | Short text | Required | |
| Title | title | Short text | Optional | |
| Caption | caption | Short text | Optional | |
| Source | source | Reference (Link) | Optional | |
| Video Type | videoType | Reference (YouTube Video Type | others) | Required |
The Video Type as of writing only supports the YouTube video type, but there will be others added.
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago