-
Notifications
You must be signed in to change notification settings - Fork 259
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
Added themes for basic stars in flavors for css, fontawesome and boot… #35
Conversation
3edbc22
to
d24c7f1
Compare
One thing that might be quite nice to add in this PR is the concept of sizes. Maybe following on from bootstrap define sizes: xs, sm, md, lg and use them by adding <div class="br-theme-basic br-stars br-size-lg">
<select>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</div> Of course if you need more refinement over size then you need to do some custom css, but it would suit most people to have a fairy set of well-defined sizes. |
Also maybe it would be better if there was $('.stars').barrating({
theme: 'bootstrap',
type: 'stars'
}); |
Just recently I changed how the plugin works and the wrapper div is created automatically on init (with a Passing options to the plugin sounds like a good idea - if you go for sizes as well, my vote goes for this kind of setup: <div class="br-wrapper">
...hidden select field...
<div class="br-widget br-theme-basic br-type-stars br-size-lg">
<select>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</div>
</div> $('.stars').barrating({
theme: 'bootstrap',
type: 'stars',
size: 'xs'
}); In effect maybe the |
Sounds good to me! |
Just looking into this again, any more thoughts @antennaio ? Will push updated PR in a sec |
@antennaio should be all good to merge now. I've held off on the sizes, maybe those can be added as a feature in another commit. Also kept the wrapper class for backwards compatibility, maybe this can be removed in future. Really keen on getting PR #37 merged as well, so there's automatic testing with travis on PRs and also better windows support. |
Hmm, actually thinking maybe it might be simpler to get rid of the
Then each theme will have it's own file like |
Ok, all good to merge. |
Thanks @garygreen :) |
Added themes for basic stars in flavors for css, fontawesome and boot…
Keeping it simple, just adding basic themes for the stars (most common imo). I've changed to use the unicode for basic css rather than images (can add that maybe at a later date).
Usage is just simply to wrap your rating in a container like: