-
-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embed Flems.io code samples in the docs #526
Comments
yes please, as a client-side newbie there's a many areas that I'd like to be able to step through in order to properly understand them. |
Created one for the velocity.js example: https://jsfiddle.net/sh230y2j/ |
Created fiddle with extended todo app example (used moment.js for pretty timestamps, double-click to edit etc.). Also you can fork repo https://github.com/glebcha/reminder-mithril/ And play width demo http://glebcha.github.io/reminder-mithril/ (sorry, only Russian) |
Hi, Leo. I made a list of examples from the simplest, like a "hello world" to the resolution of components, in this way, the evolution and understanding of Mitrhil is more progressive and simple. All examples are in Codepen: http://codepen.io/MasqueradeCircus/pen/gLwZXZ?editors=0010. |
@Masquerade-Circus wow this looks pretty awesome |
@Masquerade-Circus Nice examples, I noticed in |
@Bondifrench Thanks for noticing this. It was for the onclick function, it performed the natural update for the onclick event and also made a second update by calling the m.redraw method. I just put an empty function and now it's all right. Thanks. |
Closing as the 0.2.x docs are no longer live. |
IMO this still applies to the 1.0 docs |
Reopened and removed the misleading 0.2.x label. |
I'd love to make all the examples live using flems core. Would a pull request for this be welcomed? |
I did this already for the guides using codepen, assuming flems has a nice embed I'm 100% in favor of expanding it to the API docs and converting the guide to use flems as well. |
There! I'm all for it as well! @tivac, flems was made to be embedded as a one file solution (it is a HTML/JS chimera). |
I found embedding flems.io directly in the doc/text/article a bit jarring and instead list the code statically with a flems.io link. See https://mike-ward.net/2018/05/09/mithril-rising/ for examples. Also, I'm willing to give this a go if it's something we still want for 2.0. |
@mike-ward It's a nice-to-have, not a blocker for anything. We're just waiting for someone to just put forth the effort. I'm okay with us not directly embedding Flems snippets, but I'm personally okay either way. |
@isiahmeadows OK, I'll start with the home page and generate something for comment and feedback. |
@mike-ward Sorry I hadn't noted inhere that I was working on this, I only mentioned it in gitter I think.. I've got the initial setup ready, I just got sidetracked by work and other stuff, so it was stuck in a local branch with me :-( If you want to you're very welcome to pick it up from here. I think now that we have actual live flems running we can remove some of the code boxes as well, but I thought it might be better to make that part of a larger docs overhaul / cleanup. I've made a simple change to the code boxes such that any code boxes starting with This is how it looks so far (I've only replaced codepens by flems): http://porsager.com/mithril-docs/ The branch is here: https://github.com/porsager/mithril.js/tree/flems-in-docs If you want to get set up quickly I found it quick to use wright like this:
|
@porsager Your call. Maybe it would be easier if the core contributors choose another project/issue for me? I'm not fussy, Just want to contribute. |
I guess I could wrap this up fairly quickly from where it is now, so now that it's current I might as well do that. I'm not core, but a quick glance, and maybe |
OK, I own #2334 |
* Initial addition of flems - fixes #526 * Fix leftover ```js code blocks * Add DOCTYPE * Fix edge & IE11 * Don't show console * Change orientation on mobile * Use mithril@next for playground link * Improve loading and structure * Fix header alignment in IE * Don't rotate logo * Fix conflicts * Allow `js` tags * Fix code block query * Fix Routing section and flems * Fix firefox * Improve flems styling * Improve copy * Fix data -> body in m.request sample * Add flems in docs usage description
* Initial addition of flems - fixes #526 * Fix leftover ```js code blocks * Add DOCTYPE * Fix edge & IE11 * Don't show console * Change orientation on mobile * Use mithril@next for playground link * Improve loading and structure * Fix header alignment in IE * Don't rotate logo * Fix conflicts * Allow `js` tags * Fix code block query * Fix Routing section and flems * Fix firefox * Improve flems styling * Improve copy * Fix data -> body in m.request sample * Add flems in docs usage description
It'd be nice to have runnable samples for the code presented in the docs, especially the longer snippets
The text was updated successfully, but these errors were encountered: