I hereby claim:
- I am sn3p on github.
- I am sn3p (https://keybase.io/sn3p) on keybase.
- I have a public key ASB1uGKpDI72UI0Cm4UbCdqLwYqYz6VzBV2O3nOm8iGq2wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
This example renders an Elixir/Phoenix EEx template in a JavaScript tests. I'm using cell-js and ex_css_modules to scope JS/CSS.
Rendering the template works like a charm. But when using CSS Modules the scoped classnames mapping (style.css.json file) needs to be present, otherwise rendering the template errors.
mocha test/**/*_test.js --recursive --require test/test_setup.js --timeout 10000| // Usage: | |
| // <link rel="shortcut icon" href="favicon.png" data-count"5"> | |
| (() => { | |
| const faviconSize = 32; | |
| const favicon = document.querySelector('[data-count]') | |
| // No notifications | |
| if (!favicon || !favicon.dataset.count) { | |
| return; |
| <a class="intercom-launcher" href="mailto:[email protected]"> | |
| <div class="intercom-icon-close"></div> | |
| <div class="intercom-icon-open"></div> | |
| <span class="intercom-unread-count"></span> | |
| </a> |
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Inject a stylesheet into the iframe</title> | |
| <link rel="stylesheet" href="intercom.css"> | |
| </head> | |
| <script> | |
| // IMPORTANT: Make sure to change YOUR_APP_ID | |
| (function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true; s.src='https://widget.intercom.io/widget/YOUR_APP_ID'; var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})() |
| // ---- | |
| // Sass (v3.4.14) | |
| // Compass (v1.0.3) | |
| // ---- | |
| %file-links { | |
| %style { | |
| &::before { | |
| background: no-repeat center; | |
| content: ""; |
| * { | |
| font-size: 12pt; | |
| font-family: monospace; | |
| font-weight: normal; | |
| font-style: normal; | |
| text-decoration: none; | |
| color: black; | |
| cursor: default; | |
| } |