parent
8b2edc00be
commit
a264d457e9
@ -1,31 +1,7 @@ |
||||
<footer class="site-footer h-card"> |
||||
<data class="u-url" href="{{ "/" | relative_url }}"></data> |
||||
|
||||
<div class="wrapper"> |
||||
|
||||
<h2 class="footer-heading">{{ site.title | escape }}</h2> |
||||
|
||||
<div class="footer-col-wrapper"> |
||||
<div class="footer-col footer-col-1"> |
||||
<ul class="contact-list"> |
||||
<li class="p-name"> |
||||
{%- if site.author -%} |
||||
{{ site.author | escape }} |
||||
{%- else -%} |
||||
{{ site.title | escape }} |
||||
{%- endif -%} |
||||
</li> |
||||
{%- if site.email -%} |
||||
<li><a class="u-email" href="mailto:{{ site.email }}">{{ site.email }}</a></li> |
||||
{%- endif -%} |
||||
</ul> |
||||
</div> |
||||
|
||||
<div class="footer-col footer-col-2"> |
||||
{%- include social.html -%} |
||||
</div> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
<footer> |
||||
<p class="license light"> |
||||
Unless otherwised specified, all works are licensed under the |
||||
<a href="{{ '/assets/wtfpl.txt' | relative_url}}">WTFPL</a>. |
||||
</p> |
||||
</footer> |
||||
|
||||
|
@ -1,24 +0,0 @@ |
||||
--- |
||||
layout: default |
||||
--- |
||||
|
||||
{%- if site.posts.size > 0 -%} |
||||
<ul id="posts-list"> |
||||
{%- for post in site.posts -%} |
||||
{%- if post.hide -%}{%- continue -%}{%- endif -%} |
||||
<li> |
||||
<h2> |
||||
<a href="{{ post.url | relative_url }}"> |
||||
{{ post.title | escape }} |
||||
</a> |
||||
</h2> |
||||
<span>{{ post.date | date: site.date_format }}</span> |
||||
{%- if post.updated %} |
||||
<span>(Updated {{ post.updated | date: site.date_format }})</span> |
||||
{% endif -%} |
||||
<p>{{ post.description }}</p> |
||||
</li> |
||||
{%- endfor -%} |
||||
</ul> |
||||
|
||||
{%- endif -%} |
@ -1,14 +0,0 @@ |
||||
--- |
||||
layout: default |
||||
--- |
||||
<article class="post"> |
||||
|
||||
<header class="post-header"> |
||||
<h1 class="post-title">{{ page.title | escape }}</h1> |
||||
</header> |
||||
|
||||
<div class="post-content"> |
||||
{{ content }} |
||||
</div> |
||||
|
||||
</article> |
@ -1,67 +1,48 @@ |
||||
console.log("main.js started"); |
||||
|
||||
// For asynchronously loading the qr code library, loadQRLib returns a promise
|
||||
// which will be resolved when the library is loaded.
|
||||
var qrLibProm; |
||||
var loadQRLib = () => { |
||||
if (qrLibProm) { return qrLibProm; } |
||||
qrLibProm = new Promise((resolve, reject) => { |
||||
console.log("loading qrcode.min.js"); |
||||
var script = document.createElement('script'); |
||||
script.src = "/assets/qrcode.min.js"; |
||||
script.async = true; |
||||
script.onload = () => { resolve(); }; |
||||
document.querySelectorAll('head')[0].appendChild(script); |
||||
}); |
||||
return qrLibProm; |
||||
}; |
||||
// showModal will create the modal structure the first time it is called.
|
||||
var modal, modalContent; |
||||
const showModal = function() { |
||||
if (!modal) { |
||||
// make the modal
|
||||
const modalClose = document.createElement('span'); |
||||
modalClose.id = 'modal-close'; |
||||
modalClose.innerHTML = '×'; |
||||
|
||||
modalContent = document.createElement('div'); |
||||
modalContent.id = 'modal-content'; |
||||
|
||||
const modalBody = document.createElement('div'); |
||||
modalBody.id = 'modal-body'; |
||||
modalBody.appendChild(modalContent); |
||||
modalBody.appendChild(modalClose); |
||||
|
||||
modal = document.createElement('div'); |
||||
modal.id = 'modal'; |
||||
modal.appendChild(modalBody); |
||||
|
||||
// add the modal to the document
|
||||
document.getElementsByTagName('body')[0].appendChild(modal); |
||||
|
||||
// setup modal functionality
|
||||
modalClose.onclick = function() { |
||||
modal.style.display = "none"; |
||||
} |
||||
} |
||||
|
||||
modalContent.innerHTML = ''; |
||||
for (var i = 0; i < arguments.length; i++) { |
||||
modalContent.appendChild(arguments[i]); |
||||
} |
||||
modal.style.display = "block"; |
||||
|
||||
// When the user clicks anywhere outside of the modal, close it
|
||||
window.onclick = function(event) { |
||||
if (event.target == modal) { |
||||
modal.style.display = "none"; |
||||
window.onclick = undefined; |
||||
} |
||||
} |
||||
} |
||||
|
||||
document.addEventListener("DOMContentLoaded", () => { |
||||
console.log("DOM loaded"); |
||||
|
||||
var cryptoDisplay = document.querySelector('#crypto-display'); |
||||
var clearCryptoDisplay = () => { |
||||
cryptoDisplay.innerHTML = ' '; |
||||
}; |
||||
|
||||
console.log("setting up crypto buttons"); |
||||
document.querySelectorAll('.crypto').forEach((el) => { |
||||
var href = el.href; |
||||
el.href="#"; |
||||
el.onclick = () => { |
||||
var parts = href.split(":"); |
||||
if (parts.length != 2) { |
||||
console.error(el, "href not properly formatted"); |
||||
return; |
||||
} |
||||
var currency = parts[0]; |
||||
var address = parts[1]; |
||||
|
||||
clearCryptoDisplay(); |
||||
|
||||
var cryptoDisplayQR = document.createElement('div'); |
||||
cryptoDisplayQR.id = "crypto-display-qr"; |
||||
|
||||
var cryptoDisplayAddr = document.createElement('div'); |
||||
cryptoDisplayAddr.id = "crypto-display-addr"; |
||||
cryptoDisplayAddr.innerHTML = '<span>'+currency + " address: " + address + '</span>'; |
||||
|
||||
var cryptoDisplayX = document.createElement('div'); |
||||
cryptoDisplayX.id = "crypto-display-x"; |
||||
cryptoDisplayX.onclick = clearCryptoDisplay; |
||||
cryptoDisplayX.innerHTML = '<span>X</span>'; |
||||
|
||||
cryptoDisplay.appendChild(cryptoDisplayQR); |
||||
cryptoDisplay.appendChild(cryptoDisplayAddr); |
||||
cryptoDisplay.appendChild(cryptoDisplayX); |
||||
|
||||
loadQRLib().then(() => { |
||||
new QRCode(cryptoDisplayQR, { |
||||
text: currency, |
||||
width: 512, |
||||
height: 512, |
||||
}); |
||||
}); |
||||
}; |
||||
}); |
||||
}) |
||||
|
@ -0,0 +1,72 @@ |
||||
--- |
||||
layout: post |
||||
title: "Follow the Blog" |
||||
description: "There's lots of ways to do it" |
||||
nofollow: true |
||||
--- |
||||
|
||||
There are a few ways to get notified of new posts to the Mediocre Blog. |
||||
|
||||
## Method 1: RSS |
||||
|
||||
RSS is the classic way to follow any blog. Simply give any RSS reader the |
||||
following URL... |
||||
|
||||
<a href="{{site.url}}/feed.xml">{{site.url}}/feed.xml</a> |
||||
|
||||
...and posts from this blog will show up as soon as they are published. |
||||
|
||||
There are literally thousands of RSS readers out there. Here's some |
||||
recommendations: |
||||
|
||||
* [Google Chrome Browser Extension](https://chrome.google.com/webstore/detail/rss-feed-reader/pnjaodmkngahhkoihejjehlcdlnohgmp) |
||||
|
||||
* [spaRSS](https://f-droid.org/en/packages/net.etuldan.sparss.floss/) is my |
||||
preferred android RSS reader, but you'll need to install |
||||
[f-droid](https://f-droid.org/) on your device (a good thing to do anyway, |
||||
imo). |
||||
|
||||
* TODO: an iOS reader, for you Apple users. Someone please [email |
||||
me](mailto:mediocregopher.com) a recommendation. |
||||
|
||||
|
||||
## Method 2: Twitter |
||||
|
||||
New posts are automatically published to [my Twitter](https://twitter.com/{{ |
||||
site.twitter_username }}). Simply follow me there and pray the algorithm smiles |
||||
upon my tweets enough to show them to you! :pray: :pray: :pray: |
||||
|
||||
## Method 3: Email |
||||
|
||||
I do solemnly swear to never ever ever: |
||||
|
||||
* Email you anything that's not a notification about new blog posts. |
||||
|
||||
* Give your email address to anyone for any reason. |
||||
|
||||
* Track whether or not you've opened the emails, clicked the links inside, or |
||||
anything like that. Delete every single one, I don't care. |
||||
|
||||
With that out of the way... if you'd like to receive an email everytime a new |
||||
post is published just type in your email and hit "Subscribe" below! |
||||
|
||||
<!-- Begin Mailchimp Signup Form --> |
||||
<link href="//cdn-images.mailchimp.com/embedcode/horizontal-slim-10_7.css" rel="stylesheet" type="text/css"> |
||||
<style type="text/css"> |
||||
#mc_embed_signup{ |
||||
} |
||||
/* Add your own Mailchimp form style overrides in your site stylesheet or in this style block. |
||||
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */ |
||||
</style> |
||||
<div id="mc_embed_signup"> |
||||
<form action="https://gmail.us7.list-manage.com/subscribe/post?u=b01da7c6e6b3cb148e812a0fc&id=e4559a9a22" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> |
||||
<div id="mc_embed_signup_scroll"> |
||||
|
||||
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required> |
||||
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--> |
||||
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_b01da7c6e6b3cb148e812a0fc_e4559a9a22" tabindex="-1" value=""></div> |
||||
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
<!--End mc_embed_signup--> |
@ -1,9 +1,23 @@ |
||||
--- |
||||
# |
||||
# By default, content added below the "---" mark will appear in the home page |
||||
# between the top bar and the list of recent posts. |
||||
# To change the home page layout, edit the _layouts/home.html file. |
||||
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults |
||||
# |
||||
layout: home |
||||
layout: default |
||||
--- |
||||
|
||||
{%- if site.posts.size > 0 -%} |
||||
<ul id="posts-list"> |
||||
{%- for post in site.posts -%} |
||||
{%- if post.hide -%}{%- continue -%}{%- endif -%} |
||||
<li> |
||||
<h2> |
||||
<a href="{{ post.url | relative_url }}"> |
||||
{{ post.title | escape }} |
||||
</a> |
||||
</h2> |
||||
<span>{{ post.date | date: site.date_format }}</span> |
||||
{%- if post.updated %} |
||||
<span>(Updated {{ post.updated | date: site.date_format }})</span> |
||||
{% endif -%} |
||||
<p>{{ post.description }}</p> |
||||
</li> |
||||
{%- endfor -%} |
||||
</ul> |
||||
{%- endif -%} |
||||
|
Loading…
Reference in new issue