This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5914fe0
commit 187db67
Showing
34 changed files
with
877 additions
and
5 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
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,7 @@ | ||
# Boostrap & intro to Javascript | ||
|
||
This session will cover using the bootstrap CSS framework, and introducing javascript | ||
|
||
[Slides](https://docs.google.com/presentation/d/1tSxtWYPm9lxsX1k3s7kfmR3uciSA-iD21rLpOY0Zi0E/edit?usp=sharing) | ||
|
||
<iframe width="100%" height="400" src="https://www.youtube.com/embed/wRHcU-z1G30" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> |
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
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,3 +1,5 @@ | ||
# Day 7 | ||
|
||
Deploying Sites & CI/CD | ||
|
||
[Slides](https://docs.google.com/presentation/d/1E0M7G5Ukue1cqFQ3SvwbuNGYzey7WnlY_dEnDqFQRCM/edit?usp=sharing) |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Kieran Wood | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,2 @@ | ||
# session-8-api | ||
The static file API's used in schulich ignite web course session 8 |
9 changes: 9 additions & 0 deletions
9
Day 8/examples/kitchen sink/assets/bootstrap/css/bootstrap.min.css
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,43 @@ | ||
(function() { | ||
"use strict"; // Start of use strict | ||
|
||
var mainNav = document.querySelector('#mainNav'); | ||
|
||
if (mainNav) { | ||
|
||
var navbarCollapse = mainNav.querySelector('.navbar-collapse'); | ||
|
||
if (navbarCollapse) { | ||
|
||
var collapse = new bootstrap.Collapse(navbarCollapse, { | ||
toggle: false | ||
}); | ||
|
||
var navbarItems = navbarCollapse.querySelectorAll('a'); | ||
|
||
// Closes responsive menu when a scroll trigger link is clicked | ||
for (var item of navbarItems) { | ||
item.addEventListener('click', function (event) { | ||
collapse.hide(); | ||
}); | ||
} | ||
} | ||
|
||
// Collapse Navbar | ||
var collapseNavbar = function() { | ||
|
||
var scrollTop = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop; | ||
|
||
if (scrollTop > 100) { | ||
mainNav.classList.add("navbar-shrink"); | ||
} else { | ||
mainNav.classList.remove("navbar-shrink"); | ||
} | ||
}; | ||
// Collapse now if page is not at top | ||
collapseNavbar(); | ||
// Collapse the navbar when page is scrolled | ||
document.addEventListener("scroll", collapseNavbar); | ||
} | ||
|
||
})(); // End of use strict |
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,162 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<title>3D model example</title> | ||
<!-- Required meta tags --> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<!-- Bootstrap CSS v5.2.1 --> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" | ||
integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous"> | ||
<style> | ||
*{ | ||
box-sizing: border-box; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
#viewer{ | ||
width:100%; | ||
height:75vh; | ||
box-shadow: -1px -2px 8px 0px rgb(0 0 0 / 26%); | ||
border-radius: 4em 1em; | ||
margin-bottom: 5vh; | ||
} | ||
#viewer > model-viewer{ | ||
width:100%; | ||
height:75vh; | ||
} | ||
.list-group { | ||
max-width: 460px; | ||
margin: 4rem auto; | ||
} | ||
.container{ | ||
max-width: 95% !important; | ||
} | ||
.form-check-input:checked + .form-checked-content { | ||
opacity: .5; | ||
} | ||
.form-check-input-placeholder { | ||
border-style: dashed; | ||
} | ||
[contenteditable]:focus { | ||
outline: 0; | ||
} | ||
.list-group-checkable .list-group-item { | ||
cursor: pointer; | ||
} | ||
.list-group-item-check { | ||
position: absolute; | ||
clip: rect(0, 0, 0, 0); | ||
} | ||
.list-group-item-check:hover + .list-group-item { | ||
background-color: var(--bs-light); | ||
} | ||
.list-group-item-check:checked + .list-group-item { | ||
color: #fff; | ||
background-color: var(--bs-blue); | ||
} | ||
.list-group-item-check[disabled] + .list-group-item, | ||
.list-group-item-check:disabled + .list-group-item { | ||
pointer-events: none; | ||
filter: none; | ||
opacity: .5; | ||
} | ||
.list-group-radio .list-group-item { | ||
cursor: pointer; | ||
border-radius: .5rem; | ||
} | ||
.list-group-radio .form-check-input { | ||
z-index: 2; | ||
margin-top: -.5em; | ||
} | ||
.list-group-radio .list-group-item:hover, | ||
.list-group-radio .list-group-item:focus { | ||
background-color: var(--bs-light); | ||
} | ||
.list-group-radio .form-check-input:checked + .list-group-item { | ||
background-color: var(--bs-body); | ||
border-color: var(--bs-blue); | ||
box-shadow: 0 0 0 2px var(--bs-blue); | ||
} | ||
.list-group-radio .form-check-input[disabled] + .list-group-item, | ||
.list-group-radio .form-check-input:disabled + .list-group-item { | ||
pointer-events: none; | ||
filter: none; | ||
opacity: .5; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<!-- Import the component --> | ||
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script> | ||
|
||
<div class="px-4 my-5 text-center" id="header"> | ||
<h1 class="display-5 fw-bold">3D Model viewer test</h1> | ||
<div class="col-lg-6 mx-auto"> | ||
<p class="lead mb-4">Just using this to test out <a href="https://modelviewer.dev/" target="_blank" rel="noopener noreferrer">model-viewer</a></p> | ||
|
||
<h3 class="text-center">Select Model </h3> | ||
<div class="list-group list-group-radio d-grid gap-2 border-0 w-auto"> | ||
<div class="position-relative"> | ||
<input class="form-check-input position-absolute top-50 end-0 me-3 fs-5" type="radio" name="listGroupRadioGrid" id="listGroupRadioGrid1" value="bellsprout" checked="" onchange="changeModel(this.value)"> | ||
<label class="list-group-item py-3 pe-5" for="listGroupRadioGrid1"> | ||
<strong class="fw-semibold">Bellsprout</strong> | ||
</label> | ||
</div> | ||
|
||
<div class="position-relative"> | ||
<input class="form-check-input position-absolute top-50 end-0 me-3 fs-5" type="radio" name="listGroupRadioGrid" id="listGroupRadioGrid2" value="mountain" onchange="changeModel(this.value)"> | ||
<label class="list-group-item py-3 pe-5" for="listGroupRadioGrid2"> | ||
<strong class="fw-semibold">Mountain</strong> | ||
</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="container"> | ||
<div id="viewer"> | ||
<model-viewer | ||
alt="bellsprout" | ||
src="models/bellsprout/bellsprout.glb" | ||
ar | ||
environment-image="winter_lake_01_4k.hdr" | ||
poster="models/bellsprout/bellsprout.png" | ||
shadow-intensity="1" | ||
camera-controls touch-action="pan-y"> | ||
</model-viewer> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
<script> | ||
currentModel = "bellsprout" | ||
function changeModel(value){ | ||
if (currentModel != value){ | ||
document.getElementById("viewer").innerHTML = ` | ||
<model-viewer | ||
alt="${value}" | ||
src="models/${value}/${value}.glb" | ||
ar | ||
environment-image="winter_lake_01_4k.hdr" | ||
poster="models/${value}/${value}.png" | ||
shadow-intensity="1" | ||
camera-controls touch-action="pan-y"> | ||
</model-viewer> | ||
` | ||
} | ||
} | ||
</script> | ||
<!-- Bootstrap JavaScript Libraries --> | ||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" | ||
integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"> | ||
</script> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" | ||
integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous"> | ||
</script> | ||
</body> | ||
|
||
</html> |
Binary file added
BIN
+1.36 MB
Day 8/examples/kitchen sink/html/embedded/models/bellsprout/bellsprout.glb
Binary file not shown.
Binary file added
BIN
+48.8 KB
Day 8/examples/kitchen sink/html/embedded/models/bellsprout/bellsprout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.69 MB
Day 8/examples/kitchen sink/html/embedded/models/mountain/mountain.glb
Binary file not shown.
Binary file added
BIN
+135 KB
Day 8/examples/kitchen sink/html/embedded/models/mountain/mountain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,3 @@ | ||
# Embedded | ||
|
||
The purpose of this is to be embedded with an iframe, and it is meant to do some processing |
Binary file not shown.
7 changes: 7 additions & 0 deletions
7
Day 8/examples/kitchen sink/html/injectable/assets/bootstrap/css/bootstrap.min.css
Large diffs are not rendered by default.
Oops, something went wrong.
61 changes: 61 additions & 0 deletions
61
Day 8/examples/kitchen sink/html/injectable/assets/js/bold-and-dark.js
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,61 @@ | ||
(function() { | ||
"use strict"; // Start of use strict | ||
|
||
function initParallax() { | ||
|
||
if (!('requestAnimationFrame' in window)) return; | ||
if (/Mobile|Android/.test(navigator.userAgent)) return; | ||
|
||
var parallaxItems = document.querySelectorAll('[data-bss-parallax]'); | ||
|
||
if (!parallaxItems.length) return; | ||
|
||
var defaultSpeed = 0.5; | ||
var visible = []; | ||
var scheduled; | ||
|
||
window.addEventListener('scroll', scroll); | ||
window.addEventListener('resize', scroll); | ||
|
||
scroll(); | ||
|
||
function scroll() { | ||
|
||
visible.length = 0; | ||
|
||
for (var i = 0; i < parallaxItems.length; i++) { | ||
var rect = parallaxItems[i].getBoundingClientRect(); | ||
var speed = parseFloat(parallaxItems[i].getAttribute('data-bss-parallax-speed'), 10) || defaultSpeed; | ||
|
||
if (rect.bottom > 0 && rect.top < window.innerHeight) { | ||
visible.push({ | ||
speed: speed, | ||
node: parallaxItems[i] | ||
}); | ||
} | ||
|
||
} | ||
|
||
cancelAnimationFrame(scheduled); | ||
|
||
if (visible.length) { | ||
scheduled = requestAnimationFrame(update); | ||
} | ||
|
||
} | ||
|
||
function update() { | ||
|
||
for (var i = 0; i < visible.length; i++) { | ||
var node = visible[i].node; | ||
var speed = visible[i].speed; | ||
|
||
node.style.transform = 'translate3d(0, ' + (-window.scrollY * speed) + 'px, 0)'; | ||
} | ||
|
||
} | ||
} | ||
|
||
initParallax(); | ||
})(); // End of use strict | ||
|
8 changes: 8 additions & 0 deletions
8
Day 8/examples/kitchen sink/html/injectable/assets/js/bs-init.js
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,8 @@ | ||
document.addEventListener('DOMContentLoaded', function() { | ||
|
||
var charts = document.querySelectorAll('[data-bss-chart]'); | ||
|
||
for (var chart of charts) { | ||
chart.chart = new Chart(chart, JSON.parse(chart.dataset.bssChart)); | ||
} | ||
}, false); |
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,27 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&display=swap"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-8 col-xl-6 text-center mx-auto"> | ||
<h2 class="fw-bold">Look at this graph</h2> | ||
<p>How much money I wish I had over time</p> | ||
</div> | ||
</div> | ||
<div><canvas data-bss-chart="{"type":"line","data":{"labels":["2017","2018","2019","2020","2021","2022"],"datasets":[{"label":"Revenue","backgroundColor":"#51df4e","borderColor":"#4e73df","data":["45000","53000","62500","78000","100000","150000"],"fill":true}]},"options":{"maintainAspectRatio":true,"legend":{"display":false,"labels":{"fontStyle":"normal"}},"title":{"fontStyle":"bold"},"scales":{"xAxes":[{"ticks":{"fontStyle":"normal"}}],"yAxes":[{"ticks":{"fontStyle":"normal"}}]}}}"></canvas></div> | ||
</div> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.bundle.min.js"></script> | ||
<script src="assets/js/bs-init.js"></script> | ||
</body> | ||
</html> | ||
|
||
|
Oops, something went wrong.