Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes! Well, I think you could throw it in an iframe, but I'll play around with it and create an embeddable view that looks better.


I was thinking iframe. Either way, if you're OK with embedding it, I think I will. Thanks!


I just added an embedding option. It's not documented yet, but you can view the source of my own site to see how it works. In terms of styling, it currently only supports specifying the background color (color or hex code) via url param.

https://www.coryzue.com/life/

This is the relevant source code. The only somewhat complicated bit is dynamically setting the height via messages:

<section class="section"> <div class="container"> <iframe id="life-timeline" src="https://lifeweeks.app/embed/life/czue/?bg=white" frameborder="0" width="100%" scrolling="no" ></iframe> </div> </section> <script> window.addEventListener('message', function(e) { if (e.data.type === 'resize') { document.getElementById('life-timeline').style.height = e.data.height + 'px'; } }); </script>


This is great, thank you! I'm going to drop it in later and see how it works.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: