+
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uiowa/uids",
"version": "3.6.18",
"version": "3.6.19",
"description": "The UIowa Design System is specific to the University of Iowa.",
"keywords": [
"uiowa",
Expand Down
Binary file added src/assets/images/play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/scss/uids.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ $imgpath: '../../assets/images';
'stat/stat.scss',
'tables/tables.scss',
'tabs/tabs.scss',
'video/vertical/vertical',
'vertical-video/vertical.scss',
'video/video-utilities/video-utilities';
1 change: 1 addition & 0 deletions src/components/vertical-video/vertical-video--basic.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
title: Portraits Block
hidden: true
title: Vertical Video
hidden: false
order: 3
status: wip
variants:
- name: default
label: Portraits Block
hidden: false
status: null
context:
portrait:
Expand All @@ -27,6 +28,6 @@ variants:

- name: basic
label: Portraits Block Basic
hidden: true
hidden: false


42 changes: 42 additions & 0 deletions src/components/vertical-video/vertical-video.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<div class="portrait__bg">
<div class="portrait__wrapper">
<ul class="portrait__container">
<li class="portrait">
<div class="portrait__item">
<div class="highlight__wrapper">
<h3 class="highlight__title">
<span class="headline__heading">"My communication skills have grown so much since coming here."</span>
</h3>
</div>
<div class="embed-responsive embed-responsive-9by16">
<div class="youtube-player" data-id="KBSqfjfhHp0"></div>
</div>
</div>
</li>
<li class="portrait">
<div class="portrait__item">
<div class="highlight__wrapper">
<h3 class="highlight__title">
<span class="headline__heading">"My communication skills have grown so much since coming here."</span>
</h3>
</div>
<div class="embed-responsive embed-responsive-9by16">
<div class="youtube-player" data-id="maLqE1na-5Q"></div>
</div>
</div>
</li>
<li class="portrait">
<div class="portrait__item">
<div class="highlight__wrapper">
<h3 class="highlight__title">
<span class="headline__heading">"My communication skills have grown so much since coming here."</span>
</h3>
</div>
<div class="embed-responsive embed-responsive-9by16">
<div class="youtube-player" data-id="ibbNN201oDA"></div>
</div>
</div>
</li>
</ul>
</div>
</div>
36 changes: 36 additions & 0 deletions src/components/vertical-video/vertical.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Light YouTube Embeds by @labnol
* Credit: https://www.labnol.org/
*/

function labnolIframe(div) {
var iframe = document.createElement('iframe');
iframe.setAttribute('src', 'https://www.youtube.com/embed/' + div.dataset.id + '?autoplay=1&controls=1&modestbranding=1&rel=0&showinfo=0');
iframe.setAttribute('frameborder', '0');
iframe.setAttribute('allowfullscreen', '1');
iframe.setAttribute('allow', 'accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture');
div.parentNode.replaceChild(iframe, div);


}

function initYouTubeVideos() {
var playerElements = document.querySelectorAll('.youtube-player');
for (var n = 0; n < playerElements.length; n++) {
var videoId = playerElements[n].dataset.id;
var div = document.createElement('div');
div.setAttribute('data-id', videoId);
var thumbNode = document.createElement('img');
thumbNode.src = '//i.ytimg.com/vi/ID/maxresdefault.jpg'.replace('ID', videoId);
div.appendChild(thumbNode);
var playButton = document.createElement('div');
playButton.setAttribute('class', 'play');
div.appendChild(playButton);
div.onclick = function () {
labnolIframe(this);
};
playerElements[n].appendChild(div);
}
}

document.addEventListener('DOMContentLoaded', initYouTubeVideos);
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@import '../../assets/scss/variables';
@import '../../assets/scss/utilities';

.portrait {
@include flexbox;
@include flex-wrap($value: wrap);
Expand Down Expand Up @@ -83,13 +86,28 @@
justify-content: left;
font-size: 1rem;
filter: opacity(0.75);
align-items: center;
justify-content: center;
margin-bottom: 8px;
padding: 2px 0;
text-transform: uppercase;
font-family: Antonio,Antonio-fallback,sans-serif;
-webkit-font-smoothing: auto;
-moz-osx-font-smoothing: auto;
font-size: calc(100% - .7vw);
line-height: 1.7;

@include breakpoint(page-container) {
font-size: 1.1rem;
}

span {

display: inline;
padding: 0.45rem 1rem;
color: #fff;
background: black;
box-decoration-break: clone;
-webkit-box-decoration-break: clone;
@include breakpoint(sm) {
display: inline;
}
Expand All @@ -103,14 +121,15 @@
}

.highlight__wrapper {
display: block;
display: none;
pointer-events: none;
text-align: left;
position: absolute;
padding: $md;
right: 0;
top: 0;
left: 0;
z-index: 1;

&.active {
display: none;
Expand Down Expand Up @@ -244,5 +263,87 @@

.embed-responsive-9by16 {
padding-bottom: 177.78%;
aspect-ratio: 9/16;
}
}


/*
* Light YouTube Embeds by @labnol
* Credit: https://www.labnol.org/
* Video title oauth added by @kmhelander
*/

//.youtube-player {
// position: relative;
// aspect-ratio: 16 / 9; /* Modern browsers https://caniuse.com/mdn-css_properties_aspect-ratio */
// width: 100%;
// overflow: hidden;
// background: #000;
// margin: 5px;
//}
//
//.youtube-player iframe {
// position: absolute;
// top: 0;
// left: 0;
// width: 100%;
// height: 100%;
// z-index: 100;
// background: transparent;
//}

/* Poster image */
.youtube-player img {
object-fit: cover;
display: block;
left: 0;
bottom: 0;
margin: auto;
max-width: 100%;
width: 100%;
position: absolute;
right: 0;
top: 0;
border: none;
height: auto;
cursor: pointer;
transition: 0.4s all;
//padding-bottom: 177.78%;
position: relative;
display: block;
width: 100%;
padding: 0;
overflow: hidden;
cursor: pointer;
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
}

.youtube-player img:hover {
-webkit-filter: brightness(75%);
}

/* Play button on poster image */
.youtube-player .play {
height: 114px;
width: 114px;
left: 50%;
margin-top: 100%;
position: relative;
background: url('../../assets/images/play.png') no-repeat;
cursor: pointer;
transform: translate(-50%, -50%); /* Responsive... */
}

.youtube-player .videotitle {
position: absolute;
font-size: clamp(0.9rem, 2vw, 1.3rem);
color: white;
text-shadow: 1px 1px black;
left: 10px;
top: 10px;
}
23 changes: 0 additions & 23 deletions src/components/video/vertical/vertical--basic.twig

This file was deleted.

65 changes: 0 additions & 65 deletions src/components/video/vertical/vertical.js

This file was deleted.

21 changes: 0 additions & 21 deletions src/components/video/vertical/vertical.twig

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/video/video.config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: Video
order: 0
collate: false
hidden: true
hidden: false
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载