Skip to content

Instantly share code, notes, and snippets.

View DanRader's full-sized avatar

Dan Rader DanRader

View GitHub Profile
@DanRader
DanRader / AppAssets.csv
Created July 29, 2022 14:14
App Assets Table
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 3 in line 1.
App Screenshots
Notch (iPohone X), 414x896 (@3x), 1242x2688
@DanRader
DanRader / event.html
Created December 18, 2018 01:47
Remove past events
{% assign event-sort = site.events | sort: "event-date" %}
{% for event in event-sort %}
{% assign today = "today" | date: "%s"%}
{% assign event-date = event.event-date | date: "%s" %}
{% if today <= event-date %}
{% assign day = event.event-date | date: "%a" %}
{% assign month = event.event-date | date: "%b" %}
{% assign day-num = event.event-date | date: "%d" %}
{% assign start-time = event.event-date | date: "%I%p" %}
@DanRader
DanRader / contactform.html
Created January 5, 2018 19:33
Contact form with Zapier
<!-- Here's a great article on setting up zapier. I added a few lines in the ajax so you don't have to redirect the user -->
<!-- https://www.harrycresswell.com/articles/form-data-with-zapier/ -->
<form id="myForm">
<input id="form-name" type="text" name="Name" placeholder="Name" required>
<input id="form-email" type="email" name="Email" placeholder="Email" required>
<textarea id="form-message" name="Message" cols="30" rows="6" placeholder="Message" required></textarea>
<!-- CONFIG -->
<input class="hidden" type="text" name="_gotcha">
@DanRader
DanRader / alternatingrows.html
Last active February 25, 2017 22:32
Alternating Rows using forloop.index and modulo
{% for posts in site.posts %}
{% assign loopindex = forloop.index | modulo: 6 %}
{% if loopindex == 1 %}
<div> {{ forloop.index }}
{% elsif loopindex == 2 %}
{{ forloop.index }}
{% elsif loopindex == 3 %}
{{ forloop.index }} </div>
@DanRader
DanRader / nav-highlight.html
Last active January 15, 2017 23:09
Navigation loop that highlights your current page AND any sub pages connected—for example, a blog list page and posts both highlighting 'blog'. It also sorts by position in YAML
{% assign sorted-p = site.pages | sort: 'position' %}
{% for p in sorted-p %}
{% if p.is-menu == true %}
<li class="{% if p.url == page.url or page.url contains p.url %} active {% endif %} nav-links"><a href="{{ p.url }}">{{ p.title }}</a>
{% endif %}
{% endfor %}
@DanRader
DanRader / jekyll-seo-pluggin.html
Last active December 29, 2016 16:01
Jekyll Custom SEO tagging that works better with Siteleaf. This is really similar to the Jekyll SEO tag plugin except it lets you override the og image with a custom image if you have one. If there isn't a custom image, it takes whatever image is on the page.
<title>{{ page.title }} - {{site.title}}</title>
<meta property="og:title" content="{{ page.title }}" />
<meta name="description" content="{{ page.excerpt | strip_html }}"/>
<meta property="og:description" content="{{ page.excerpt | strip_html }}"/>
<link rel="canonical" href="{{site.url}}{{page.url}}" />
<meta property="og:url" content="{{site.url}}{{page.url}}" />
<meta property="og:site_name" content="{{site.title}}" />
{% if page.og-image %}
<meta property="og:image" content="{{ site.url }}{{ page.og-image }}" />
{% else %}
@DanRader
DanRader / jekyll-category.html
Last active December 6, 2018 01:09
Jekyll—Color code categories controlled by front matter & a 'categories' collection.
---
title: Foo
date: 2016-12-17 11:09:00 -05:00
color: "#A96BE3"
---