Skip to content

Instantly share code, notes, and snippets.

View cathysarisky's full-sized avatar

Cathy Sarisky cathysarisky

View GitHub Profile
@cathysarisky
cathysarisky / FixImageHeight.css
Created September 8, 2022 18:36
Limit maximum image height in Ghost so it fits on one screen
<style>
.gh-article-image img {
max-height: 90vh;
object-fit: contain;
}
</style>
@cathysarisky
cathysarisky / ChangeFeaturedPostsOrder.css
Created September 8, 2022 18:34
Change order of posts in Ghost Ruby theme - featured posts first.
<style>
.post-feed .featured {order: -1;}
</style>
@cathysarisky
cathysarisky / Hide upgrade bug
Created September 8, 2022 18:31
Prevent Ghost users from seeing a prompt to upgrade to a paid plan when there isn't a paid plan.
<!-- Thanks to Ghost user Akshay (https://akshaykhot.com/) for this code snippet. -->
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", ready);
function ready() {
let member_btn = document.querySelector(".gh-subscribe-btn");
if(member_btn) {
let subscribe_modal = document.querySelector(".gh-subscribe");
subscribe_modal.remove();
}
@cathysarisky
cathysarisky / ChangeCopyright.js
Created September 8, 2022 18:26
Ghost code injection: Change the copyright line
<script>
const changeme = document.querySelector('.gh-copyright')
changeme.textContent = "What it should actually say © 2022";
</script>