Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
bootswatch.com
Comment | File | Size | Author |
---|---|---|---|
#20 | bootstrap-add-bootswatch-support-1840374-20.patch | 3.41 KB | valkum |
#17 | bootstrap-add-bootswatch-support-1840374-17.patch | 4.04 KB | valkum |
#16 | bootstrap-add-bootswatch-support-1840374-16.patch | 3.35 KB | valkum |
Comments
Comment #1
frankbaele CreditAttribution: frankbaele commentedif done correctly would explode the the theme possibilities
Comment #2
cweagansJust wanted to crosslink #1839958: Provide theme setting for picking local bootstrap or hotlink from bootstrap CDN here - if the other issue gets done first, it'd be great to have hotlink-able bootswatch files here.
Comment #3
andregriffin CreditAttribution: andregriffin commentedThere is also BootTheme, which is quite a powerful tool. http://www.boottheme.com/.
I don't understand what you mean by "integrate". You simply replace a css/less file if you want to apply a particular style... Do you mean adding in a theme option to automatically select and apply a particular bootswatch?
Comment #4
frankbaele CreditAttribution: frankbaele commentedComment #5
RobLoachI just replaced the CSS in my own theme using the .info file, but it would be nice if this kind of interaction was handled in the UI. Will have to do some brainstorming.
Comment #6
markhalliwellIn theory, this wouldn't be too hard to implement if you were using the http://dgo.to/less module and the sub-theme method I'd like to get implemented into this project: #1844448: Add sub-theme starter kit. My method would allow you to easily replace the sub-theme's variable file with that of BootSwatch or BootTheme and recompile (or flush caches if using the LESS module).
To expand further on the idea of integrating an import from BootSwatch or BootTheme, the method would be similar to how I did the importing of Fontello icons in the http://dgo.to/fontello module. We would obviously have to create a module (like: bootstrap_ui) to handle all this and probably be dependent upon the LESS module to compile the variables. I know that there's an existing http://dgo.to/twitter_bootstrap_ui module, but that simply integrates a sites/all/libraries path, plus the namespace is wrong.
Comment #7
RobLoachAs a side note, I've put together a pre-built repository for Bootstrap at:
https://github.com/components/bootstrap
Would be nice to have one for the Bootswatch themes as well.
Comment #8
btopro CreditAttribution: btopro commentedcouldn't this also be accomplished by a very simple theme settings page setting that looks at a folder for the name of some files instead of assuming the default bootstrap? This would work similar to how Garland has the color slider but has pre-built color swatches (these would be bootstrap swatches).
Since these are all from this site the naming convention for selection could just be based on folder path. Proposed method of handling:
Also, as these are all Apache 2.0, a make file could be created that would allow for essentially turning the current bootstrap theme into a multitude of "colorizable" themes out of the box (most importantly, the geo-cities theme).
I just used Cerulean yesterday and made a sub-theme off of bootstrap to implement it so I'd be happy to work on a patch so I don't have to do that in the future :)
Comment #9
btopro CreditAttribution: btopro commentedI bundled these on github as sub-themes incase people want to try out bootswatch in drupal quickly -- https://github.com/btopro/bootswatch_drupal
Comment #10
giorgio79 CreditAttribution: giorgio79 commentedAwesome btopro!! Thank you so much, will try right now.
Comment #11
Robin van Emden CreditAttribution: Robin van Emden commentedHey that's great - thanks btopro!
Comment #12
markhalliwellMarked #2043023: I think that we should be able to choose CDN theme as a dup of this issue. Perhaps we can put a theme setting to switch Bootswatch themes via BootstrapCDN?
Comment #13
giorgio79 CreditAttribution: giorgio79 commentedI've been playing with Bootswatch themes, and I see this Admin Menu issue #1431130: Incompatibility with Admin menu with them.
Also, the Navbar menu seems to be out of line with the Site Name on Bootswatch themes.
Comment #14
markhalliwellI'm postponing this feature for now. We can backport to 7.x-2.x and 7.x-3.x later.
Comment #15
markhalliwellWe can implement this as a theme setting since BootstrapCDN offers these. Moving to 7.x-3.x.
Comment #16
valkum CreditAttribution: valkum commentedDone some work.
i'm not sure is its the best way to get the bootswatch themes via drupal_http_request(), but via AJAX on client side there were validation erros, because form api does'nt allow options selected that are not in the initial options
More to go: on Select show the thumbnail below.
Comment #17
valkum CreditAttribution: valkum commentedadded the thumbnail functionality
Comment #18
markhalliwellWe're using
theme_get_setting('bootstrap_cdn')
a few times here now. Let's put this in a variable like$bootstrap_cdn
.Please review Drupal's JavaScript and jQuery Coding Standards
PHP 5.2 and below do not support invoking adjacent methods or properties off of a function callback that returns a class or object (ie:
function()->property
). Let's separate this into a separate$request
variable.I don't think it's necessary to have a separate checkbox here. Let's do the same thing we did with the bootstrap_cdn variable and just make use of #empty_option here to determine when this is enabled.
Comment #19
markhalliwellFYI, just committed b97dbd2 to 7.x-3.x, which is just some coding standards and verbiage cleanup on theme-settings.php. You'll need to re-roll this patch.
Comment #20
valkum CreditAttribution: valkum commentedrework
Comment #21
markhalliwellThanks @valkum!
Committed d756c7b to 7.x-3.x.
Committed 7fc3b40 to 7.x-3.x.
Comment #22
wundo CreditAttribution: wundo commentedI'd suggest we backport this to 7.x-2x too
Comment #23
markhalliwellI'd rather not port feature requests. 2.x is now in bug fix mode only (since 3.x is now head).
Comment #24
markhalliwellComment #25
giorgio79 CreditAttribution: giorgio79 commentedBootswatch is a massive win for this project. You need to mention it on the frontpage :) with a link to bootswatch http://bootswatch.com/
Comment #26
markhalliwellI've been updating the project page periodically, but my ultimate goal is to completely rewrite the project page to highlight all the features, not just this one, once a full 7.x-3.0 release is made.
I agree though, this is a huge win for this project :)