Skip to content

Commit

Permalink
Added video description to the property editor
Browse files Browse the repository at this point in the history
  • Loading branch information
abjerner committed May 22, 2023
1 parent 68ea09f commit 9030e3e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,16 @@

if (!rawVideoData) {
vm.videoId = null;
vm.title = null,
vm.title = null;
vm.description = null;
vm.duration = null;
vm.thumbnail = null;
return;
}

vm.videoId = rawVideoData.id;
vm.title = rawVideoData.snippet?.title,
vm.title = rawVideoData.snippet?.title;
vm.description = rawVideoData.snippet?.description;
vm.duration = rawVideoData.contentDetails?.duration;
vm.thumbnail = youTubeService.getThumbnail(rawVideoData);

Expand Down
11 changes: 10 additions & 1 deletion src/Limbo.Umbraco.YouTube/wwwroot/Styles/Default.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
}
.youtube-video input {
width: 100%;
max-width: 1100px;
flex: 1;
}
.youtube-video textarea {
width: 100%;
max-width: 1100px;
flex: 1;
min-height: 110px;
resize: vertical;
Expand Down Expand Up @@ -45,7 +47,7 @@
border: 1px solid #e9e9eb;
border-radius: 3px;
padding: 12px 15px;
max-width: 800px;
max-width: 1100px;
box-sizing: border-box;
flex-wrap: wrap;
gap: 20px 15px;
Expand Down Expand Up @@ -75,6 +77,13 @@
.youtube-video-info {
flex: 1;
}
.youtube-video-description {
margin-top: 15px;
white-space: pre-wrap;
color: #333;
line-height: 20px;
font-size: 14px;
}
.youtube-video pre {
display: none;
font-size: 10px;
Expand Down
8 changes: 8 additions & 0 deletions src/Limbo.Umbraco.YouTube/wwwroot/Styles/Default.less
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@
flex: 1;
}

&-description {
margin-top: 15px;
white-space: pre-wrap;
color: #333;
line-height: 20px;
font-size: 14px;
}

pre {
display: none;
font-size: 10px;
Expand Down
1 change: 1 addition & 0 deletions src/Limbo.Umbraco.YouTube/wwwroot/Views/Video.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ <h5><localize key="limboYouTube_video">Video</localize></h5>
</td>
</tr>
</table>
<div ng-if="vm.description" class="youtube-video-description">{{vm.description}}</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 9030e3e

Please sign in to comment.