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

adding nav to the Bootstrap example page with scrollspy + affix #36

Merged
merged 1 commit into from Jan 14, 2015

Conversation

bbodi
Copy link
Collaborator

@bbodi bbodi commented Jan 14, 2015

I added a nav list to the right of the Bootstrap example page, with Affix (always on top of the page, cannot scroll out) and scrollspy(menu items are activated automatically while scrolling through their sections) functionality.

I changed the separator character from "/" to "_" in the URL hash, because the scrollspy plugin/JQuery complains about it.

I removed the default ID value for the navbar. My opinion is that it is too valuable information to set it implicitly and hide from the programmer.

Unfortunately I used tab character instead of spaces, which caused some unwanted modifications. I didn't find any coding convetion for the projects, so please choose one of them, and I will use it.

Thanks,
Balázs

jean79 added a commit that referenced this pull request Jan 14, 2015
adding nav to the Bootstrap example page with scrollspy + affix
@jean79 jean79 merged commit f47ee9f into jean79:master Jan 14, 2015
@jean79
Copy link
Owner

jean79 commented Jan 14, 2015

Hi Bódi,
looks perfect.
I have just created a function:
enableScrollSpy(id:String) - see affix.kt how to pass a javascript Map

Also I moved id from HTMLParentComponent to ParentComponent, which allowed me to change TextInput back to extend ParentComponent.

This is the idea behind class hierarchy - feel free to comment, we can change it:
Component trait just provide HTMLElement
ParentComponent provides some useful protected methods for manipulating element (add/remove child, attributes setting)
Content of HTML element is created by the Component code, not by the user of the component (TextInput, Grid, ...)
HTMLParentComponent
inner content of the html element can be created by DSL
example: div, span, ...

Can you use 4 spaces as indent?

Was thinking about adding id and class as optional parameters to all HTML DSL functions, namely HTMLParentComponent.div an .span.
So that instead of
div {
id = "bla"
ul { }
}
we can write
div(id="bla") {
ul { }
}
What do you think?

Can you send me your email to jan.kovar79@gmail.com?
Regards,
Jan

@bbodi bbodi deleted the f branch January 15, 2015 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants