Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.
It's built for the Hugo static site generator, but could be adopted to function with any json index.
To see it in action, go to craigmod.com and press CMD-/ and start typing.
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
| <script> | |
| /** | |
| * Google Analytics Enhanced Ecommerce - Checkout Labels & Google Optimize Initializer | |
| * - to be added to the checkout.liquid template | |
| */ | |
| (function checkoutStepLabels() { | |
| var DEBUG = window.location.href.indexOf('debug') > -1; | |
| // setup recursive polling to wait for GA to be loaded by Shopify (i.e. after ga('create') call) before pushing event (check every 500ms, max of 20 attempts) | |
| var attempts = 0; | |
| var MAX_ATTEMPTS = 20; |
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
| :root { | |
| --palette-primary-shade-30: 184, 216, 255; | |
| --palette-primary-shade-20: 152, 198, 255; | |
| --palette-primary-shade-10: 121, 181, 255; | |
| --palette-primary: 0, 120, 212; | |
| --palette-primary-tint-10: 82, 143, 217; | |
| --palette-primary-tint-20: 73, 126, 191; | |
| --palette-primary-tint-30: 55, 96, 145; | |
| --palette-primary-tint-40: 34, 59, 89; | |
| --palette-neutral-100: 255, 255, 255; |
