Skip to content

Commit

Permalink
08-18-2023
Browse files Browse the repository at this point in the history
  • Loading branch information
midkiffaries committed Aug 18, 2023
1 parent 75a6464 commit 3f1c473
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
19 changes: 10 additions & 9 deletions assets/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ document.addEventListener("keyup", (e) => {
st.textContent = (`
.light-switch {
background: transparent no-repeat 50% 50% / 2.2em;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1024' height='1024'%3E%3Cpath d='M349 242c0 242 165 438 370 438 51 0 99-12 143-34a378 378 0 11-507-480c-4 25-6 50-6 76z' fill='black'/%3E%3C/svg%3E");
background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='1024' height='1024'><path d='M349 242c0 242 165 438 370 438 51 0 99-12 143-34a378 378 0 11-507-480c-4 25-6 50-6 76z' fill='black'/></svg>");
}
body.dark-mode .light-switch {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1024' height='1024'%3E%3Cpath d='M257 528a240 240 0 10480 0 240 240 0 00-480 0zm240-408l-67 135h135zm288 119l-143 47 96 96zm-433 47l-143-47 47 143zM223 459L88 527l135 67zm546 138l135-68-135-67zM497 936l67-135H429zm145-166l143 47-47-143zm-433 47l143-47-96-96z' fill='black'/%3E%3C/svg%3E");
background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='1024' height='1024'><path d='M257 528a240 240 0 10480 0 240 240 0 00-480 0zm240-408l-67 135h135zm288 119l-143 47 96 96zm-433 47l-143-47 47 143zM223 459L88 527l135 67zm546 138l135-68-135-67zM497 936l67-135H429zm145-166l143 47-47-143zm-433 47l143-47-96-96z' fill='black'/></svg>");
}
`);
document.body.appendChild(st);
Expand Down Expand Up @@ -118,9 +118,8 @@ document.addEventListener("keyup", (e) => {

image.src = source;
image.alt = "Load YouTube video";
image.loading = "lazy";
image.decoding = "async";
image.role = "button";
image.fetchpriority = "low";
image.addEventListener("load", function(){youtube[i].appendChild(image)}(i));

youtube[i].addEventListener("click", function() {
Expand Down Expand Up @@ -325,7 +324,7 @@ document.addEventListener("scroll", function () {
transition: all 0.25s ease-in-out 0s;
will-change: transform;
background: no-repeat center center / 1em;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M6.461 29.71L2.242 25.49l18-18 18 18-4.218 4.219-13.782-13.781z' fill='white'/%3E%3C/svg%3E");
background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M6.461 29.71L2.242 25.49l18-18 18 18-4.218 4.219-13.782-13.781z' fill='white'/></svg>");
background-color: rgba(0,0,0,0.3);
backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px);
Expand Down Expand Up @@ -450,9 +449,11 @@ function smoothScroll(loc, duration) {
.lightbox-content img {
border: 1px solid #eee;
min-height: 10em;
min-width: 10em;
transform: all 0.5s ease-in-out;
box-shadow: 0 1px 6px 1px rgba(0,0,0,0.3);
background: no-repeat center center / 5em;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 128 128'%3E%3Cg%3E%3Cpath fill='white' d='M64 10a54 54 0 00-54 54H0a64 64 0 01128 0h-10a54 54 0 00-54-54z'/%3E%3CanimateTransform attributeName='transform' dur='2s' from='0 64 64' repeatCount='indefinite' to='360 64 64' type='rotate'/%3E%3C/g%3E%3C/svg%3E");
background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 128 128'><g><path fill='white' d='M64 10a54 54 0 00-54 54H0a64 64 0 01128 0h-10a54 54 0 00-54-54z'/><CanimateTransform attributeName='transform' dur='2s' from='0 64 64' repeatCount='indefinite' to='360 64 64' type='rotate'/></g></svg>");
}
.lightbox-body-header {
text-transform: uppercase;
Expand All @@ -475,7 +476,7 @@ function smoothScroll(loc, duration) {
top: 0.5em;
border: none;
background: transparent no-repeat center center / 1.6em;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath d='M30 24l-9-9 9-9-6-6-9 9-9-9-6 6 9 9-9 9 6 6 9-9 9 9z' fill='white'/%3E%3C/svg%3E");
background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30'><path d='M30 24l-9-9 9-9-6-6-9 9-9-9-6 6 9 9-9 9 6 6 9-9 9 9z' fill='white'/></svg>");
}
.dialog-close-button:hover {
opacity: 0.9;
Expand Down Expand Up @@ -628,7 +629,7 @@ function ConfirmModal(text, action) {
text-align: left;
}
.dialog-confirm p::before {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M20.9 14.8q1.5-1.5 1.5-3.6 0-2.6-1.9-4.5T16 4.8q-2.6 0-4.5 1.9t-1.9 4.5h3.2q0-1.3 1-2.3 1-1 2.2-1 1.3 0 2.3 1 1 1 1 2.3 0 1.3-1 2.2l-2 2q-1.9 2.1-1.9 4.6v.8h3.2q0-2.5 1.9-4.5zm-3.3 12.4V24h-3.2v3.2zM16 0q6.6 0 11.3 4.7Q32 9.4 32 16q0 6.6-4.7 11.3Q22.6 32 16 32q-6.6 0-11.3-4.7Q0 22.6 0 16 0 9.4 4.7 4.7 9.4 0 16 0z'/%3E%3C/svg%3E");
content: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><path d='M20.9 14.8q1.5-1.5 1.5-3.6 0-2.6-1.9-4.5T16 4.8q-2.6 0-4.5 1.9t-1.9 4.5h3.2q0-1.3 1-2.3 1-1 2.2-1 1.3 0 2.3 1 1 1 1 2.3 0 1.3-1 2.2l-2 2q-1.9 2.1-1.9 4.6v.8h3.2q0-2.5 1.9-4.5zm-3.3 12.4V24h-3.2v3.2zM16 0q6.6 0 11.3 4.7Q32 9.4 32 16q0 6.6-4.7 11.3Q22.6 32 16 32q-6.6 0-11.3-4.7Q0 22.6 0 16 0 9.4 4.7 4.7 9.4 0 16 0z'/></svg>");
padding: 0 0.6em 1em 0;
display: block;
float: left;
Expand Down Expand Up @@ -729,7 +730,7 @@ function HtmlModal(c, v) {
border: none;
filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
background: transparent no-repeat center center / 1.5em;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath d='M30 24l-9-9 9-9-6-6-9 9-9-9-6 6 9 9-9 9 6 6 9-9 9 9z'/%3E%3C/svg%3E");
background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30'><path d='M30 24l-9-9 9-9-6-6-9 9-9-9-6 6 9 9-9 9 6 6 9-9 9 9z'/></svg>");
}
.dialog-close-button:hover {
background-color: transparent;
Expand Down
5 changes: 2 additions & 3 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,15 +669,14 @@ function get_child_pages( $id, $thumbnail ) {
// Get 'Page_CSS' Custom Field which adds custom page styling
function custom_page_css( $id ) {
$css = get_post_meta( $id, 'Page_CSS', true );
$css = preg_replace('/<\/style>/', '', $css); // Remove end style
$css = preg_replace('/<script.*?>(.*)?<\/script>/im', '$1', $css); // remove script
$css = str_replace(array('<','>'), array('%3C','%3E'), $css); // make HTML safe
$css = preg_replace('/\s*([:;{}])\s*/', '$1', $css); // Remove Spaces
$css = preg_replace('/;}/', '}', $css); // Remove new lines

if (empty($css)) {
return NULL;
} else {
return '<style type="text/css" id="Page-CSS" hidden>'.$css.'</style>';
return '<style type="text/css" id="Page-CSS" hidden>'.wp_strip_all_tags($css).'</style>';
}
}

Expand Down

0 comments on commit 3f1c473

Please sign in to comment.