Skip to content
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

Layout Problems #20

Closed
jrans opened this issue Oct 18, 2016 · 1 comment
Closed

Layout Problems #20

jrans opened this issue Oct 18, 2016 · 1 comment

Comments

@jrans
Copy link
Member

jrans commented Oct 18, 2016

Ultimately we we would like to use the layout and layoutPath in vision.

We have some problems though:

  • Our engine calls Riot.render which is ideally what we want (can write layout just as another tag) but at the same time strips out all scripts and style elements which may be useful.
  • Even avoiding that, the result of the engine doesn't produce valid html (not sure why, may be easy to solve..)
    • Can't find away to distinguish when loading a layout tag or a view tag since not all the options are passed down, hence can't correct any of above nor can we only append scripts to view tags

As a result an initial solution is to let them give us a full html file which is static bar the injecting of content at the placeholder <<<RIOT>>>. They can have it as a layout by setting layout and layoutPath in the compileOptions with default layout.html just like the other way.

When we find a way to deal with above problems, I'd be very happy to revert but for now this approach works for what we want and so long as enough warning is given should be easy to use.

jrans added a commit that referenced this issue Oct 18, 2016
+ Create layout feature to have foundation html to be inject with riot content.
+ Cache this process
+ Update existing cacheing to make slightly more efficient
+ Update examples to use layout feature
Related: #16, #19, #20
@jrans jrans mentioned this issue Oct 18, 2016
@jrans
Copy link
Member Author

jrans commented Oct 18, 2016

@nelsonic have a look, going to use approach in #21 for now and can always improve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants