Tag archive

This commit is contained in:
John O'Nolan
2021-03-04 18:31:29 -05:00
parent 7617c7baf2
commit f590fb029a
8 changed files with 73 additions and 165 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+13 -40
View File
@@ -81,16 +81,6 @@ production stylesheet in assets/built/screen.css
width: 100%;
}
/* Usage:
<div class="outer">
<div class="inner">
Centered content
</div>
</div>
*/
/* 4. Site Header
/* ---------------------------------------------------------- */
@@ -192,36 +182,6 @@ production stylesheet in assets/built/screen.css
}
/* 4.2 Archive header (tag and author post lists)
/* ---------------------------------------------------------- */
.site-archive-header .site-header-content {
position: relative;
align-items: stretch;
padding: 12vw 0 20px;
min-height: 200px;
max-height: 600px;
}
.site-archive-header .no-image {
padding-top: 0;
padding-bottom: 0;
color: var(--color-darkgrey);
background: #fff;
opacity: 1.0;
}
.site-archive-header .no-image .site-description {
color: var(--color-midgrey);
opacity: 1.0;
}
.site-archive-header .no-image .site-header-content {
padding: 5vw 0 10px;
}
/* 5. Site Navigation
/* ---------------------------------------------------------- */
@@ -1589,6 +1549,19 @@ Ghost editor. */
}
/* 8. Tag Template
/* ---------------------------------------------------------- */
.tag-template .post-card-large .post-card-image-link {
grid-column: 2 / span 2;
order: 2;
}
.tag-template .post-card-large .post-card-content {
order: 1;
}
/* 9. Error Template
/* ---------------------------------------------------------- */
-61
View File
@@ -1,61 +0,0 @@
/* eslint-env browser */
/**
* Nav/Title replacement
* Used on invividual post pages, displays the post title in place of the nav
* bar when scrolling past the title
*
* Usage:
* ```
* Casper.stickyTitle({
* navSelector: '.site-nav-main',
* titleSelector: '.post-full-title',
* activeClass: 'nav-post-title-active'
* });
* ```
*/
(function (window, document) {
// set up Casper as a global object
if (!window.Casper) {
window.Casper = {};
}
window.Casper.stickyNavTitle = function stickyNavTitle(options) {
var nav = document.querySelector(options.navSelector);
var title = document.querySelector(options.titleSelector);
var lastScrollY = window.scrollY;
var ticking = false;
function onScroll() {
lastScrollY = window.scrollY;
requestTick();
}
function requestTick() {
if (!ticking) {
requestAnimationFrame(update);
}
ticking = true;
}
function update() {
var trigger = title.getBoundingClientRect().top + window.scrollY;
var triggerOffset = title.offsetHeight + 35;
// show/hide post title
if (lastScrollY >= trigger + triggerOffset) {
nav.classList.add(options.activeClass);
} else {
nav.classList.remove(options.activeClass);
}
ticking = false;
}
window.addEventListener('scroll', onScroll, {passive: true});
update();
};
})(window, document);