3 different files you can drop into your next responsive project.
A Pen by William Riley on CodePen.
| // With some bundler parser with Webpack or Rollup: | |
| import json from "./stencil-stats.json" | |
| // or with CSS Import Assertions: | |
| // import json from "./stencil-stats.json" assert { type: "json" }; | |
| export const get_preload_tags = (components, format = "esmBrowser") => { | |
| const entries = json.formats[format]; | |
| const set = components.map((element) => { | |
| let files = []; |
| <?php | |
| /** | |
| * This code helps you cache a chunk of heavy processing code in WordPress. | |
| * | |
| * Examples: | |
| * - WooCommerce has quite a lot of these in their plugins. I've used | |
| * this general concept on WooCommerce sites many times, but when using | |
| * it you must be strategic. | |
| * - Membership plugins or anything behind authentication busts the caching layer, | |
| * because the content needs to be pulled from the server. |
| javascript:var script = document.createElement("script"); script.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"; script.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(script); |
| <?php | |
| use SPLIT\Wrapper; | |
| ?> | |
| <head> | |
| <?php wp_head(); ?> | |
| </head> | |
| <body> | |
| <?php include Wrapper\template_path(); ?> | |
| <?php wp_footer(); ?> | |
| </body> |
| ### Keybase proof | |
| I hereby claim: | |
| * I am bill-riley on github. | |
| * I am bill_riley (https://keybase.io/bill_riley) on keybase. | |
| * I have a public key whose fingerprint is 86D6 85C2 5BB9 248A A1CC C78E D9DE 36B3 8761 93A3 | |
| To claim this, I am signing this object: |
| // Taken from line 456 of this: http://williamriley.me/js/vendor/metronome.js | |
| var hidden = "hidden"; | |
| // Standards: | |
| if (hidden in document) | |
| document.addEventListener("visibilitychange", onchange); | |
| else if ((hidden = "mozHidden") in document) | |
| document.addEventListener("mozvisibilitychange", onchange); | |
| else if ((hidden = "webkitHidden") in document) | |
| document.addEventListener("webkitvisibilitychange", onchange); |
3 different files you can drop into your next responsive project.
A Pen by William Riley on CodePen.
A Pen by William Riley on CodePen.
Mash the Keyboard uses a subtle parallaxing tactic on the header -- in this pen I explain how to accomplish the layout, style and action of the parallaxing itself. to keep the content readable and interactive. you might not want to use this on mobile -- iOS devices don't register the scroll event kindly.
A Pen by William Riley on CodePen.