Archive Site

This commit is contained in:
Brandon Rozek 2023-09-05 16:53:51 -04:00
commit b62dfc8300
No known key found for this signature in database
GPG key ID: 26E457DA82C9F480
96 changed files with 6446 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -0,0 +1,65 @@
/*
Service Worker implementation
*/
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('https://sentenceworthy.com/serviceworker.js', {scope: '/'});
}
/**
Brandon's method for allowing 'fullscreen' posts
Important info:
----Class for the image when in 'fullscreen' mode is .fullscreen-image
----Class for the text when in 'fullscreen' mode is .fullscreen-item
----Class for the div that fades the background when in 'fullscreen' mode is .fullscreen-fade
----It depends on the articles to be in the <main> tag
----It depends on the images residing in an <article> tag
**/
if ('addEventListener' in document && 'removeEventListener' in document && document.getElementsByTagName('body')[0].classList && (document.getElementsByTagName('body')[0].nextElementSibling == null || document.getElementsByTagName('body')[0]) && document.getElementsByTagName('body')[0].parentElement && document.getElementsByTagName('body')[0].insertAdjacentHTML && document.getElementsByTagName('body')[0].setAttribute) {
var addFullscreenEvent = function (elements) {
for (var i = 0; i < elements.length; i++) {
elements[i].addEventListener('click', fullscreenImage);
}
}
var removeFullscreenEvent = function (elements) {
for (var i = 0; i < elements.length; i++) {
elements[i].removeEventListener('click', fullscreenImage);
}
}
var addFullscreenCaption = function (element) {
element.nextElementSibling.setAttribute('class', 'fullscreen-item');
if (element.nextElementSibling.nextElementSibling != null) {
addFullscreenCaption(element.nextElementSibling);
}
}
var removeFullscreenCaption = function (element) {
element.nextElementSibling.classList.remove('fullscreen-item');
if (element.nextElementSibling.nextElementSibling != null) {
removeFullscreenCaption(element.nextElementSibling);
}
}
var fullscreenImage = function () {
document.getElementsByTagName('main')[0].insertAdjacentHTML('afterbegin', "<div class='fullscreen-fade'></div>");
this.setAttribute('class', 'fullscreen-image');
addFullscreenCaption(this.parentElement);
removeFullscreenEvent(document.querySelectorAll('article img'));
document.getElementsByClassName('fullscreen-fade')[0].addEventListener('click', exitFullscreen);
}
var exitFullscreen = function () {
this.remove();
clickedImage = document.getElementsByClassName('fullscreen-image')[0];
clickedImage.classList.remove('fullscreen-image');
removeFullscreenCaption(clickedImage.parentElement);
addFullscreenEvent(document.querySelectorAll('article img'));
}
/**End method for allowing 'fullscreen' posts**/
//Start the 'fullscreen' method
addFullscreenEvent(document.querySelectorAll('article img'));
}

View file

@ -0,0 +1 @@
.pagination{margin-left:auto;margin-right:auto}.title a,.pagination a{color:inherit;text-decoration:inherit}.tags{margin-top:1.5rem;font-size:1.25rem;text-align:center}.tags a{margin-left:.35rem;margin-right:.35rem}.tag-cat-name{text-align:center}article{max-width:62.5rem;text-align:center}article:last-of-type{margin-bottom:0}.title{margin-top:1.5rem;margin-bottom:.5rem;font-weight:bold}.title a:hover{text-decoration:underline}.date{display:block;margin-bottom:0;font-family:LoversQuarrel,cursive;font-size:2rem}article img{width:100%;max-width:55rem;height:auto;cursor:pointer}article p{margin-top:1rem;line-height:1.3}article p:first-of-type{margin-top:1.25rem}@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadein{from{opacity:0}to{opacity:1}}.fullscreen-fade{position:fixed;top:0;left:0;height:100vh;width:100vw;background-color:rgba(0,0,0,0.9);-webkit-animation:fadein 0.25s ease-out;animation:fadein 0.25s ease-out;cursor:pointer;z-index:1}.fullscreen-image{position:relative;max-width:100vw;max-height:100vh;padding-bottom:1.5rem;background-color:white;transition:max-width 0.75s ease-in;cursor:default;z-index:2}.fullscreen-item{position:relative;margin-top:-1.5rem;margin-bottom:0;padding-bottom:2.65rem;background:white;z-index:2}.fullscreen-item:last-of-type{padding-bottom:1.15rem}.pagination{position:relative;margin-top:1.75rem;height:4rem;max-width:62.5rem}.pagination a{display:inline-block;position:absolute;border:1px solid rgba(129,179,226,0.8);border-radius:4px;padding:.75rem;background:rgba(255,255,255,0.7)}.pagination a:hover{border:1px solid #81b3e2;text-decoration:underline}.pagination .older{right:10px}.pagination .newer{left:10px}@media (min-width: 800px){article,.pagination{width:793px;width:calc(46vw + 425px)}}@media print{.tags{display:none}.pagination{display:none}}

View file

@ -0,0 +1 @@
.pagination{margin-left:auto;margin-right:auto}.title a,.pagination a{color:inherit;text-decoration:inherit}.tags{margin-top:1.5rem;font-size:1.25rem;text-align:center}.tags a{margin-left:.35rem;margin-right:.35rem}.tag-cat-name{text-align:center}article{max-width:62.5rem;text-align:center}article:last-of-type{margin-bottom:0}.title{margin-top:1.5rem;margin-bottom:.5rem;font-weight:bold}.title a:hover{text-decoration:underline}.date{display:block;margin-bottom:0;font-family:LoversQuarrel,cursive;font-size:2rem}article img{width:100%;max-width:55rem;height:auto;cursor:pointer}article p{margin-top:1rem;line-height:1.3}article p:first-of-type{margin-top:1.25rem}@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadein{from{opacity:0}to{opacity:1}}.fullscreen-fade{position:fixed;top:0;left:0;height:100vh;width:100vw;background-color:rgba(0,0,0,0.9);-webkit-animation:fadein 0.25s ease-out;animation:fadein 0.25s ease-out;cursor:pointer;z-index:1}.fullscreen-image{position:relative;max-width:100vw;max-height:100vh;padding-bottom:1.5rem;background-color:white;transition:max-width 0.75s ease-in;cursor:default;z-index:2}.fullscreen-item{position:relative;margin-top:-1.5rem;margin-bottom:0;padding-bottom:2.65rem;background:white;z-index:2}.fullscreen-item:last-of-type{padding-bottom:1.15rem}.pagination{position:relative;margin-top:1.75rem;height:4rem;max-width:62.5rem}.pagination a{display:inline-block;position:absolute;border:1px solid rgba(129,179,226,0.8);border-radius:4px;padding:.75rem;background:rgba(255,255,255,0.7)}.pagination a:hover{border:1px solid #81b3e2;text-decoration:underline}.pagination .older{right:10px}.pagination .newer{left:10px}@media (min-width: 800px){article,.pagination{width:793px;width:calc(46vw + 425px)}}@media print{.tags{display:none}.pagination{display:none}}

View file

@ -0,0 +1 @@
article{border-radius:5px;padding:7%;max-width:70rem}@media (min-width: 1000px){article{padding:4.5rem}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long