mirror of
https://github.com/kforney/kforney.github.io.git
synced 2025-02-22 04:38:40 -07:00
Style/formatting changes for videos.
This commit is contained in:
parent
5aad2cb576
commit
5132324f86
2 changed files with 68 additions and 52 deletions
|
@ -246,6 +246,7 @@ iframe[src*=itch] {
|
|||
.game-link {
|
||||
text-decoration: none;
|
||||
color: #78a1bb;
|
||||
font-family: "VT323",sans-serif;
|
||||
}
|
||||
|
||||
.game-link:hover {
|
||||
|
@ -264,6 +265,7 @@ and was then modified by me as necessary.*/
|
|||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
border-radius: 40px;
|
||||
box-shadow: #B17300 0px 0px 10px;
|
||||
}
|
||||
|
||||
.youtube-video img {
|
||||
|
|
118
index.html
118
index.html
|
@ -116,15 +116,19 @@
|
|||
<div class="mt-4"></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-8">
|
||||
<div class="youtube-video" data-embed="N5unzGlC9ME">
|
||||
<div class="playButton"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2"></div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-3">
|
||||
<iframe loading="lazy" src="https://itch.io/embed/1308115?border_width=0&bg_color=12161f&fg_color=78a1bb&link_color=ffbc42&border_color=283044" aria-label="The Climb on Itch.io">
|
||||
<iframe loading="lazy"
|
||||
src="https://itch.io/embed/1308115?border_width=0&bg_color=12161f&fg_color=78a1bb&link_color=ffbc42&border_color=283044"
|
||||
aria-label="The Climb on Itch.io">
|
||||
<a href="https://lunarpenguin.itch.io/the-climb">The Climb by Lunar_Penguin</a></iframe>
|
||||
</div>
|
||||
|
||||
|
@ -150,7 +154,9 @@
|
|||
<div class="mt-4"></div>
|
||||
|
||||
<div class="row mt-3">
|
||||
<iframe loading="lazy" src="https://itch.io/embed/689456?border_width=0&bg_color=12161f&fg_color=78a1bb&link_color=ffbc42&border_color=283044" aria-label="Last Minute on Itch.io">
|
||||
<iframe loading="lazy"
|
||||
src="https://itch.io/embed/689456?border_width=0&bg_color=12161f&fg_color=78a1bb&link_color=ffbc42&border_color=283044"
|
||||
aria-label="Last Minute on Itch.io">
|
||||
<a href="https://lunarpenguin.itch.io/last-minute">Last Minute by Lunar_Penguin</a></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -194,47 +200,47 @@
|
|||
<div class="mt-5"></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-8">
|
||||
<div class="youtube-video" data-embed="nra31mia8Y0">
|
||||
<div class="playButton"></div>
|
||||
</div>
|
||||
<!--<iframe class="youtube-iframe" width="560" height="315"
|
||||
src="https://www.youtube-nocookie.com/embed/nra31mia8Y0" title="YouTube video player"
|
||||
frameborder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
allowfullscreen loading="lazy"></iframe>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-md card mt-5">
|
||||
<div class="card-body">
|
||||
<div class="row mt-5">
|
||||
<div class="col-sm-4">
|
||||
<h2>
|
||||
<a class="game-link" href="https://lopar.itch.io/megashigi">Megashigi</a>
|
||||
</h2>
|
||||
<hr/>
|
||||
<p>[2020, Win/Mac/Linux]</p>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<p>Megashigi is a game that I helped create using the Godot Engine, along with several friends, as a
|
||||
birthday gift. My portion of the project included the implementation of the game's playable,
|
||||
interactive credits sequence, as well as general level design, and subtitles for the game's boss
|
||||
rap sequence.</p>
|
||||
</div>
|
||||
<div class="container-md card mt-5">
|
||||
<div class="card-body">
|
||||
<div class="row mt-5">
|
||||
<div class="col-sm-4">
|
||||
<h2>
|
||||
<a class="game-link" href="https://lopar.itch.io/megashigi">Megashigi</a>
|
||||
</h2>
|
||||
<hr/>
|
||||
<p>[2020, Win/Mac/Linux]</p>
|
||||
</div>
|
||||
|
||||
<div class="mt-4"></div>
|
||||
|
||||
<div class="row mt-3">
|
||||
<iframe loading="lazy" src="https://itch.io/embed/630032?border_width=0&bg_color=12161f&fg_color=78a1bb&link_color=ffbc42&border_color=283044" aria-label="Megashigi on Itch.io">
|
||||
<a href="https://lopar.itch.io/megashigi">MEGASHIGI by Lopar</a></iframe>
|
||||
<div class="col-sm-8">
|
||||
<p>Megashigi is a game that I helped create using the Godot Engine, along with several friends, as a
|
||||
birthday gift. My portion of the project included the implementation of the game's playable,
|
||||
interactive credits sequence, as well as general level design, and subtitles for the game's boss
|
||||
rap sequence.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4"></div>
|
||||
|
||||
<div class="row mt-3">
|
||||
<iframe loading="lazy"
|
||||
src="https://itch.io/embed/630032?border_width=0&bg_color=12161f&fg_color=78a1bb&link_color=ffbc42&border_color=283044"
|
||||
aria-label="Megashigi on Itch.io">
|
||||
<a href="https://lopar.itch.io/megashigi">MEGASHIGI by Lopar</a></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="art"></div>
|
||||
|
||||
|
@ -271,46 +277,53 @@
|
|||
</div>
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
<img src="img/art/rakuenDoor.webp" class="d-block w-100" alt="A 3D rendering of a magical door floating in a void." loading="lazy">
|
||||
<img src="img/art/rakuenDoor.webp" class="d-block w-100"
|
||||
alt="A 3D rendering of a magical door floating in a void." loading="lazy">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5 class="text-shadow">RAKUEN ART [2022]</h5>
|
||||
<p class="text-shadow">A scene from the game <i>Rakuen</i>, recreated in Blender.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img src="img/art/airship1.webp" class="d-block w-100" alt="A 3D rendering of a sci-fi airship." loading="lazy">
|
||||
<img src="img/art/airship1.webp" class="d-block w-100" alt="A 3D rendering of a sci-fi airship."
|
||||
loading="lazy">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5 class="text-shadow">AIRSHIP MODEL [2022]</h5>
|
||||
<p class="text-shadow">Created in Blender</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img src="img/art/airship2.webp" class="d-block w-100" alt="A 3D rendering of a sci-fi airship." loading="lazy">
|
||||
<img src="img/art/airship2.webp" class="d-block w-100" alt="A 3D rendering of a sci-fi airship."
|
||||
loading="lazy">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5 class="text-shadow">AIRSHIP MODEL [2022]</h5>
|
||||
<p class="text-shadow">Created in Blender.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img src="img/art/cat.webp" class="d-block w-100" alt="A digital painting of a tabby cat." loading="lazy">
|
||||
<img src="img/art/cat.webp" class="d-block w-100" alt="A digital painting of a tabby cat."
|
||||
loading="lazy">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5 class="text-shadow">DIGITAL PORTRAIT [2021]</h5>
|
||||
<p class="text-shadow">A digital painting of my cat, Okapi.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img src="img/art/portrait_dad.webp" class="d-block w-100" alt="Digital art of a man's face." loading="lazy">
|
||||
<img src="img/art/portrait_dad.webp" class="d-block w-100" alt="Digital art of a man's face."
|
||||
loading="lazy">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5 class="text-shadow"></h5>
|
||||
<p class="text-shadow"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img src="img/art/dadKaj.webp" class="d-block w-100" alt="Digital art of a father and son, standing next to a radio antenna." loading="lazy">
|
||||
<img src="img/art/dadKaj.webp" class="d-block w-100"
|
||||
alt="Digital art of a father and son, standing next to a radio antenna." loading="lazy">
|
||||
<div class="carousel-caption d-none d-md-block"></div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img src="img/art/symbolSet_fullSet.webp" class="d-block w-100" alt="A collection of robot faces, made with vector art." loading="lazy">
|
||||
<img src="img/art/symbolSet_fullSet.webp" class="d-block w-100"
|
||||
alt="A collection of robot faces, made with vector art." loading="lazy">
|
||||
<div class="carousel-caption d-none d-md-block">
|
||||
<h5 class="text-shadow"></h5>
|
||||
<p class="text-shadow"></p>
|
||||
|
@ -439,27 +452,28 @@
|
|||
//This script is for improving page performance by not loading YouTube iFrames until actually necessary.
|
||||
//Code is originally from https://stackoverflow.com/questions/50410828/how-to-prevent-youtube-js-calls-from-slowing-down-page-load
|
||||
//and was then modified by me as necessary.
|
||||
let youtube = document.querySelectorAll( ".youtube-video" );
|
||||
let youtube = document.querySelectorAll(".youtube-video");
|
||||
|
||||
for (let i = 0; i < youtube.length; i++) {
|
||||
|
||||
let source = "https://img.youtube.com/vi/"+ youtube[i].dataset.embed +"/maxresdefault.jpg";
|
||||
let source = "https://img.youtube.com/vi/" + youtube[i].dataset.embed + "/maxresdefault.jpg";
|
||||
|
||||
let image = new Image();
|
||||
image.src = source;
|
||||
image.addEventListener( "load", function() {
|
||||
youtube[ i ].appendChild( image );
|
||||
}( i ) );
|
||||
image.alt = "YouTube thumbnail image.";
|
||||
image.addEventListener("load", function () {
|
||||
youtube[i].appendChild(image);
|
||||
}(i));
|
||||
|
||||
youtube[i].addEventListener( "click", function() {
|
||||
let iframe = document.createElement( "iframe" );
|
||||
iframe.setAttribute( "frameborder", "0" );
|
||||
iframe.setAttribute( "allowfullscreen", "" );
|
||||
iframe.setAttribute( "allow", "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture");
|
||||
iframe.setAttribute( "src", "https://www.youtube-nocookie.com/embed/"+ this.dataset.embed +"?rel=0&showinfo=0&autoplay=1" );
|
||||
youtube[i].addEventListener("click", function () {
|
||||
let iframe = document.createElement("iframe");
|
||||
iframe.setAttribute("frameborder", "0");
|
||||
iframe.setAttribute("allowfullscreen", "");
|
||||
iframe.setAttribute("allow", "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture");
|
||||
iframe.setAttribute("src", "https://www.youtube-nocookie.com/embed/" + this.dataset.embed + "?rel=0&showinfo=0&autoplay=1");
|
||||
this.innerHTML = "";
|
||||
this.appendChild( iframe );
|
||||
} );
|
||||
this.appendChild(iframe);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue