This file contains hidden or 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
| {% if (pagination.pages.length > 1) %} | |
| <nav class="pagination"> | |
| <span>Page: </span> | |
| {% for pageEntry in pagination.pages %} | |
| {% if page.url == pagination.hrefs[ loop.index0 ] %} | |
| <span class="pg" aria-current="page">{{ loop.index }}</span> | |
| {% else %} | |
| <a href="{{ pagination.hrefs[ loop.index0 ] }}">{{ loop.index }}</a> | |
| {% endif %} | |
| {% endfor %} |
This file contains hidden or 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
| {{ if (pagination.pages.length > 1) }} | |
| <nav class="pagination"> | |
| <span>Page: </span> | |
| {{# `pagination.pages` is an array of arrays, so `index` here acts as a counter #}} | |
| {{ for index, _content of pagination.pages }} | |
| {{if pagination.hrefs[index] == page.url}} | |
| <span class="pg" aria-current="page">{{index + 1}}</span> | |
| {{else}} | |
| <a href="{{pagination.hrefs[index]}}">{{index + 1}}</a> | |
| {{/if}} |
This file contains hidden or 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
| <!-- https://gfscott.com/blog/dark-mode-for-real/ --> | |
| <!doctype html> | |
| <html lang="en-CA"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <script> | |
| // Get cookie value by name | |
| function getCookie (name) { |
This file contains hidden or 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
| <div class="c"> | |
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"> | |
| <path class="trace" fill="transparent" stroke="red" stroke-width="4" d="M21 25s91-15 121 17-77 78-77 78 141 2 97 27 24 32 24 32"/> | |
| </svg> | |
| </div> |
This file contains hidden or 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
| // ----------------------------------------------------------------------------- | |
| // SIMPLE REUSABLE AJAX GET JSON FUNCTION | |
| // A frequent thing I find myself writing in projects is a simple function to | |
| // get JSON via AJAX. This simple helper does that in a sensible way without | |
| // needing jQuery or a needlessly complex standalone Ajax library. Get data | |
| // so you can do stuff with it. That’s all it does. No POSTing, no crazy edge- | |
| // case error handling. | |
| function getJson(url, callback) { |
This file contains hidden or 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
| function html5_figure_image( $html, $id, $caption, $title, $align, $url ) | |
| { | |
| $html5 = "<figure id='post-$id media-$id' class='align-$align'>"; | |
| $html5 .= "<img src='$url' alt='$title' />"; | |
| if ($caption) { | |
| $html5 .= "<figcaption>$caption</figcaption>"; | |
| } | |
| $html5 .= "</figure>"; | |
This file contains hidden or 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
| <?php | |
| ///////////////////////////////////////////////////////////////////////////////////// | |
| // Ask Wordpress to Embed Soundcloud’s Mini Player Instead of the Large Visual Player | |
| ///////////////////////////////////////////////////////////////////////////////////// | |
| // Add function to theme’s functions.php file | |
| // Relevant documentation: | |
| // https://wordpress.org/support/topic/hookfilter-for-auto-embed-function-of-wp | |
| // https://wordpress.org/support/topic/filter-hook-for-built-in-oembed-providers-eg-youtube | |
| // https://developers.soundcloud.com/docs/oembed |
This file contains hidden or 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
| # Basically the nginx configuration I use at konklone.com. | |
| # I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com | |
| # | |
| # To provide feedback, please tweet at @konklone or email eric@konklone.com. | |
| # Comments on gists don't notify the author. | |
| # | |
| # Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites. | |
| # Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration. | |
| server { |
NewerOlder