More responsiveness
This commit is contained in:
parent
a866692311
commit
a922d0d9de
9 changed files with 65 additions and 90 deletions
|
|
@ -10,11 +10,15 @@
|
||||||
display: grid;
|
display: grid;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(384px, 1fr));
|
||||||
grid-auto-rows: 1fr;
|
grid-auto-rows: 1fr;
|
||||||
grid-gap: 2rem;
|
grid-gap: 2rem;
|
||||||
grid-auto-flow: dense;
|
grid-auto-flow: dense;
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
background-color: $cardColor;
|
background-color: $cardColor;
|
||||||
color: $foreground;
|
color: $foreground;
|
||||||
|
|
|
||||||
|
|
@ -453,13 +453,20 @@ button.cyan.outlined:active {
|
||||||
-webkit-box-pack: center;
|
-webkit-box-pack: center;
|
||||||
-ms-flex-pack: center;
|
-ms-flex-pack: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
-ms-grid-columns: (minmax(300px, 1fr))[auto-fit];
|
-ms-grid-columns: (minmax(384px, 1fr))[auto-fit];
|
||||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(384px, 1fr));
|
||||||
grid-auto-rows: 1fr;
|
grid-auto-rows: 1fr;
|
||||||
grid-gap: 2rem;
|
grid-gap: 2rem;
|
||||||
grid-auto-flow: dense;
|
grid-auto-flow: dense;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.cards {
|
||||||
|
-ms-grid-columns: (minmax(300px, 1fr))[auto-fit];
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.cards .card {
|
.cards .card {
|
||||||
background-color: #2a2a2a;
|
background-color: #2a2a2a;
|
||||||
color: #eeeeee;
|
color: #eeeeee;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -453,13 +453,20 @@ button.cyan.outlined:active {
|
||||||
-webkit-box-pack: center;
|
-webkit-box-pack: center;
|
||||||
-ms-flex-pack: center;
|
-ms-flex-pack: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
-ms-grid-columns: (minmax(300px, 1fr))[auto-fit];
|
-ms-grid-columns: (minmax(384px, 1fr))[auto-fit];
|
||||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(384px, 1fr));
|
||||||
grid-auto-rows: 1fr;
|
grid-auto-rows: 1fr;
|
||||||
grid-gap: 2rem;
|
grid-gap: 2rem;
|
||||||
grid-auto-flow: dense;
|
grid-auto-flow: dense;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.cards {
|
||||||
|
-ms-grid-columns: (minmax(300px, 1fr))[auto-fit];
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.cards .card {
|
.cards .card {
|
||||||
background-color: #f3f3f3;
|
background-color: #f3f3f3;
|
||||||
color: #252525;
|
color: #252525;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -453,13 +453,20 @@ button.cyan.outlined:active {
|
||||||
-webkit-box-pack: center;
|
-webkit-box-pack: center;
|
||||||
-ms-flex-pack: center;
|
-ms-flex-pack: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
-ms-grid-columns: (minmax(300px, 1fr))[auto-fit];
|
-ms-grid-columns: (minmax(384px, 1fr))[auto-fit];
|
||||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(384px, 1fr));
|
||||||
grid-auto-rows: 1fr;
|
grid-auto-rows: 1fr;
|
||||||
grid-gap: 2rem;
|
grid-gap: 2rem;
|
||||||
grid-auto-flow: dense;
|
grid-auto-flow: dense;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.cards {
|
||||||
|
-ms-grid-columns: (minmax(300px, 1fr))[auto-fit];
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.cards .card {
|
.cards .card {
|
||||||
background-color: #26283c;
|
background-color: #26283c;
|
||||||
color: #ccdbf1;
|
color: #ccdbf1;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,56 +1,12 @@
|
||||||
const dispatchModalClosed = (modal) => {
|
const dispatchModal = (event, modal) => {
|
||||||
let evt = new CustomEvent(
|
let evt = new CustomEvent(
|
||||||
"modalClosed",
|
event, {
|
||||||
{
|
detail: {
|
||||||
detail: {
|
modal: modal
|
||||||
message: modal
|
},
|
||||||
},
|
bubbles: true,
|
||||||
bubbles: true,
|
cancelable: false
|
||||||
cancelable: true
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
document.dispatchEvent(evt);
|
|
||||||
};
|
|
||||||
|
|
||||||
const dispatchModalClosing = (modal) => {
|
|
||||||
let evt = new CustomEvent(
|
|
||||||
"modalClosing",
|
|
||||||
{
|
|
||||||
detail: {
|
|
||||||
message: modal
|
|
||||||
},
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
document.dispatchEvent(evt);
|
|
||||||
};
|
|
||||||
|
|
||||||
const dispatchModalOpened = (modal) => {
|
|
||||||
let evt = new CustomEvent(
|
|
||||||
"modalOpened",
|
|
||||||
{
|
|
||||||
detail: {
|
|
||||||
message: modal
|
|
||||||
},
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
document.dispatchEvent(evt);
|
|
||||||
};
|
|
||||||
|
|
||||||
const dispatchModalOpening = (modal) => {
|
|
||||||
let evt = new CustomEvent(
|
|
||||||
"modalOpening",
|
|
||||||
{
|
|
||||||
detail: {
|
|
||||||
message: modal
|
|
||||||
},
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
document.dispatchEvent(evt);
|
document.dispatchEvent(evt);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -60,10 +16,10 @@ window.addEventListener("DOMContentLoaded", (evt) => {
|
||||||
window.onclick = (event) => {
|
window.onclick = (event) => {
|
||||||
if (event.target.classList.contains("modal")) {
|
if (event.target.classList.contains("modal")) {
|
||||||
let modal = event.target;
|
let modal = event.target;
|
||||||
dispatchModalClosing(modal);
|
dispatchModal("modalClosing", modal);
|
||||||
modal.classList.remove("visible");
|
modal.classList.remove("visible");
|
||||||
modal.removeAttribute("active");
|
modal.removeAttribute("active");
|
||||||
dispatchModalClosed(modal);
|
dispatchModal("modalClosed", modal);
|
||||||
document.body.classList.remove("modal-no-scroll");
|
document.body.classList.remove("modal-no-scroll");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -72,10 +28,10 @@ window.addEventListener("DOMContentLoaded", (evt) => {
|
||||||
document.querySelectorAll(".modal .close").forEach((closeBtn) => {
|
document.querySelectorAll(".modal .close").forEach((closeBtn) => {
|
||||||
closeBtn.addEventListener('click', (evt) => {
|
closeBtn.addEventListener('click', (evt) => {
|
||||||
let modal = closeBtn.parentElement.parentElement;
|
let modal = closeBtn.parentElement.parentElement;
|
||||||
dispatchModalClosing(modal);
|
dispatchModal("modalClosing", modal);
|
||||||
modal.classList.remove("visible");
|
modal.classList.remove("visible");
|
||||||
modal.removeAttribute("active");
|
modal.removeAttribute("active");
|
||||||
dispatchModalClosed(modal);
|
dispatchModal("modalClosed", modal);
|
||||||
document.body.classList.remove("modal-no-scroll");
|
document.body.classList.remove("modal-no-scroll");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -84,10 +40,10 @@ window.addEventListener("DOMContentLoaded", (evt) => {
|
||||||
document.body.addEventListener('keydown', (evt) => {
|
document.body.addEventListener('keydown', (evt) => {
|
||||||
if (evt.key == "Escape") {
|
if (evt.key == "Escape") {
|
||||||
let modal = document.querySelector(".modal[active]");
|
let modal = document.querySelector(".modal[active]");
|
||||||
dispatchModalClosing(modal);
|
dispatchModal("modalClosing", modal);
|
||||||
modal.classList.remove("visible");
|
modal.classList.remove("visible");
|
||||||
modal.removeAttribute("active");
|
modal.removeAttribute("active");
|
||||||
dispatchModalClosed(modal);
|
dispatchModal("modalClosed", modal);
|
||||||
document.body.classList.remove("modal-no-scroll");
|
document.body.classList.remove("modal-no-scroll");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -96,21 +52,17 @@ window.addEventListener("DOMContentLoaded", (evt) => {
|
||||||
document.querySelectorAll("[for-modal]").forEach((modalTrigerEl) => {
|
document.querySelectorAll("[for-modal]").forEach((modalTrigerEl) => {
|
||||||
modalTrigerEl.addEventListener('click', (evt) => {
|
modalTrigerEl.addEventListener('click', (evt) => {
|
||||||
let modal = document.getElementById(modalTrigerEl.getAttribute("for-modal"));
|
let modal = document.getElementById(modalTrigerEl.getAttribute("for-modal"));
|
||||||
|
dispatchModal("modalOpening", modal);
|
||||||
dispatchModalOpening(modal);
|
|
||||||
|
|
||||||
modal.classList.add("visible");
|
modal.classList.add("visible");
|
||||||
modal.setAttribute("active", "");
|
modal.setAttribute("active", "");
|
||||||
|
dispatchModal("modalOpened", modal);
|
||||||
dispatchModalOpened(modal);
|
|
||||||
|
|
||||||
document.body.classList.add("modal-no-scroll");
|
document.body.classList.add("modal-no-scroll");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Destroy embeds on modal close
|
// Destroy embeds on modal close
|
||||||
document.addEventListener("modalClosed", (evt) => {
|
document.addEventListener("modalClosed", (evt) => {
|
||||||
evt.detail.message.querySelectorAll("iframe").forEach((iframe) => {
|
evt.detail.modal.querySelectorAll("iframe").forEach((iframe) => {
|
||||||
const origSrc = iframe.getAttribute("src");
|
const origSrc = iframe.getAttribute("src");
|
||||||
iframe.removeAttribute("src");
|
iframe.removeAttribute("src");
|
||||||
iframe.setAttribute("data-src", origSrc);
|
iframe.setAttribute("data-src", origSrc);
|
||||||
|
|
@ -120,7 +72,7 @@ window.addEventListener("DOMContentLoaded", (evt) => {
|
||||||
|
|
||||||
// Re-init embeds on modal open
|
// Re-init embeds on modal open
|
||||||
document.addEventListener("modalOpening", (evt) => {
|
document.addEventListener("modalOpening", (evt) => {
|
||||||
evt.detail.message.querySelectorAll("iframe").forEach((iframe) => {
|
evt.detail.modal.querySelectorAll("iframe").forEach((iframe) => {
|
||||||
if (iframe.hasAttribute("data-src")) {
|
if (iframe.hasAttribute("data-src")) {
|
||||||
const origSrc = iframe.getAttribute("data-src");
|
const origSrc = iframe.getAttribute("data-src");
|
||||||
iframe.removeAttribute("data-src");
|
iframe.removeAttribute("data-src");
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,12 @@
|
||||||
passed! This thesis discussed many forms of <b>real-time</b> scalable video analytics that were done
|
passed! This thesis discussed many forms of <b>real-time</b> scalable video analytics that were done
|
||||||
under <a href="https://utccuip.com/" target="_blank">CUIP</a>. You can see a dashboard of this work
|
under <a href="https://utccuip.com/" target="_blank">CUIP</a>. You can see a dashboard of this work
|
||||||
below!
|
below!
|
||||||
<img class="rounded" src="/Resources/img/Dashboard.png">
|
|
||||||
|
<div class="embed">
|
||||||
|
<iframe data-src="https://dashboard.utccuip.com" frameborder="0"
|
||||||
|
allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -310,19 +315,12 @@
|
||||||
You can also watch an anonymized live stream by clicking the image below!
|
You can also watch an anonymized live stream by clicking the image below!
|
||||||
</h3>
|
</h3>
|
||||||
</p>
|
</p>
|
||||||
<script>
|
|
||||||
let streamRunning = false;
|
<div class="embed">
|
||||||
const toggleStream = (el) => {
|
<iframe data-src="https://video-feeds.utccuip.com/mlk-houston-cam-1" frameborder="0"
|
||||||
streamRunning = !streamRunning;
|
allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
|
||||||
if (streamRunning) {
|
</iframe>
|
||||||
el.src = "https://video-feeds.utccuip.com/mlk-houston-cam-1";
|
</div>
|
||||||
} else {
|
|
||||||
el.src = "/Resources/img/Anonymous.png"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<img style="cursor: pointer" class="rounded" src="/Resources/img/Anonymous.png"
|
|
||||||
onclick="toggleStream(this)">
|
|
||||||
|
|
||||||
<div class="centered" style="padding-top: 1rem; padding-bottom: 1rem">
|
<div class="centered" style="padding-top: 1rem; padding-bottom: 1rem">
|
||||||
<a href="https://video-feeds.utccuip.com/mlk-houston-cam-1" target="_blank">
|
<a href="https://video-feeds.utccuip.com/mlk-houston-cam-1" target="_blank">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue