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

autolayout + vfl integration with famo.us #1

Closed
trusktr opened this issue Jun 15, 2015 · 9 comments
Closed

autolayout + vfl integration with famo.us #1

trusktr opened this issue Jun 15, 2015 · 9 comments
Labels

Comments

@trusktr
Copy link

trusktr commented Jun 15, 2015

when someone would do this! Nice!! ✨

Can you add some docs on how to use this in a Famous project? (main.js is informative though. Super awesome.)

@IjzerenHein
Copy link
Owner

Hi, I'm going to make an integration for famo.us real soon :)
Actually, the (my) whole purpose of autolayout.js was to bring autolayout and VFL to famo.us.
For now, you can have a look at src/vflToLayout which you can use to convert vfl to a layout function which can be used by a famous-flex LayoutController.

@IjzerenHein IjzerenHein changed the title I was wondering autolayout + vfl integration with famo.us Jun 15, 2015
@trusktr
Copy link
Author

trusktr commented Jun 15, 2015

I saw that. This is very awesome!!!

@IjzerenHein
Copy link
Owner

Hi, I've added an instruction on how to get started with VFL and famo.us here:
IjzerenHein/famous-flex#3 (comment)

cheers

@trusktr
Copy link
Author

trusktr commented Jul 28, 2015

This is great stuff @IjzerenHein!! 👍 Can't wait for the Mixed Mode version. 😄

@IjzerenHein
Copy link
Owner

I've got it up & running, should be real soon now!

@IjzerenHein
Copy link
Owner

Alright, mixed mode is now supported :)
https://github.com/IjzerenHein/famous-autolayout

@IjzerenHein
Copy link
Owner

Let me know what you build with it.
I have tons of exotic VFL examples that I have already build for clients.

@trusktr
Copy link
Author

trusktr commented Jul 29, 2015

Looking forward to trying it. :)

@IjzerenHein
Copy link
Owner

It has already completely changed my workflow. Complex layouts that needed to scale to any device and changed on a nearly daily basis were taking most of my time. Now it's done in just minutes.

Just throw that in the visual format editor:

//--viewport aspect-ratio:16/9
//shapes avatar:circle
//shapes page1:circle page2:circle page3:circle page4:circle page5:circle
//colors title:#FFF message:#282B2D button:#48E0A4
HV:|[background]|
H:|[_leftSpacer(>=5%)][avatar(avatar.height)][_middleSpacer(avatar/10)][message(avatar*1.37)][_rightSpacer(_leftSpacer)]|
H:[_middleSpacer][title(message*0.48)]
H:[button(message*0.32)][_rightSpacer]
H:[pagers:[page5(page5.height)]~(page1*0.7)~[page4(page4.height)]~[page3(page3.height)]~[page2(page2.height)]~[page1(page1.height)]~][button]
V:|~[avatar(<=68%)]~|
V:|~[title(message)][_messageSpacer(avatar*0.1)][message(avatar*0.26)]~|
V:[message][button(avatar*0.13)][_bottomSpacer]|
V:[message]~[pagers(button*0.6)]~[_bottomSpacer]|
Z:|[background][avatar]
Z:|[background][message]
Z:|[background][title]
Z:|[background][button]
Z:|[background][pagers]

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

No branches or pull requests

2 participants