Drupal - How to keep my Bootstrap sub-theme without using the CDN?
You will need to switch the module you are using - Bootstrap Library is not suited to be used without CDN. The main function this module provides is connection to a CDN of your choice - not provide a theme (or css) itself.
The module you will want to use is the Bootstrap Theme. This one provides a sub-theme you can expand upon.
To get the Bootstrap Theme going:
- Disable your old Journal theme + move it from the theme folder - that's important. (Maybe make a backup somewhere).
- Download the Bootstrap Theme from the Drupal site and put it in your theme folder. (And leave it there)
- Create a subtheme following the instructions for the less-starterkit (you wont need to touch less no worries) here: Sub-Theming Bootstrap. Basically you copy the
bootstrap_subtheme
folder from the bootstrap theme into your theme folder and rename the folder to journal (your theme name). You also rename./journal/less.starterkit
to./journal/journal.info
. - Open your new .info file and change name + description. (You can copy it from your old theme.)
- Download the latest 3.x.x version of the of Bootstrap Framework Source Files into your new sub-theme. After it has been extracted, the folder should read ./journal/bootstrap. (Don't modify the files in this folder, this folder allows you to later update Bootstrap without overwriting your changes.)
- Download the journal theme css from bootswatch. Copy it into your
journal/css
folder. (This is the file which was previously provided by the CDN.) It should now readjournal/css/bootstrap.min.css
- Open your
.info
file again, find the linestylesheets[all][] = css/style.css
and add a line right above it:stylesheets[all][] = css/bootstrap.min.css
. This will load the default journal css. - Now you need to copy your custom changes into the new theme. Copy your custom css into
css/style.css
and your template files (if you have any custom template files) into thejournal/templates
folder. - Enable your new Journal theme.
Glyphicons
Check your subtheme... there should be a folder fonts
. If there is no such folder create one. Then navigate to the bootstrap source files you put in the bootstrap
folder of your theme, find the font folder there and copy all font files in your own font
folder. (This is needed because the default css looks for the fonts under ../fonts/font-name
)
Headermenu
Have you checked the settings of your new theme in the UI? It has a couple of menu bar settings, maybe you are just using the wrong one. Generally bootstrap works nicely with the admin menu, at least on all sites I have it on. It is possible, that some of your custom css is interfering with the default bootstrap theme setup. In that case you would need to do some debugging on your custom css. From what I see though it might be enough for the front end to give the main-container a top margin of 60-70px.