This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Change the GA ID before using this --> | |
<script> | |
let analytics = true; | |
if (process.env.NODE_ENV == "development") { | |
analytics = false; | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { writable } from "svelte/store"; | |
import { browser } from "$app/environment"; | |
//string | |
export const userName = writable( | |
(browser && localStorage.getItem("userName")) || "hello world" | |
); | |
userName.subscribe((val) => browser && (localStorage.userName = val)); | |
// array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Before using this Jekyll Snippet make sure you | |
1. don't care if your IDE shows tag errors | |
2. may have to add the words "Reading Time". Currently it uses an icon from https://github.com/danklammer/bytesize-icons | |
--> | |
<span class="read-time" title="Estimated read time"> | |
<svg id="i-clock" viewBox="0 0 32 32" width="20" height="20" fill="none" stroke="currentcolor" stroke-linecap="round" | |
stroke-linejoin="round" stroke-width="2"><circle cx="16" cy="16" r="14" /><path d="M16 8 L16 16 20 20" /></svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Before you implement this Jekyll Snippet make sure | |
1. to thank css-tricks.com | |
2. define "disqus: DISQUS-SHORTNAME" in _config.yml file. | |
--> | |
<div class="disqus"></div> | |
<div class="disqus-loading">Loading comments…</div> | |
<style> | |
.disqus-placeholder.is-hidden { display: none; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Before implementing this Jekyll snippet make sure | |
1. you have defined "markdown: kramdown" in _config.yml. | |
--> | |
* Do not remove this line (it will not be displayed) | |
{:toc} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Before implementing this jekyll snippet make sure | |
1. you have signed up with Mailchimp. | |
2. you have created a list in Mailchimp. | |
3. you have defined the list in _config.yml, | |
for ex: "mailchimp-list: //redgadgets.us10.list-manage.com/subscribe/post?u=210acce5db69d3d4a04b0e25d&id=08c6708f40" | |
--> | |
<form action="{{site.mailchimp-list}}" method="post" name="mc-embedded-subscribe-form" class="wj-contact-form validate" target="_blank" novalidate> | |
<div class="mc-field-group"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
After implementing this contact form make sure | |
1. you have defined "email: [email protected]" in _config.yml file. | |
2. you verify your form on formspree.io. | |
--> | |
<form class="wj-contact" action="https://formspree.io/{{site.email}}" method="POST"> | |
<input type="text" name="email" placeholder="Email Address"> | |
<textarea type="text" name="content" rows="10" placeholder="Message"></textarea> | |
<input type="hidden" name="_next" value="<REDIRECTION LINK> "> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Before implementing this Jekyll snippet make sure | |
1. "plugins: jekyll-paginate" is added in the _config.yml file. | |
2. for loop has "paginator.post" instead of "site.posts". | |
--> | |
{% if paginator.total_pages > 1 %} | |
<div class="wj-pagination"> | |
{% if paginator.previous_page %} | |
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">« Prev</a> |