Skip to content

Instantly share code, notes, and snippets.

View ahmadajmi's full-sized avatar

Ahmad Ajmi ahmadajmi

View GitHub Profile
{{#if @site.twitter}}
<li class='c-nav__item c-nav__item--hasIcon'>
<a href='{{ twitter_url }}'>
<span class='c-nav__item__icon' data-icon='ei-sc-twitter' data-size='s'></span>
<span class='u-hidden-visually'>Twitter</span>
</a>
</li>
{{/if}}
{{#if @site.facebook}}
<div class='c-widget'>
<ul class='c-social-icons o-plain-list'>
{{#if @site.twitter}}
<li class='c-social-icons__item'>
<a href='{{ twitter_url }}'>
<span class='c-social-icons__icon' data-icon='ei-sc-twitter' data-size='s'></span>
<span class='u-screenreader-only'>Twitter</span>
</a>
</li>
{{/if}}
// Copy the follwing to Code Injection.
<style>
:root {
--color-mode: 'dark';
--color-brand: var(--ghost-accent-color);
--color-white: #FFFFFF;
--color-dark: #010101;
--color-text: #FFFFFF;
--color-gray: #E5EFF5;
// Replace YOUR_LIGHT_COLOR_HERE with your light background.
// Replace YOUR_DARK_COLOR_HERE in two lines with your dark background.
<style>
:root {
--nav-background: YOUR_LIGHT_COLOR_HERE;
}
@media (prefers-color-scheme: dark) {
:root:not([data-user-color-scheme]) {
<style>
.c-content .kg-callout-card.kg-callout-card-grey { background: rgba(124,139,154,.13); }
.c-content .kg-callout-card.kg-callout-card-blue { background: rgba(33,172,232,.12); }
.c-content .kg-callout-card.kg-callout-card-green { background: rgba(52,183,67,.12); }
.c-content .kg-callout-card.kg-callout-card-yellow { background: rgba(240,165,15,.13); }
.c-content .kg-callout-card.kg-callout-card-red { background: rgba(209,46,46,.11); }
.c-content .kg-callout-card.kg-callout-card-pink { background: rgba(225,71,174,.11); }
.c-content .kg-callout-card.kg-callout-card-purple { background: rgba(135,85,236,.12); }
.c-content .kg-callout-card.kg-callout-card-accent { background: var(--ghost-accent-color); }
</style>
{{#unless access}}
<aside class='c-post-upgrade-cta'>
{{#has visibility='members'}}
<h4 class='c-post-upgrade-cta__title'>{{t 'This page is for subscribers only'}}</h4>
{{/has}}
{{#has visibility='paid'}}
<h4 class='c-post-upgrade-cta__title'>{{t 'This page is for paying subscribers only'}}</h4>
{{/has}}
<div class='c-section'>
{{#get 'pages' slug='PAGE_SLUG' as |page| }}
{{#page}}
<div class='c-content'>
{{ content }}
</div>
{{/page}}
{{/get}}
</div>
{{!--
Used in the post.hbs & page.hbs file
--}}
<header class='c-page-header'>
<div class='{{#if custom_excerpt}}o-grid o-grid--2-columns{{/if}} {{#unless custom_excerpt}}no-custom_excerpt{{/unless}}'>
<div>
<h1 class='c-page-header__heading u-font-heading'>{{ title }}</h1>
{{#match primary_tag.slug 'writing'}}
<time class='u-color-text-secondary u-font-size-small u-mt-8' datetime='{{ date format='YYYY-MM-DD' }}'>{{ date format='MMM D, YYYY' }}</time>
@ahmadajmi
ahmadajmi / Dropdown.md
Created June 27, 2022 19:35
Dropdown.md

Code Injection (Site Header)

<style>
    @media (max-width: 63.99em) {
  .c-nav__dropDown {
    margin-left: var(--space-16);
  }
  .c-nav__dropDown .c-nav__item {
    margin-bottom: 0;
@ahmadajmi
ahmadajmi / unfollow.js
Created May 18, 2022 11:17 — forked from JamieMason/unfollow.js.md
Unfollow everyone on twitter.com
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
//
// Last Updated: 09 April 2020
(() => {
const $followButtons = '[data-testid$="-unfollow"]';