Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
BumpyClock committed Jul 27, 2024
2 parents 8d4716f + 02f294d commit 99ac65e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function initializeMasonry() {
itemSelector: ".card",
columnWidth: ".card",
gutter: 24,
transitionDuration: '0.12s', // set the transition duration
transitionDuration: '0.08s', // set the transition duration
stagger: 5, // set the stagger delay
fitwidth: true,
isFitWidth: true,
Expand Down Expand Up @@ -753,7 +753,7 @@ function setSearchPreference(state) {
// Setup NTP
async function setupNTP() {
setupSearch();
lazySizes.cfg.expand = 300;
lazySizes.cfg.expand = 600;
lazySizes.cfg.preloadAfterLoad = true;
lazySizes.cfg.loadMode = 2;
lazySizes.cfg.expFactor = 3;
Expand Down
4 changes: 3 additions & 1 deletion src/scripts/cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ function sanitizeHTML(html) {
}

function createImageContainer(thumbnailUrl, siteTitle) {
const imageProxyURL = "https://digests-imgproxy-a4crwf5b7a-uw.a.run.app/unsafe/rs:fit:0:300:0/g:no/plain/" + thumbnailUrl+"@webp";
// const imageProxyURL = "https://digests-imgproxy-a4crwf5b7a-uw.a.run.app/unsafe/rs:fit:0:300:0/g:no/plain/" + thumbnailUrl+"@webp";
const imageProxyURL = thumbnailUrl;

const imageContainer = createElement('div', { className: 'image-container loading' });
const cardbg = createElement('div', { className: 'card-bg' });

Expand Down
1 change: 1 addition & 0 deletions src/scripts/utils/dropshadow.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function generateBoxShadow(color, elevation, opacity, blur, ) {
}

function adjustColorForTheme(color, theme) {
const percent = 10;
const hsl = color.toHsl();
if (hsl.l <= 0.2) { // if the color is already dark
hsl.l += (1 - hsl.l) * (percent / 100); // Lighten the color
Expand Down
9 changes: 9 additions & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,15 @@ body > :not(.background-image-container)::selection {
}


.lazyload,
.lazyloading {
opacity: 0;
}
.lazyloaded {
opacity: 1;
transition: opacity 300ms;
}

.card:active .card-bg {
filter: blur(90px) brightness(1.1);
transform: scale(1.15);
Expand Down

0 comments on commit 99ac65e

Please sign in to comment.