Clean up CSS a little, add confirm do hide button

This commit is contained in:
John Stephani 2025-12-24 21:53:18 -06:00
parent 43d680f155
commit cdae48c98c
1 changed files with 17 additions and 16 deletions

View File

@ -9,6 +9,7 @@
--dark: #2c2c2c;
--darker: #171717;
--light: #bfbfbf;
--confirm: #970000;
}
html {
height: 100%;
@ -21,7 +22,6 @@
}
img, video {
max-width: 100%;
max-height: 100vh;
width: auto;
height: auto;
}
@ -54,7 +54,6 @@
}
div.post {
width: 70vw;
margin-left: 20px;
}
.container {
display: flex;
@ -65,7 +64,8 @@
height: 100vh;
flex-direction: column;
overflow-y: auto;
padding: 5px
padding: 5px;
margin-right: 20px;
}
}
/* phone */
@ -89,6 +89,7 @@
align-items: center;
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 10px;
}
.content {
align-items: center;
@ -106,9 +107,6 @@
background-color: var(--darker);
color: var(--light);
}
.content h1 {
margin-left: 20px;
}
.invert {
filter: invert(1);
transition: filter 0.3s;
@ -133,6 +131,9 @@
font-size: 1.25rem;
font-weight: bold;
}
.button-wrapper button.confirm {
background-color: var(--confirm)
}
.button-wrapper button.gallery {
padding: 5px;
background-color: var(--darker);
@ -271,16 +272,16 @@
// main button code
function hide(button, permalink){
const div = button.closest('.post');
div.scrollTo({
top: 0,
behavior: 'smooth'
});
if (button.classList.contains('confirm')) {
div = button.closest('.post');
div.remove();
try {
fetch('/hide' + permalink);
} catch (error) {
console.error('Could hide', error);
console.error('Could not hide', error);
}
} else {
button.classList.add('confirm');
}
}