Skip to content

Commit

Permalink
add blockquote styling and stagger effect to masonry
Browse files Browse the repository at this point in the history
  • Loading branch information
BumpyClock committed Apr 11, 2024
1 parent ea96a84 commit 9a01834
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ function initializeMasonry() {
itemSelector: ".card",
columnWidth: ".card",
gutter: 24,
transitionDuration: '0.25s', // set the transition duration
stagger: 30 // set the stagger delay
transitionDuration: '0.2s', // set the transition duration
stagger: 10 // set the stagger delay
});
document.querySelectorAll(".masonry-item").forEach(item => {
item.addEventListener("load", () => {
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ 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;
const imageProxyURL = "https://digests-imgproxy-a4crwf5b7a-uw.a.run.app/unsafe/rs:fit:0:300:0/g:no/plain/" + thumbnailUrl+"@webp";
const imageContainer = createElement('div', { className: 'image-container loading' });
const cardbg = createElement('div', { className: 'card-bg' });

if (thumbnailUrl) {
imageContainer.innerHTML = `<img data-src="${imageProxyURL}" id="thumbnail-image" alt="${siteTitle} Thumbnail" class="thumbnail-image lazyload masonry-item">`;
cardbg.innerHTML = `<div class=noise></div><img data-src="${imageProxyURL}" alt="${siteTitle} Thumbnail" class="card-bg lazyload">`;
imageContainer.innerHTML = `<img data-src="${thumbnailUrl}" id="thumbnail-image" alt="${siteTitle} Thumbnail" class="thumbnail-image lazyload masonry-item">`;
cardbg.innerHTML = `<div class=noise></div><img data-src="${thumbnailUrl}" alt="${siteTitle} Thumbnail" class="card-bg lazyload">`;

}

Expand Down
28 changes: 28 additions & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,34 @@ cite {
opacity:.7;
font-size: .9rem;
}

.reader-view-page-content blockquote {

opacity: .8;
background: var(--reading-progress-container-background-color);
border-left: 8px solid var(--border-color);
box-shadow: inset 0 0 0 1px var(--border-color);
border-radius: 7px;
margin: 1.5em 12px;
padding: 1.5em 1.5rem;
quotes: "\201C""\201D""\2018""\2019";

}

.reader-view-page-content blockquote p{
margin: 0;
padding: 0;
font-size: 1.15rem;
font-style: italic;
font-weight: 400;
line-height: 1.8;
font-family: var(--font-family);
color: var(--color);
margin-bottom: 1rem;
margin:auto;
}


.reader-view-modal hr.solid {
border-top: 1px solid #bbb
}
Expand Down

0 comments on commit 9a01834

Please sign in to comment.