From 9c5708cc92af894e414bc76ee35ec2230de5d288 Mon Sep 17 00:00:00 2001 From: Agustin Henze Date: Wed, 2 Jan 2013 08:35:03 -0300 Subject: Imported Upstream version 5.1 --- .travis.yml | 14 + AUTHORS.txt | 2 + CHANGES.txt | 41 +- LICENSE.txt | 23 + docs/creating-a-theme.txt | 283 +++++ docs/extending.txt | 12 +- docs/manual.txt | 85 +- docs/theming.txt | 23 +- nikola/__init__.py | 6 +- nikola/conf.py.in | 283 +++++ nikola/console.py | 7 + nikola/data/samplesite/README.txt | 27 +- nikola/data/samplesite/conf.py | 274 ----- nikola/data/samplesite/conf.py.in | 268 ----- nikola/data/samplesite/posts/1.txt | 2 + nikola/data/samplesite/stories/listings-demo.txt | 10 + nikola/data/samplesite/stories/slides-demo.txt | 17 + .../default/assets/css/bootstrap-responsive.css | 68 +- .../data/themes/default/assets/css/bootstrap.css | 1245 +++++++++++++------- nikola/data/themes/default/assets/css/slides.css | 11 + nikola/data/themes/default/assets/js/bootstrap.js | 386 ++++-- .../data/themes/default/assets/js/slides.jquery.js | 555 +++++++++ nikola/data/themes/default/bundles | 4 +- nikola/data/themes/default/messages/de.py | 21 - nikola/data/themes/default/messages/en.py | 25 - nikola/data/themes/default/messages/es.py | 21 - nikola/data/themes/default/messages/fr.py | 17 - nikola/data/themes/default/messages/gr.py | 20 - nikola/data/themes/default/messages/it.py | 20 - nikola/data/themes/default/messages/messages_de.py | 22 + nikola/data/themes/default/messages/messages_en.py | 27 + nikola/data/themes/default/messages/messages_es.py | 22 + nikola/data/themes/default/messages/messages_fr.py | 18 + nikola/data/themes/default/messages/messages_gr.py | 21 + nikola/data/themes/default/messages/messages_it.py | 23 + nikola/data/themes/default/messages/messages_ru.py | 22 + nikola/data/themes/default/messages/ru.py | 21 - nikola/data/themes/default/templates/base.tmpl | 62 +- .../data/themes/default/templates/base_helper.tmpl | 74 ++ nikola/data/themes/default/templates/index.tmpl | 28 +- .../themes/default/templates/index_helper.tmpl | 31 + .../data/themes/default/templates/list_post.tmpl | 14 + nikola/data/themes/default/templates/post.tmpl | 49 +- .../data/themes/default/templates/post_helper.tmpl | 54 + nikola/data/themes/default/templates/tag.tmpl | 2 +- nikola/data/themes/default/templates/tags.tmpl | 2 +- nikola/data/themes/jinja-default/README | 2 +- .../data/themes/jinja-default/templates/base.tmpl | 31 +- .../data/themes/jinja-default/templates/index.tmpl | 2 +- .../themes/jinja-default/templates/list_post.tmpl | 13 + .../data/themes/jinja-default/templates/post.tmpl | 2 +- .../data/themes/jinja-default/templates/tag.tmpl | 2 +- nikola/data/themes/monospace/assets/css/code.css | 62 + .../data/themes/monospace/assets/css/colorbox.css | 85 ++ nikola/data/themes/monospace/assets/css/rst.css | 315 +++++ nikola/data/themes/monospace/assets/css/theme.css | 14 + nikola/data/themes/monospace/bundles | 1 + nikola/data/themes/monospace/messages | 1 + nikola/data/themes/monospace/templates/base.tmpl | 44 + .../themes/monospace/templates/base_helper.tmpl | 64 + .../data/themes/monospace/templates/gallery.tmpl | 27 + nikola/data/themes/monospace/templates/index.tmpl | 27 + .../themes/monospace/templates/index_helper.tmpl | 31 + nikola/data/themes/monospace/templates/list.tmpl | 14 + .../data/themes/monospace/templates/list_post.tmpl | 14 + .../data/themes/monospace/templates/listing.tmpl | 10 + nikola/data/themes/monospace/templates/post.tmpl | 28 + .../themes/monospace/templates/post_helper.tmpl | 54 + nikola/data/themes/monospace/templates/story.tmpl | 8 + nikola/data/themes/monospace/templates/tag.tmpl | 7 + nikola/data/themes/monospace/templates/tags.tmpl | 14 + nikola/data/themes/orphan/assets/css/code.css | 1 + nikola/data/themes/orphan/assets/css/colorbox.css | 1 + nikola/data/themes/orphan/assets/css/rst.css | 1 + nikola/data/themes/orphan/assets/css/theme.css | 0 nikola/data/themes/orphan/bundles | 1 + nikola/data/themes/orphan/messages | 1 + nikola/data/themes/orphan/templates/base.tmpl | 36 + .../data/themes/orphan/templates/base_helper.tmpl | 64 + nikola/data/themes/orphan/templates/gallery.tmpl | 27 + nikola/data/themes/orphan/templates/index.tmpl | 18 + .../data/themes/orphan/templates/index_helper.tmpl | 31 + nikola/data/themes/orphan/templates/list.tmpl | 14 + nikola/data/themes/orphan/templates/list_post.tmpl | 14 + nikola/data/themes/orphan/templates/listing.tmpl | 10 + nikola/data/themes/orphan/templates/post.tmpl | 20 + .../data/themes/orphan/templates/post_helper.tmpl | 54 + nikola/data/themes/orphan/templates/story.tmpl | 8 + nikola/data/themes/orphan/templates/tag.tmpl | 7 + nikola/data/themes/orphan/templates/tags.tmpl | 14 + nikola/data/themes/site/assets/css/theme.css | 12 +- nikola/data/themes/site/templates/base.tmpl | 67 +- nikola/data/themes/site/templates/post.tmpl | 45 +- nikola/filters.py | 75 +- nikola/nikola.py | 148 ++- nikola/plugin_categories.py | 28 +- nikola/plugins/__init__.py | 4 + nikola/plugins/command_bootswatch_theme.py | 47 +- nikola/plugins/command_build.py | 36 +- nikola/plugins/command_check.py | 58 +- nikola/plugins/command_console.plugin | 9 + nikola/plugins/command_console.py | 35 + nikola/plugins/command_deploy.py | 27 +- nikola/plugins/command_import_wordpress.py | 330 ++++-- nikola/plugins/command_init.py | 72 +- nikola/plugins/command_install_theme.py | 53 +- nikola/plugins/command_new_post.py | 46 +- nikola/plugins/command_serve.py | 37 +- nikola/plugins/compile_html.py | 24 + nikola/plugins/compile_markdown/__init__.py | 33 +- nikola/plugins/compile_rest/__init__.py | 34 +- .../compile_rest/pygments_code_block_directive.py | 38 +- nikola/plugins/compile_rest/slides.py | 89 ++ nikola/plugins/compile_rest/youtube.py | 24 + nikola/plugins/task_archive.py | 62 +- nikola/plugins/task_copy_assets.py | 35 +- nikola/plugins/task_copy_files.py | 24 + nikola/plugins/task_create_bundles.py | 27 +- nikola/plugins/task_indexes.py | 37 +- nikola/plugins/task_redirect.py | 30 +- nikola/plugins/task_render_galleries.py | 81 +- nikola/plugins/task_render_listings.py | 24 + nikola/plugins/task_render_pages.py | 24 + nikola/plugins/task_render_posts.py | 24 + nikola/plugins/task_render_rss.py | 26 +- nikola/plugins/task_render_sources.py | 24 + nikola/plugins/task_render_tags.py | 304 +++-- nikola/plugins/task_sitemap/__init__.py | 38 +- nikola/plugins/task_sitemap/sitemap_gen.py | 47 +- nikola/plugins/template_jinja.py | 36 +- nikola/plugins/template_mako.py | 28 +- nikola/post.py | 35 +- nikola/utils.py | 69 +- requirements-3.txt | 12 + requirements.txt | 4 + scripts/nikola | 2 +- setup.py | 57 +- tests/context.py | 9 + tests/rss-2_0.xsd | 500 ++++++++ tests/test_command_import_wordpress.py | 92 ++ tests/test_rss_feeds.py | 104 ++ tests/wordpress_export_example.xml | 174 +++ tests/wordpress_unicode_export.xml | 114 ++ 143 files changed, 6839 insertions(+), 2031 deletions(-) create mode 100644 .travis.yml create mode 100644 AUTHORS.txt create mode 100644 LICENSE.txt create mode 100644 docs/creating-a-theme.txt create mode 100755 nikola/conf.py.in create mode 100644 nikola/console.py delete mode 100755 nikola/data/samplesite/conf.py delete mode 100755 nikola/data/samplesite/conf.py.in create mode 100644 nikola/data/samplesite/stories/listings-demo.txt create mode 100644 nikola/data/samplesite/stories/slides-demo.txt create mode 100644 nikola/data/themes/default/assets/css/slides.css create mode 100755 nikola/data/themes/default/assets/js/slides.jquery.js delete mode 100644 nikola/data/themes/default/messages/de.py delete mode 100644 nikola/data/themes/default/messages/en.py delete mode 100644 nikola/data/themes/default/messages/es.py delete mode 100644 nikola/data/themes/default/messages/fr.py delete mode 100644 nikola/data/themes/default/messages/gr.py delete mode 100644 nikola/data/themes/default/messages/it.py create mode 100644 nikola/data/themes/default/messages/messages_de.py create mode 100644 nikola/data/themes/default/messages/messages_en.py create mode 100644 nikola/data/themes/default/messages/messages_es.py create mode 100644 nikola/data/themes/default/messages/messages_fr.py create mode 100644 nikola/data/themes/default/messages/messages_gr.py create mode 100644 nikola/data/themes/default/messages/messages_it.py create mode 100644 nikola/data/themes/default/messages/messages_ru.py delete mode 100644 nikola/data/themes/default/messages/ru.py create mode 100644 nikola/data/themes/default/templates/base_helper.tmpl create mode 100644 nikola/data/themes/default/templates/index_helper.tmpl create mode 100644 nikola/data/themes/default/templates/list_post.tmpl create mode 100644 nikola/data/themes/default/templates/post_helper.tmpl create mode 100644 nikola/data/themes/jinja-default/templates/list_post.tmpl create mode 100644 nikola/data/themes/monospace/assets/css/code.css create mode 100644 nikola/data/themes/monospace/assets/css/colorbox.css create mode 100644 nikola/data/themes/monospace/assets/css/rst.css create mode 100644 nikola/data/themes/monospace/assets/css/theme.css create mode 100644 nikola/data/themes/monospace/bundles create mode 120000 nikola/data/themes/monospace/messages create mode 100644 nikola/data/themes/monospace/templates/base.tmpl create mode 100644 nikola/data/themes/monospace/templates/base_helper.tmpl create mode 100644 nikola/data/themes/monospace/templates/gallery.tmpl create mode 100644 nikola/data/themes/monospace/templates/index.tmpl create mode 100644 nikola/data/themes/monospace/templates/index_helper.tmpl create mode 100644 nikola/data/themes/monospace/templates/list.tmpl create mode 100644 nikola/data/themes/monospace/templates/list_post.tmpl create mode 100644 nikola/data/themes/monospace/templates/listing.tmpl create mode 100644 nikola/data/themes/monospace/templates/post.tmpl create mode 100644 nikola/data/themes/monospace/templates/post_helper.tmpl create mode 100644 nikola/data/themes/monospace/templates/story.tmpl create mode 100644 nikola/data/themes/monospace/templates/tag.tmpl create mode 100644 nikola/data/themes/monospace/templates/tags.tmpl create mode 120000 nikola/data/themes/orphan/assets/css/code.css create mode 120000 nikola/data/themes/orphan/assets/css/colorbox.css create mode 120000 nikola/data/themes/orphan/assets/css/rst.css create mode 100644 nikola/data/themes/orphan/assets/css/theme.css create mode 100644 nikola/data/themes/orphan/bundles create mode 120000 nikola/data/themes/orphan/messages create mode 100644 nikola/data/themes/orphan/templates/base.tmpl create mode 100644 nikola/data/themes/orphan/templates/base_helper.tmpl create mode 100644 nikola/data/themes/orphan/templates/gallery.tmpl create mode 100644 nikola/data/themes/orphan/templates/index.tmpl create mode 100644 nikola/data/themes/orphan/templates/index_helper.tmpl create mode 100644 nikola/data/themes/orphan/templates/list.tmpl create mode 100644 nikola/data/themes/orphan/templates/list_post.tmpl create mode 100644 nikola/data/themes/orphan/templates/listing.tmpl create mode 100644 nikola/data/themes/orphan/templates/post.tmpl create mode 100644 nikola/data/themes/orphan/templates/post_helper.tmpl create mode 100644 nikola/data/themes/orphan/templates/story.tmpl create mode 100644 nikola/data/themes/orphan/templates/tag.tmpl create mode 100644 nikola/data/themes/orphan/templates/tags.tmpl create mode 100644 nikola/plugins/__init__.py create mode 100644 nikola/plugins/command_console.plugin create mode 100644 nikola/plugins/command_console.py create mode 100644 nikola/plugins/compile_rest/slides.py create mode 100644 requirements-3.txt create mode 100644 tests/context.py create mode 100644 tests/rss-2_0.xsd create mode 100644 tests/test_command_import_wordpress.py create mode 100644 tests/test_rss_feeds.py create mode 100644 tests/wordpress_export_example.xml create mode 100644 tests/wordpress_unicode_export.xml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..7720bab --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: python +python: + - "2.6" + - "2.7" +# The dependencies we rely on are not yet full Python 3.x compatible. +# - "3.2" +# command to install dependencies +install: + - "pip install -r requirements.txt --use-mirrors" + - "pip install . --use-mirrors" +# We run tests and afterwards nikola to see if the command is executable. +script: + - nosetests + - nikola diff --git a/AUTHORS.txt b/AUTHORS.txt new file mode 100644 index 0000000..8f2d70e --- /dev/null +++ b/AUTHORS.txt @@ -0,0 +1,2 @@ +Roberto Alsina +Eduardo Schettino diff --git a/CHANGES.txt b/CHANGES.txt index f9a822d..8029e44 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,42 @@ -New in Master -============= +New in v5.1 +=========== + +Features +-------- + +* Support for client-side cloud tags +* New ``slides`` directive, for image slideshows. +* New option DATE_FORMAT +* New "nikola console" command +* New option CACHE_FOLDER +* Updated bootstrap to 2.2.2 +* Wordpress importer supports redirects +* Wordpress importer creates a url_map for Disqus thread migration +* Wordpress importer: support for [sourcecode] +* Added unstyled theme "orphan", useful as a base for independent themes. +* New "monospace" theme. +* New "Create a Theme From Scratch" tutorial. + +Bugfixes +-------- + +* Added ID attribute to gallery images for backlinking. +* Added ALT attribute to gallery images. +* Issue 113: refactored code in Mako templates +* Added newline after metadata in new_post template. +* Issue 112: RSS feeds contained invalid links +* Issue 88: RSS feed validation via lxml +* Isuue 169: build subcommands were broken +* Switched addThis to Peekaboo style, as seen on flexion.org (seems less broken) +* Remove duplicated sample config file. always build it from template (schettino72) +* Don't use hardcoded path for custom.css (schettino72) +* Wordpress importer: fixed issue 190, convert embedded H1 tags into H2 +* Fixed bad interaction with Yapsy 1.10 +* More elegant handling of "nikola init" +* Don't crash if there's no assets to copy + +New in v5 +========= Features -------- diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..19c37bb --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,23 @@ +Copyright (c) 2012 Roberto Alsina y otros. + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of +the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/docs/creating-a-theme.txt b/docs/creating-a-theme.txt new file mode 100644 index 0000000..0535073 --- /dev/null +++ b/docs/creating-a-theme.txt @@ -0,0 +1,283 @@ +Creating A Theme From Scratch (Almost) +====================================== + +There is some documentation about creating themes for Nikola, but maybe a tutorial is also a useful way +to explain it. So, here it is. I'll explain how to create a theme (almost) from scratch. Alternatively, +you can take an existing theme and modify only parts of it via inheritance, but that's for another +document. + +I will try to create a theme that looks like `Vinicius Massuchetto's Monospace Theme `_. + +.. TEASER_END + +Starting The Theme +------------------ + +First, we create a testing site, and copy the orphan theme from nikola's sources into the right place:: + + $ nikola init monospace-site + A new site with some sample data has been created at monospace-site. + See README.txt in that folder for more information. + + $ cd monospace-site/ + $ mkdir themes + $ cp -RL ~/Desktop/proyectos/nikola/nikola/nikola/data/themes/orphan/ themes/monospace + +The next step is to make the testing site use this new theme, by editing ``conf.py`` and +changing the ``THEME`` option:: + + # Name of the theme to use. Themes are located in themes/theme_name + THEME = 'monospace' + +Now we can already build and test the site:: + + $ nikola build && nikola serve + +.. figure:: http://ralsina.com.ar/galleries/random/monospace-1.png + :height: 400px + + This is the almost completely unstyled "orphan" theme. + +Of course, the page layout is completely broken. To fix that, we need to get into templates. + +Templates: Page Layout +---------------------- + +The general page layout for the theme is done by the ``base.tmpl`` template, which is done using +`Mako `_. This is orphan's ``base.tmpl``, it's not very big: + +.. code-block:: mako + + ## -*- coding: utf-8 -*- + <%namespace file="base_helper.tmpl" import="*"/> + + + + ${html_head()} + <%block name="extra_head"> + + + + %if add_this_buttons: + + % endif +

+ ${blog_title} +

+ <%block name="belowtitle"> + %if len(translations) > 1: + + ${(messages[lang][u"Also available in"])}:  + ${html_translations()} + + %endif + + <%block name="content"> + ${content_footer} + +
    +
  • ${license} + ${html_social()} + ${html_sidebar_links()} +
  • ${search_form} +
+ ${analytics} + + + + +It's basically a HTML document with some placeholders to be replaced with actual content, configuration options, and some helper functions. +For example, the ``html_head`` helper can be used to add CSS or JS files in all document's ``head`` tags. + +Monospace is a two-column-with-footer layout, so let's copy the basics from its HTML and see what happens: + +.. code-block:: mako + + ## -*- coding: utf-8 -*- + <%namespace file="base_helper.tmpl" import="*"/> + + + + ${html_head()} + <%block name="extra_head"> + + + + %if add_this_buttons: + + % endif +
+
+ <%block name="content"> +
+ + +
+ ${analytics} + + + +.. figure:: http://ralsina.com.ar/galleries/random/monospace-2.png + + Yikes! + +This will get better quickly once we add some CSS + + +Base CSS +-------- + +The orphan theme includes just a little styling, specifically ``rest.css`` so +the restructured text output looks reasonable, and code.css for code snippets. + +It also includes an empty ``assets/css/theme.css`` where you can add your own CSS. +For example, this is taken from the original monospace theme: + +.. code-block:: css + + body { margin:0px; padding:20px 0px; text-align:center; font-family:Monospace; color:#585858; } + .post { margin:0px 0px 30px 0px; padding:0px 0px 30px 0px; border-bottom:1px dotted #C8C8C8; } + .meta { margin:10px; padding:15px; background:#EAEAEA; clear:both; } + #footer { text-align:center; clear:both; margin:30px 0px 0px 0px; padding:30px 0px 0px 0px; border-top:1px dotted #C8C8C8; } + #wrap { margin:0px auto; text-align:left; font-size: 13px; line-height: 1.4; } + #container { float:right; } + #sidebar { overflow:hidden; clear:left; text-align:right; width:250px; height:auto; padding:0px 15px 0px 0px; border-right:1px dotted #C8C8C8; } + #sidebar li { list-style-type:none; } + #sidebar > li { margin:20px 0px; } + #sidebar h1 { border-bottom:1px dotted #C8C8C8; } + #sidebar .description { display:block; width:100%; height:auto; margin:0px 0px 10px 0px; } + +This will (after we rebuild it) make the site looks different of course, and getting closer to our goal: + +.. figure:: http://ralsina.com.ar/galleries/random/monospace-3.png + :height: 400px + + Monospaced allright. + +If you compare it to `the original `_, however, you will see that the layout of +the posts themselves is different, and that was not described in ``base.tmpl`` at all. But if you look, you'll see that +there is a placeholder called content: ``<%block name="content">`` + +That's because ``base.tmpl`` defines the *base* layout. The layout of more specific pages, like "the page that shows +a lis of posts" is defined in the other templates. Specifically, this is defined in ``index.tmpl``: + +.. code-block:: mako + + ## -*- coding: utf-8 -*- + <%namespace name="helper" file="index_helper.tmpl"/> + <%inherit file="base.tmpl"/> + <%block name="content"> + % for post in posts: +
+

${post.title(lang)} +    + ${messages[lang]["Posted"]}: ${post.date.strftime(date_format)} + +

+
+ ${post.text(lang, index_teasers)} + ${helper.html_disqus_link(post)} +
+ % endfor + ${helper.html_pager()} + ${helper.html_disqus_script()} + + +So, let's tweak that to be closer to the original. We put the post's metadata in a +box, add links for the posts tags, move the date there, etc. + +.. code-block:: mako + + ## -*- coding: utf-8 -*- + <%namespace name="helper" file="index_helper.tmpl"/> + <%inherit file="base.tmpl"/> + <%block name="content"> + % for post in posts: +
+

${post.title(lang)}

+
+ + ${messages[lang]["Posted"]}: ${post.date.strftime(date_format)} + +
+ Tags:  + %if post.tags: + %for tag in post.tags: + ${tag} + %endfor + %endif + +
+ ${post.text(lang, index_teasers)} + ${helper.html_disqus_link(post)} +
+ % endfor + ${helper.html_pager()} + +.. figure:: http://ralsina.com.ar/galleries/random/monospace-4.png + :height: 400px + + Close enough! + +Then if we click on the post title, we will see some broken details in the metadata that can be fixed in ``post.tmpl``, and so on. + +.. code-block:: mako + + ## -*- coding: utf-8 -*- + <%namespace name="helper" file="post_helper.tmpl"/> + <%inherit file="base.tmpl"/> + <%block name="content"> +
+ ${helper.html_title()} +
+ + ${messages[lang]["Posted"]}: ${post.date.strftime(date_format)} [${messages[lang]["Source"]}] + +
+ %if post.tags: + ${messages[lang]["Tags"]}:  + %for tag in post.tags: + ${tag} + %endfor + +
+ %endif + + ${helper.html_translations(post)} + +
+ ${post.text(lang)} + ${helper.html_pager(post)} + ${helper.html_disqus(post)} +
+ + +.. figure:: http://ralsina.com.ar/galleries/random/monospace-5.png + :height: 400px + + Details, details. + +The demo site exercises most of the features in Nikola, so if you make it look good, your site probably will look good too. +This monospace theme is included with nikola, if you want to use it or play with it. + diff --git a/docs/extending.txt b/docs/extending.txt index 4bbc2ea..6410e69 100644 --- a/docs/extending.txt +++ b/docs/extending.txt @@ -52,7 +52,7 @@ Each and every one of those is a plugin. Let's look at a typical example: First, the ``command_serve.plugin`` file: -.. code_block:: init +.. code-block:: init [Core] Name = serve @@ -68,7 +68,7 @@ For your own plugin, just change the values in a sensible way. The ``Module`` will be used to find the matching python module, in this case ``command_serve.py``, from which this is the interesting bit: -.. code_block:: python +.. code-block:: python from nikola.plugin_categories import Command @@ -144,7 +144,7 @@ Nikola supports Mako and Jinja2. If you prefer some other templating system, then you will have to write a TemplateSystem plugin. Here's how they work. First, you have to create a .plugin file. Here's the one for the Mako plugin: -.. code_block:: ini +.. code-block:: ini [Core] Name = mako @@ -162,7 +162,7 @@ in the obvious ways. The "Module" option is the name of the module, which has to look something like this, a stub for a hypothetical system called "Templater": -.. code_block:: python +.. code-block:: python from nikola.plugin_categories import TemplateSystem @@ -240,7 +240,7 @@ document, so I'll just leave you with an example, the ``copy_assets`` task. First the ``task_copy_assets.plugin`` file, which you should copy and edit in the logical ways: -.. code_block:: ini +.. code-block:: ini [Core] Name = copy_assets @@ -254,7 +254,7 @@ in the logical ways: And the ``task_copy_assets.py`` file, in its entirety: -.. code_block:: python +.. code-block:: python import os diff --git a/docs/manual.txt b/docs/manual.txt index 202afc1..ac15d8b 100644 --- a/docs/manual.txt +++ b/docs/manual.txt @@ -1,7 +1,7 @@ The Nikola Handbook =================== -:Version: 5 +:Version: 5.1 :Author: Roberto Alsina .. class:: alert alert-info pull-right @@ -169,6 +169,8 @@ If you want to create a blog or a site, Nikola provides: `Markdown `_) * Easy-to-create image galleries * Support for displaying source code +* Image slideshows +* Client-side cloud tags Also: @@ -194,13 +196,13 @@ Longer version: #. ``pip install -r requirements.txt`` or... #. Install your distribution's packages for all the things mentioned below, if they exist, or... - #. Get all of these manually: + #. Get all of these manually (but why?, use requirements.txt): #. Get python, if you don't have it. #. Get `doit `_ #. Get `docutils `_ #. Get `Mako `_ - #. Get `PIL `_ + #. Get `PIL `_ (or Pillow) #. Get `Pygments `_ #. Get `unidecode `_ #. Get `lxml `_ @@ -212,10 +214,7 @@ Longer version: After that, run ``nikola init sitename`` and that will create a folder called ``sitename`` containing a functional demo site. -.. note:: Are you using Ubuntu? - - Then you can try using `my PPA `_ - and installing python-nikola +Nikola is packaged for some Linux distributions, you may get that instead. Getting Started --------------- @@ -786,7 +785,7 @@ embed code like this:: print "Hello World!" -Or you can include the code from a file: +Or you can include the code from a file:: .. code-block:: python :include: /foo/bar/baz.py @@ -797,10 +796,10 @@ listing To use this, you have to put your source code files inside ``listings`` or whatever your ``LISTINGS_FOLDER`` variable is set to. Assuming you have a ``foo.py`` inside that folder:: - .. listing:: foo.py + .. listing:: foo.py python -Will include the source code from ``foo.py`` and also create a ``listings/foo.py.html`` page -and the listing will have a title linking to it. +Will include the source code from ``foo.py``, highlight its syntax in python mode, +and also create a ``listings/foo.py.html`` page and the listing will have a title linking to it. Advanced Code Options ~~~~~~~~~~~~~~~~~~~~~ @@ -822,10 +821,72 @@ linenos_offset tab-width Size of the tabs (default 4) +Slideshows +~~~~~~~~~~ + +To create an image slideshow, you can use the ``slides`` directive. For example:: + + .. slides:: + :preload: + :play: 350 + + /galleries/demo/tesla_conducts_lg.jpg + /galleries/demo/tesla_lightning2_lg.jpg + /galleries/demo/tesla4_lg.jpg + /galleries/demo/tesla_lightning1_lg.jpg + /galleries/demo/tesla_tower1_lg.jpg + +This is based on `slidejs `_ and it supports +`the options described there `_ with one minor tweak to make them +fit in docutils convention: If the option takes a boolean value, you just have to add it or not. For example, +to enable preloading, just use the ``:preload:`` option. + +If the option takes any other kind of argument, just use it after the option, like ``play`` in the +above example. + +Importing Your Wordpress Site Into Nikola +----------------------------------------- + +If you like Nikola, and want to start using it, but you have a Wordpress blog, Nikola +supports importing it. Here's the steps to do it: + +1) Get a XML dump of your site [#]_ +2) nikola import_wordpress mysite.wordpress.2012-12-20.xml + +After some time, this will crate a ``new_site`` folder with all your data. It currently supports +the following: + +* All your posts and pages +* Keeps "draft" status +* Your tags and categories +* Imports your attachments and fixes links to point to the right places +* Will try to add redirects that send the old post URLs to the new ones +* Will give you a url_map so you know where each old post was + + This is also useful for Disqus thread migration! + +* Will try to convert the content of your posts. This is *not* error free, because + wordpress uses some unholy mix of HTML and strange things. Currently we are treating it + as markdown, which does a reasonabe job of it. + + You will find your old posts in ``new_site/posts/post-title.wp`` in case you need to fix + any of them. + +This feature is a work in progress, and the only way to improve it is to have it used for +as many sites as possible and make it work better each time, so I am happy to get requests +about it. + +.. [#] The dump needs to be in 1.2 format. You can check by reading it, it should say + ``xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"`` near the top of the + file. If it says ``1.1`` instead of ``1.2`` you will have to update your + wordpress before dumping. + + Other versions may or may not work. + License ------- -Nikola is released under the `GPL version 3 `_ which +Nikola is released under a `MIT license `_ which is a free software license. Some components shipped along with Nikola, or required by it are released under other licenses. diff --git a/docs/theming.txt b/docs/theming.txt index 93c7824..33884e9 100644 --- a/docs/theming.txt +++ b/docs/theming.txt @@ -8,6 +8,9 @@ Theming Nikola .. contents:: +This document is a reference about themes. If you want a tutorial, please read +`Creating a Theme `_ + The Structure ------------- @@ -69,20 +72,15 @@ bundles Templates should use either the bundle or the individual files based on the ``use_bundles`` variable, which in turn is set by the ``USE_BUNDLES`` option. -Creating a New Theme --------------------- - -In your site's folder, create a ``themes`` folder. Choose a theme to start from, and -create ``themes/yourthemename/parent`` as a file containing the parent theme's name. -There, you just created a new theme. Of course it looks exactly like the other one, -so let's customize it. - Templates --------- In templates there is a number of files whose name ends in ``.tmpl``. Those are the theme's page templates. They are done usig the `Mako `_ -template language. If you want to do a theme, you should learn the Mako syntax first. +or `Jinja2 `_ template languages. If you want to do a theme, you +should learn one first. What engine is used by the theme is declared in the ``engine`` file. + +The rest of this document explains Mako templates, but Jinja2 is fairly similar. Mako has a nifty concept of template inheritance. That means that, a template can inherit from another and only change small bits of the output. For example, @@ -183,6 +181,13 @@ list.tmpl * ``items``: a list of (text, link) elements. + +list_post.tmpl + Template used to display generic lists of links. Can use everything ``base.tmpl`` uses, plus: + + * ``posts``: a list of Post objects. + + You can add other templates for specific pages, which the user can the use in his ``post_pages`` option in ``dodo.py``. Also, keep in mind that your theme is yours, there is no reason why you would need to maintain the inheritance as it is, or not require whatever data you want. diff --git a/nikola/__init__.py b/nikola/__init__.py index 3b6ad2a..94031c9 100644 --- a/nikola/__init__.py +++ b/nikola/__init__.py @@ -1 +1,5 @@ -from nikola import Nikola # NOQA +from __future__ import absolute_import + +from .nikola import Nikola # NOQA +from . import plugins + diff --git a/nikola/conf.py.in b/nikola/conf.py.in new file mode 100755 index 0000000..897a941 --- /dev/null +++ b/nikola/conf.py.in @@ -0,0 +1,283 @@ +# -*- coding: utf-8 -*- +<%text> +# -*- coding: utf-8 -*- +from __future__ import unicode_literals +import os +import time + +######################################## +# Configuration, please edit +######################################## + + +# Data about this site +BLOG_AUTHOR = "${BLOG_AUTHOR}" +BLOG_TITLE = "${BLOG_TITLE}" +BLOG_URL = "${BLOG_URL}" +BLOG_EMAIL = "${BLOG_EMAIL}" +BLOG_DESCRIPTION = "${BLOG_DESCRIPTION}" + + +# post_pages contains (wildcard, destination, template, use_in_feed) tuples. +# +# The wildcard is used to generate a list of reSt source files +# (whatever/thing.txt). +# That fragment must have an associated metadata file (whatever/thing.meta), +# and opcionally translated files (example for spanish, with code "es"): +# whatever/thing.txt.es and whatever/thing.meta.es +# +# From those files, a set of HTML fragment files will be generated: +# cache/whatever/thing.html (and maybe cache/whatever/thing.html.es) +# +# These files are combinated with the template to produce rendered +# pages, which will be placed at +# output / TRANSLATIONS[lang] / destination / pagename.html +# +# where "pagename" is specified in the metadata file. +# +# if use_in_feed is True, then those posts will be added to the site's +# rss feeds. +# + +post_pages = ${POST_PAGES} + +# One or more folders containing files to be copied as-is into the output. +# The format is a dictionary of "source" "relative destination". +# Default is: +# FILES_FOLDERS = {'files': '' } +# Which means copy 'files' into 'output' + +# A mapping of languages to file-extensions that represent that language. +# Feel free to add or delete extensions to any list, but don't add any new +# compilers unless you write the interface for it yourself. +# +# 'rest' is reStructuredText +# 'markdown' is MarkDown +# 'html' assumes the file is html and just copies it +post_compilers = ${POST_COMPILERS} + +# Nikola is multilingual! +# +# Currently supported languages are: +# English -> en +# Greek -> gr +# German -> de +# French -> fr +# Russian -> ru +# Spanish -> es +# Italian -> it +# +# If you want to use Nikola with a non-supported language you have to provide +# a module containing the necessary translations +# (p.e. look at the modules at: ./nikola/data/themes/default/messages/fr.py). +# If a specific post is not translated to a language, then the version +# in the default language will be shown instead. + +# What is the default language? +DEFAULT_LANG = "${DEFAULT_LANG}" + +# What other languages do you have? +# The format is {"translationcode" : "path/to/translation" } +# the path will be used as a prefix for the generated pages location +TRANSLATIONS = { + "${DEFAULT_LANG}": "", + #"gr": "./gr", + #"de": "./de", + #"fr": "./fr", + #"ru": "./ru", + #"es": "./es", + } + +# Paths for different autogenerated bits. These are combined with the +# translation paths. + +# Final locations are: +# output / TRANSLATION[lang] / TAG_PATH / index.html (list of tags) +# output / TRANSLATION[lang] / TAG_PATH / tag.html (list of posts for a tag) +# output / TRANSLATION[lang] / TAG_PATH / tag.xml (RSS feed for a tag) +TAG_PATH = "categories" + +# If TAG_PAGES_ARE_INDEXES is set to True, each tag's page will contain +# the posts themselves. If set to False, it will be just a list of links. +TAG_PAGES_ARE_INDEXES = True + +# Final location is output / TRANSLATION[lang] / INDEX_PATH / index-*.html +INDEX_PATH = "" +# Final locations for the archives are: +# output / TRANSLATION[lang] / ARCHIVE_PATH / ARCHIVE_FILENAME +# output / TRANSLATION[lang] / ARCHIVE_PATH / YEAR / index.html +ARCHIVE_PATH = "" +ARCHIVE_FILENAME = "archive.html" +# Final locations are: +# output / TRANSLATION[lang] / RSS_PATH / rss.xml +RSS_PATH = "" + +# Slug the Tag URL easier for users to type, special characters are +# often removed or replaced as well. +SLUG_TAG_PATH = True + +# A list of redirection tuples, [("foo/from.html", "/bar/to.html")]. +# +# A HTML file will be created in output/foo/from.html that redirects +# to the "/bar/to.html" URL. notice that the "from" side MUST be a +# relative URL. +# +# If you don't need any of these, just set to [] + +REDIRECTIONS = ${REDIRECTIONS} + +# Commands to execute to deploy. Can be anything, for example, +# you may use rsync: +# "rsync -rav output/* joe@my.site:/srv/www/site" +# And then do a backup, or ping pingomatic. +# To do manual deployment, set it to [] +DEPLOY_COMMANDS = [] + +# Where the output site should be located +# If you don't use an absolute path, it will be considered as relative +# to the location of conf.py + +OUTPUT_FOLDER = 'output' + +# where the "cache" of partial generated content should be located +# default: 'cache' +CACHE_FOLDER = 'cache' + +# Filters to apply to the output. +# A directory where the keys are either: a file extensions, or +# a tuple of file extensions. +# +# And the value is a list of commands to be applied in order. +# +# Each command must be either: +# +# A string containing a '%s' which will +# be replaced with a filename. The command *must* produce output +# in place. +# +# Or: +# +# A python callable, which will be called with the filename as +# argument. +# +# By default, there are no filters. +FILTERS = { +# ".jpg": ["jpegoptim --strip-all -m75 -v %s"], +} + +# ############################################################################# +# Image Gallery Options +# ############################################################################# + +# Galleries are folders in galleries/ +# Final location of galleries will be output / GALLERY_PATH / gallery_name +GALLERY_PATH = "galleries" +THUMBNAIL_SIZE = 180 +MAX_IMAGE_SIZE = 1280 +USE_FILENAME_AS_TITLE = True + +# ############################################################################# +# HTML fragments and diverse things that are used by the templates +# ############################################################################# + +# Data about post-per-page indexes +INDEXES_TITLE = "" # If this is empty, the default is BLOG_TITLE +INDEXES_PAGES = "" # If this is empty, the default is 'old posts page %d' translated + +# Name of the theme to use. Themes are located in themes/theme_name +THEME = 'site' + +# date format used to display post dates. (str used by datetime.datetime.strftime) +DATE_FORMAT = '%Y-%m-%d %H:%M' + +# Show only teasers in the index pages? Defaults to False. +# INDEX_TEASERS = False + +# A HTML fragment describing the license, for the sidebar. +# I recomment using the Creative Commons' wizard: +# http://creativecommons.org/choose/ +LICENSE = """ + +Creative Commons License BY-NC-SA""" + +# A small copyright notice for the page footer (in HTML) +CONTENT_FOOTER = 'Contents © {date} {author} - Powered by Nikola' +CONTENT_FOOTER = CONTENT_FOOTER.format(email=BLOG_EMAIL, + author=BLOG_AUTHOR, + date=time.gmtime().tm_year) + +# To enable comments via Disqus, you need to create a forum at +# http://disqus.com, and set DISQUS_FORUM to the short name you selected. +# If you want to disable comments, set it to False. +DISQUS_FORUM = "nikolademo" + +# Enable Addthis social buttons? +# Defaults to true +# ADD_THIS_BUTTONS = True + +# Modify the number of Post per Index Page +# Defaults to 10 +# INDEX_DISPLAY_POST_COUNT = 10 + +# RSS_LINK is a HTML fragment to link the RSS or Atom feeds. If set to None, +# the base.tmpl will use the feed Nikola generates. However, you may want to +# change it for a feedburner feed or something else. +RSS_LINK = None + +# A search form to search this site, for the sidebar. You can use a google +# custom search (http://www.google.com/cse/) +# Or a duckduckgo search: https://duckduckgo.com/search_box.html +# This example should work for pretty much any site we generate. +SEARCH_FORM = "" +# This search form is better for the "site" theme where it +# appears on the navigation bar +#SEARCH_FORM = """ +# +# +# +#""" % BLOG_URL + +# Google analytics or whatever else you use. Added to the bottom of +# in the default template (base.tmpl). +ANALYTICS = """ + """ + +# Put in global_context things you want available on all your templates. +# It can be anything, data, functions, modules, etc. +GLOBAL_CONTEXT = { + 'analytics': ANALYTICS, + 'blog_author': BLOG_AUTHOR, + 'blog_title': BLOG_TITLE, + 'blog_url': BLOG_URL, + 'blog_desc': BLOG_DESCRIPTION, + 'date_format': DATE_FORMAT, + 'translations': TRANSLATIONS, + 'license': LICENSE, + 'search_form': SEARCH_FORM, + 'disqus_forum': DISQUS_FORUM, + 'content_footer': CONTENT_FOOTER, + 'rss_path': RSS_PATH, + 'rss_link': RSS_LINK, + # Locale-dependent links for the sidebar + # You should provide a key-value pair for each used language. + 'sidebar_links': { + DEFAULT_LANG: ( + ('/' + os.path.join(ARCHIVE_PATH, ARCHIVE_FILENAME), 'Archives'), + ('/categories/index.html', 'Tags'), + ('/stories/about-nikola.html', 'About Nikola'), + ('/stories/handbook.html', 'The Nikola Handbook'), + ('http://nikola.ralsina.com.ar', 'Powered by Nikola!'), + ), + } + } diff --git a/nikola/console.py b/nikola/console.py new file mode 100644 index 0000000..939b611 --- /dev/null +++ b/nikola/console.py @@ -0,0 +1,7 @@ +from __future__ import print_function, unicode_literals + +from nikola import Nikola +import conf +SITE = Nikola(**conf.__dict__) +SITE.scan_posts() +print("You can now access your configuration as conf and your site engine as SITE") diff --git a/nikola/data/samplesite/README.txt b/nikola/data/samplesite/README.txt index ca94b34..a1220d0 100644 --- a/nikola/data/samplesite/README.txt +++ b/nikola/data/samplesite/README.txt @@ -1,31 +1,20 @@ -How To make This Work ---------------------- +This folder contains the source used to generate a static site by nikola. -The full manual is in stories/manual.txt, but here is the very short version: +Installation and documentation at http://nikola.ralsina.com.ar -1. Install docutils (http://docutils.sourceforge.net) -2. Install Mako (http://makotemplates.org) -3. Install doit (http://python-doit.sourceforge.net) -4. Install PIL (http://www.pythonware.com/products/pil/) -5. Install Pygments (http://pygments.org/) -6. Install unidecode (http://pypi.python.org/pypi/Unidecode/) -7. Install lxml (http://lxml.de/) +Configuration file for the site is `conf.py`. -To build or update the demo site run this command in the nikola's folder:: +To build the site:: - doit + nikola build To see it:: - doit serve -p 8000 + nikola serve And point your browser to http://localhost:8000 -Notes on Requirements ---------------------- -If you don't have PIL, then image galleries will be inefficient because Nikola -will not generate thumbnails. Alternatively, you may install pillow instead of -PIL. +To check all available commands:: -If you don't have pygments, the code-block directive will not highlight syntax. + nikola help diff --git a/nikola/data/samplesite/conf.py b/nikola/data/samplesite/conf.py deleted file mode 100755 index 552eb68..0000000 --- a/nikola/data/samplesite/conf.py +++ /dev/null @@ -1,274 +0,0 @@ -# -*- coding: utf-8 -*- - -import os - -######################################## -# Configuration, please edit -######################################## - -# Data about this site -BLOG_AUTHOR = "Your Name" -BLOG_TITLE = "Demo Site" -BLOG_URL = "http://nikola.ralsina.com.ar" -BLOG_EMAIL = "joe@demo.site" -BLOG_DESCRIPTION = "This is a demo site for Nikola." - -# post_pages contains (wildcard, destination, template, use_in_feed) tuples. -# -# The wildcard is used to generate a list of reSt source files -# (whatever/thing.txt). -# That fragment must have an associated metadata file (whatever/thing.meta), -# and opcionally translated files (example for spanish, with code "es"): -# whatever/thing.txt.es and whatever/thing.meta.es -# -# From those files, a set of HTML fragment files will be generated: -# cache/whatever/thing.html (and maybe cache/whatever/thing.html.es) -# -# These files are combinated with the template to produce rendered -# pages, which will be placed at -# output / TRANSLATIONS[lang] / destination / pagename.html -# -# where "pagename" is specified in the metadata file. -# -# if use_in_feed is True, then those posts will be added to the site's -# rss feeds. -# - -post_pages = ( - ("posts/*.txt", "posts", "post.tmpl", True), - ("stories/*.txt", "stories", "story.tmpl", False), -) - -# One or more folders containing files to be copied as-is into the output. -# The format is a dictionary of "source" "relative destination". -# Default is: -# FILES_FOLDERS = {'files': '' } -# Which means copy 'files' into 'output' - -# A mapping of languages to file-extensions that represent that language. -# Feel free to add or delete extensions to any list, but don't add any new -# compilers unless you write the interface for it yourself. -# -# 'rest' is reStructuredText -# 'markdown' is MarkDown -# 'html' assumes the file is html and just copies it -post_compilers = { - "rest": ('.txt', '.rst'), - "markdown": ('.md', '.mdown', '.markdown'), - "html": ('.html', '.htm') - } - -# Nikola is multilingual! -# -# Currently supported languages are: -# English -> en -# Greek -> gr -# German -> de -# French -> fr -# Russian -> ru -# Spanish -> es -# Italian -> it -# -# If you want to use Nikola with a non-supported language you have to provide -# a module containing the necessary translations -# (p.e. look at the modules at: ./nikola/data/themes/default/messages/fr.py). -# If a specific post is not translated to a language, then the version -# in the default language will be shown instead. - -# What is the default language? -DEFAULT_LANG = "en" - -# What other languages do you have? -# The format is {"translationcode" : "path/to/translation" } -# the path will be used as a prefix for the generated pages location -TRANSLATIONS = { - DEFAULT_LANG: "", - #"gr": "./gr", - #"de": "./de", - #"fr": "./fr", - #"ru": "./ru", - #"es": "./es", - } - -# Paths for different autogenerated bits. These are combined with the -# translation paths. - -# Final locations are: -# output / TRANSLATION[lang] / TAG_PATH / index.html (list of tags) -# output / TRANSLATION[lang] / TAG_PATH / tag.html (list of posts for a tag) -# output / TRANSLATION[lang] / TAG_PATH / tag.xml (RSS feed for a tag) -TAG_PATH = "categories" - -# If TAG_PAGES_ARE_INDEXES is set to True, each tag's page will contain -# the posts themselves. If set to False, it will be just a list of links. -TAG_PAGES_ARE_INDEXES = True - -# Final location is output / TRANSLATION[lang] / INDEX_PATH / index-*.html -INDEX_PATH = "" -# Final locations for the archives are: -# output / TRANSLATION[lang] / ARCHIVE_PATH / ARCHIVE_FILENAME -# output / TRANSLATION[lang] / ARCHIVE_PATH / YEAR / index.html -ARCHIVE_PATH = "" -ARCHIVE_FILENAME = "archive.html" -# Final locations are: -# output / TRANSLATION[lang] / RSS_PATH / rss.xml -RSS_PATH = "" - -# Slug the Tag URL easier for users to type, special characters are -# often removed or replaced as well. -SLUG_TAG_PATH = True - -# A list of redirection tuples, [("foo/from.html", "/bar/to.html")]. -# -# A HTML file will be created in output/foo/from.html that redirects -# to the "/bar/to.html" URL. notice that the "from" side MUST be a -# relative URL. -# -# If you don't need any of these, just set to [] - -REDIRECTIONS = [] - -# Commands to execute to deploy. Can be anything, for example, -# you may use rsync: -# "rsync -rav output/* joe@my.site:/srv/www/site" -# And then do a backup, or ping pingomatic. -# To do manual deployment, set it to [] -DEPLOY_COMMANDS = [] - -# Where the output site should be located -# If you don't use an absolute path, it will be considered as relative -# to the location of conf.py - -OUTPUT_FOLDER = 'output' - -# Filters to apply to the output. -# A directory where the keys are either: a file extensions, or -# a tuple of file extensions. -# -# And the value is a list of commands to be applied in order. -# -# Each command must be either: -# -# A string containing a '%s' which will -# be replaced with a filename. The command *must* produce output -# in place. -# -# Or: -# -# A python callable, which will be called with the filename as -# argument. -# -# By default, there are no filters. -FILTERS = { -# ".jpg": ["jpegoptim --strip-all -m75 -v %s"], -} - -############################################################################## -# Image Gallery Options -############################################################################## - -# Galleries are folders in galleries/ -# Final location of galleries will be output / GALLERY_PATH / gallery_name -GALLERY_PATH = "galleries" -THUMBNAIL_SIZE = 180 -MAX_IMAGE_SIZE = 1280 -USE_FILENAME_AS_TITLE = True - -############################################################################## -# HTML fragments and diverse things that are used by the templates -############################################################################## - -# Data about post-per-page indexes -INDEXES_TITLE = "" # If this is empty, the default is BLOG_TITLE -INDEXES_PAGES = "" # If this is empty, the default is 'old posts page %d' translated - -# Name of the theme to use. Themes are located in themes/theme_name -THEME = 'site' - -# Show only teasers in the index pages? Defaults to False. -# INDEX_TEASERS = False - -# A HTML fragment describing the license, for the sidebar. -# I recomment using the Creative Commons' wizard: -# http://creativecommons.org/choose/ -LICENSE = """ - -Creative Commons License BY-NC-SA""" - -# A small copyright notice for the page footer (in HTML) -CONTENT_FOOTER = u'Contents © 2012 Example Joe' - -# To enable comments via Disqus, you need to create a forum at -# http://disqus.com, and set DISQUS_FORUM to the short name you selected. -# If you want to disable comments, set it to False. -DISQUS_FORUM = "nikolademo" - -# Enable Addthis social buttons? -# Defaults to true -# ADD_THIS_BUTTONS = True - -# Modify the number of Post per Index Page -# Defaults to 10 -# INDEX_DISPLAY_POST_COUNT = 10 - -# RSS_LINK is a HTML fragment to link the RSS or Atom feeds. If set to None, -# the base.tmpl will use the feed Nikola generates. However, you may want to -# change it for a feedburner feed or something else. -RSS_LINK = None - -# A search form to search this site, for the sidebar. You can use a google -# custom search (http://www.google.com/cse/) -# Or a duckduckgo search: https://duckduckgo.com/search_box.html -# This example should work for pretty much any site we generate. -SEARCH_FORM = "" -# This search form is better for the "site" theme where it -# appears on the navigation bar -#SEARCH_FORM = """ -# -# -# -#""" % BLOG_URL - -# Google analytics or whatever else you use. Added to the bottom of -# in the default template (base.tmpl). -ANALYTICS = """ - """ - -# Put in global_context things you want available on all your templates. -# It can be anything, data, functions, modules, etc. -GLOBAL_CONTEXT = { - 'analytics': ANALYTICS, - 'blog_author': BLOG_AUTHOR, - 'blog_title': BLOG_TITLE, - 'blog_url': BLOG_URL, - 'blog_desc': BLOG_DESCRIPTION, - 'translations': TRANSLATIONS, - 'license': LICENSE, - 'search_form': SEARCH_FORM, - 'disqus_forum': DISQUS_FORUM, - 'content_footer': CONTENT_FOOTER, - 'rss_path': RSS_PATH, - 'rss_link': RSS_LINK, - # Locale-dependent links for the sidebar - # You should provide a key-value pair for each used language. - 'sidebar_links': { - DEFAULT_LANG: ( - ('/' + os.path.join(ARCHIVE_PATH, ARCHIVE_FILENAME), 'Archives'), - ('/categories/index.html', 'Tags'), - ('/stories/about-nikola.html', 'About Nikola'), - ('/stories/handbook.html', 'The Nikola Handbook'), - ('http://nikola.ralsina.com.ar', 'Powered by Nikola!'), - ), - } - } diff --git a/nikola/data/samplesite/conf.py.in b/nikola/data/samplesite/conf.py.in deleted file mode 100755 index 8794565..0000000 --- a/nikola/data/samplesite/conf.py.in +++ /dev/null @@ -1,268 +0,0 @@ -# -*- coding: utf-8 -*- - -import os - -######################################## -# Configuration, please edit -######################################## - -# Data about this site -BLOG_AUTHOR = "${BLOG_AUTHOR}" -BLOG_TITLE = "${BLOG_TITLE}" -BLOG_URL = "${BLOG_URL}" -BLOG_EMAIL = "${BLOG_EMAIL}" -BLOG_DESCRIPTION = "${BLOG_DESCRIPTION}" - - -# post_pages contains (wildcard, destination, template, use_in_feed) tuples. -# -# The wildcard is used to generate a list of reSt source files -# (whatever/thing.txt). -# That fragment must have an associated metadata file (whatever/thing.meta), -# and opcionally translated files (example for spanish, with code "es"): -# whatever/thing.txt.es and whatever/thing.meta.es -# -# From those files, a set of HTML fragment files will be generated: -# cache/whatever/thing.html (and maybe cache/whatever/thing.html.es) -# -# These files are combinated with the template to produce rendered -# pages, which will be placed at -# output / TRANSLATIONS[lang] / destination / pagename.html -# -# where "pagename" is specified in the metadata file. -# -# if use_in_feed is True, then those posts will be added to the site's -# rss feeds. -# - -post_pages = ${POST_PAGES} - -# One or more folders containing files to be copied as-is into the output. -# The format is a dictionary of "source" "relative destination". -# Default is: -# FILES_FOLDERS = {'files': '' } -# Which means copy 'files' into 'output' - -# A mapping of languages to file-extensions that represent that language. -# Feel free to add or delete extensions to any list, but don't add any new -# compilers unless you write the interface for it yourself. -# -# 'rest' is reStructuredTextq -# 'markdown' is MarkDown -# 'html' assumes the file is html and just copies it -post_compilers = ${POST_COMPILERS} - -# Nikola is multilingual! -# -# Currently supported languages are: -# English -> en -# Greek -> gr -# German -> de -# French -> fr -# Russian -> ru -# Spanish -> es -# Italian -> it -# -# If you want to use Nikola with a non-supported language you have to provide -# a module containing the necessary translations -# (p.e. look at the modules at: ./nikola/data/themes/default/messages/fr.py). -# If a specific post is not translated to a language, then the version -# in the default language will be shown instead. - -# What is the default language? -DEFAULT_LANG = "${DEFAULT_LANG}" - -# What other languages do you have? -# The format is {"translationcode" : "path/to/translation" } -# the path will be used as a prefix for the generated pages location -TRANSLATIONS = { - "${DEFAULT_LANG}": "", - #"gr": "./gr", - #"de": "./de", - #"fr": "./fr", - #"ru": "./ru", - #"es": "./es", - } - -# Paths for different autogenerated bits. These are combined with the -# translation paths. - -# Final locations are: -# output / TRANSLATION[lang] / TAG_PATH / index.html (list of tags) -# output / TRANSLATION[lang] / TAG_PATH / tag.html (list of posts for a tag) -# output / TRANSLATION[lang] / TAG_PATH / tag.xml (RSS feed for a tag) -TAG_PATH = "categories" - -# If TAG_PAGES_ARE_INDEXES is set to True, each tag's page will contain -# the posts themselves. If set to False, it will be just a list of links. -TAG_PAGES_ARE_INDEXES = True - -# Final location is output / TRANSLATION[lang] / INDEX_PATH / index-*.html -INDEX_PATH = "" -# Final locations for the archives are: -# output / TRANSLATION[lang] / ARCHIVE_PATH / ARCHIVE_FILENAME -# output / TRANSLATION[lang] / ARCHIVE_PATH / YEAR / index.html -ARCHIVE_PATH = "" -ARCHIVE_FILENAME = "archive.html" -# Final locations are: -# output / TRANSLATION[lang] / RSS_PATH / rss.xml -RSS_PATH = "" - -# Slug the Tag URL easier for users to type, special characters are -# often removed or replaced as well. -SLUG_TAG_PATH = True - -# A list of redirection tuples, [("foo/from.html", "/bar/to.html")]. -# -# A HTML file will be created in output/foo/from.html that redirects -# to the "/bar/to.html" URL. notice that the "from" side MUST be a -# relative URL. -# -# If you don't need any of these, just set to [] - -REDIRECTIONS = [] - -# Commands to execute to deploy. Can be anything, for example, -# you may use rsync: -# "rsync -rav output/* joe@my.site:/srv/www/site" -# And then do a backup, or ping pingomatic. -# To do manual deployment, set it to [] -DEPLOY_COMMANDS = [] - -# Where the output site should be located -# If you don't use an absolute path, it will be considered as relative -# to the location of conf.py - -OUTPUT_FOLDER = 'output' - -# Filters to apply to the output. -# A directory where the keys are either: a file extensions, or -# a tuple of file extensions. -# -# And the value is a list of commands to be applied in order. -# -# Each command must be either: -# -# A string containing a '%s' which will -# be replaced with a filename. The command *must* produce output -# in place. -# -# Or: -# -# A python callable, which will be called with the filename as -# argument. -# -# By default, there are no filters. -FILTERS = { -# ".jpg": ["jpegoptim --strip-all -m75 -v %s"], -} - -############################################################################## -# Image Gallery Options -############################################################################## - -# Galleries are folders in galleries/ -# Final location of galleries will be output / GALLERY_PATH / gallery_name -GALLERY_PATH = "galleries" -THUMBNAIL_SIZE = 180 -MAX_IMAGE_SIZE = 1280 -USE_FILENAME_AS_TITLE = True - -############################################################################## -# HTML fragments and diverse things that are used by the templates -############################################################################## - -# Data about post-per-page indexes -INDEXES_TITLE = "" # If this is empty, the default is BLOG_TITLE -INDEXES_PAGES = "" # If this is empty, the default is 'old posts page %d' translated - -# Name of the theme to use. Themes are located in themes/theme_name -THEME = 'site' - -# Show only teasers in the index pages? Defaults to False. -# INDEX_TEASERS = False - -# A HTML fragment describing the license, for the sidebar. -# I recomment using the Creative Commons' wizard: -# http://creativecommons.org/choose/ -LICENSE = """ - -Creative Commons License BY-NC-SA""" - -# A small copyright notice for the page footer (in HTML) -CONTENT_FOOTER = u'Contents © 2012 ${BLOG_AUTHOR}' - -# To enable comments via Disqus, you need to create a forum at -# http://disqus.com, and set DISQUS_FORUM to the short name you selected. -# If you want to disable comments, set it to False. -DISQUS_FORUM = "nikolademo" - -# Enable Addthis social buttons? -# Defaults to true -# ADD_THIS_BUTTONS = True - -# Modify the number of Post per Index Page -# Defaults to 10 -# INDEX_DISPLAY_POST_COUNT = 10 - -# RSS_LINK is a HTML fragment to link the RSS or Atom feeds. If set to None, -# the base.tmpl will use the feed Nikola generates. However, you may want to -# change it for a feedburner feed or something else. -RSS_LINK = None - -# A search form to search this site, for the sidebar. You can use a google -# custom search (http://www.google.com/cse/) -# Or a duckduckgo search: https://duckduckgo.com/search_box.html -# This example should work for pretty much any site we generate. -SEARCH_FORM = "" -# This search form is better for the "site" theme where it -# appears on the navigation bar -#SEARCH_FORM = """ -# -# -# -#""" % BLOG_URL - -# Google analytics or whatever else you use. Added to the bottom of -# in the default template (base.tmpl). -ANALYTICS = """ - """ - -# Put in global_context things you want available on all your templates. -# It can be anything, data, functions, modules, etc. -GLOBAL_CONTEXT = { - 'analytics': ANALYTICS, - 'blog_author': BLOG_AUTHOR, - 'blog_title': BLOG_TITLE, - 'blog_url': BLOG_URL, - 'blog_desc': BLOG_DESCRIPTION, - 'translations': TRANSLATIONS, - 'license': LICENSE, - 'search_form': SEARCH_FORM, - 'disqus_forum': DISQUS_FORUM, - 'content_footer': CONTENT_FOOTER, - 'rss_path': RSS_PATH, - 'rss_link': RSS_LINK, - # Locale-dependent links for the sidebar - # You should provide a key-value pair for each used language. - 'sidebar_links': { - DEFAULT_LANG: ( - ('/' + os.path.join(ARCHIVE_PATH, ARCHIVE_FILENAME), 'Archives'), - ('/categories/index.html', 'Tags'), - ('/stories/about-nikola.html', 'About Nikola'), - ('/stories/handbook.html', 'The Nikola Handbook'), - ('http://nikola.ralsina.com.ar', 'Powered by Nikola!'), - ), - } - } diff --git a/nikola/data/samplesite/posts/1.txt b/nikola/data/samplesite/posts/1.txt index 4e583db..5741e05 100644 --- a/nikola/data/samplesite/posts/1.txt +++ b/nikola/data/samplesite/posts/1.txt @@ -9,5 +9,7 @@ and build a site using it. Congratulations! * You can read the manual `here `__ * You can learn more about Nikola at http://nikola.ralsina.com.ar * You can see a demo photo gallery `here `__ +* Demo usage of listings `here `__ +* Demo of slideshows `here `__ Send feedback to ralsina@netmanagers.com.ar! diff --git a/nikola/data/samplesite/stories/listings-demo.txt b/nikola/data/samplesite/stories/listings-demo.txt new file mode 100644 index 0000000..7875f17 --- /dev/null +++ b/nikola/data/samplesite/stories/listings-demo.txt @@ -0,0 +1,10 @@ +.. title: Listings Demo +.. slug: listings-demo +.. date: 2012/12/15 10:16:20 +.. tags: +.. link: +.. description: + +Nikola intends to let you show code easily via listings: + +.. listing:: hello.py python diff --git a/nikola/data/samplesite/stories/slides-demo.txt b/nikola/data/samplesite/stories/slides-demo.txt new file mode 100644 index 0000000..fb1356b --- /dev/null +++ b/nikola/data/samplesite/stories/slides-demo.txt @@ -0,0 +1,17 @@ +.. title: Slides Demo +.. slug: slides-demo +.. date: 2012/12/27 10:16:20 +.. tags: +.. link: +.. description: + +Nikola intends to let you do slideshows easily: + +.. slides:: + + /galleries/demo/tesla_conducts_lg.jpg + /galleries/demo/tesla_lightning2_lg.jpg + /galleries/demo/tesla4_lg.jpg + /galleries/demo/tesla_lightning1_lg.jpg + /galleries/demo/tesla_tower1_lg.jpg + diff --git a/nikola/data/themes/default/assets/css/bootstrap-responsive.css b/nikola/data/themes/default/assets/css/bootstrap-responsive.css index daafa91..a3352d7 100644 --- a/nikola/data/themes/default/assets/css/bootstrap-responsive.css +++ b/nikola/data/themes/default/assets/css/bootstrap-responsive.css @@ -1,5 +1,5 @@ /*! - * Bootstrap Responsive v2.1.0 + * Bootstrap Responsive v2.2.2 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 @@ -8,6 +8,10 @@ * Designed and built with all the love in the world @twitter by @mdo and @fat. */ +@-ms-viewport { + width: device-width; +} + .clearfix { *zoom: 1; } @@ -107,6 +111,7 @@ } [class*="span"] { float: left; + min-height: 1px; margin-left: 30px; } .container, @@ -214,6 +219,9 @@ .row-fluid [class*="span"]:first-child { margin-left: 0; } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.564102564102564%; + } .row-fluid .span12 { width: 100%; *width: 99.94680851063829%; @@ -453,6 +461,7 @@ } [class*="span"] { float: left; + min-height: 1px; margin-left: 20px; } .container, @@ -560,6 +569,9 @@ .row-fluid [class*="span"]:first-child { margin-left: 0; } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.7624309392265194%; + } .row-fluid .span12 { width: 100%; *width: 99.94680851063829%; @@ -780,7 +792,8 @@ padding-left: 20px; } .navbar-fixed-top, - .navbar-fixed-bottom { + .navbar-fixed-bottom, + .navbar-static-top { margin-right: -20px; margin-left: -20px; } @@ -811,11 +824,15 @@ margin-left: 0; } [class*="span"], + .uneditable-input[class*="span"], .row-fluid [class*="span"] { display: block; float: none; - width: auto; + width: 100%; margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } .span12, .row-fluid .span12 { @@ -824,6 +841,9 @@ -moz-box-sizing: border-box; box-sizing: border-box; } + .row-fluid [class*="offset"]:first-child { + margin-left: 0; + } .input-large, .input-xlarge, .input-xxlarge, @@ -845,6 +865,9 @@ display: inline-block; width: auto; } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 0; + } .modal { position: fixed; top: 20px; @@ -853,8 +876,11 @@ width: auto; margin: 0; } + .modal.fade { + top: -100px; + } .modal.fade.in { - top: auto; + top: 20px; } } @@ -870,7 +896,7 @@ input[type="radio"] { border: 1px solid #ccc; } - .form-horizontal .control-group > label { + .form-horizontal .control-label { float: none; width: auto; padding-top: 0; @@ -886,6 +912,16 @@ padding-right: 10px; padding-left: 10px; } + .media .pull-left, + .media .pull-right { + display: block; + float: none; + margin-bottom: 10px; + } + .media-object { + margin-right: 0; + margin-left: 0; + } .modal { top: 10px; right: 10px; @@ -944,14 +980,14 @@ display: none; } .nav-collapse .nav .nav-header { - color: #555555; + color: #777777; text-shadow: none; } .nav-collapse .nav > li > a, .nav-collapse .dropdown-menu a { padding: 9px 15px; font-weight: bold; - color: #555555; + color: #777777; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; @@ -970,6 +1006,10 @@ .nav-collapse .dropdown-menu a:hover { background-color: #f2f2f2; } + .navbar-inverse .nav-collapse .nav > li > a, + .navbar-inverse .nav-collapse .dropdown-menu a { + color: #999999; + } .navbar-inverse .nav-collapse .nav > li > a:hover, .navbar-inverse .nav-collapse .dropdown-menu a:hover { background-color: #111111; @@ -982,7 +1022,7 @@ position: static; top: auto; left: auto; - display: block; + display: none; float: none; max-width: none; padding: 0; @@ -996,6 +1036,9 @@ -moz-box-shadow: none; box-shadow: none; } + .nav-collapse .open > .dropdown-menu { + display: block; + } .nav-collapse .dropdown-menu:before, .nav-collapse .dropdown-menu:after { display: none; @@ -1003,6 +1046,10 @@ .nav-collapse .dropdown-menu .divider { display: none; } + .nav-collapse .nav > li > .dropdown-menu:before, + .nav-collapse .nav > li > .dropdown-menu:after { + display: none; + } .nav-collapse .navbar-form, .nav-collapse .navbar-search { float: none; @@ -1014,6 +1061,11 @@ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); } + .navbar-inverse .nav-collapse .navbar-form, + .navbar-inverse .nav-collapse .navbar-search { + border-top-color: #111111; + border-bottom-color: #111111; + } .navbar .nav-collapse .nav.pull-right { float: none; margin-left: 0; diff --git a/nikola/data/themes/default/assets/css/bootstrap.css b/nikola/data/themes/default/assets/css/bootstrap.css index 0664207..8ab3cef 100644 --- a/nikola/data/themes/default/assets/css/bootstrap.css +++ b/nikola/data/themes/default/assets/css/bootstrap.css @@ -1,5 +1,5 @@ /*! - * Bootstrap v2.1.0 + * Bootstrap v2.2.2 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 @@ -67,6 +67,7 @@ sub { } img { + width: auto\9; height: auto; max-width: 100%; vertical-align: middle; @@ -74,7 +75,8 @@ img { -ms-interpolation-mode: bicubic; } -#map_canvas img { +#map_canvas img, +.google-maps img { max-width: none; } @@ -100,13 +102,24 @@ input::-moz-focus-inner { } button, -input[type="button"], +html input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; } +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; +} + input[type="search"] { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; @@ -124,6 +137,58 @@ textarea { vertical-align: top; } +@media print { + * { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + @page { + margin: 0.5cm; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } +} + .clearfix { *zoom: 1; } @@ -215,6 +280,7 @@ a:hover { [class*="span"] { float: left; + min-height: 1px; margin-left: 20px; } @@ -353,6 +419,10 @@ a:hover { margin-left: 0; } +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; +} + .row-fluid .span12 { width: 100%; *width: 99.94680851063829%; @@ -583,7 +653,7 @@ p { .lead { margin-bottom: 20px; - font-size: 20px; + font-size: 21px; font-weight: 200; line-height: 30px; } @@ -608,6 +678,42 @@ cite { color: #999999; } +a.muted:hover { + color: #808080; +} + +.text-warning { + color: #c09853; +} + +a.text-warning:hover { + color: #a47e3c; +} + +.text-error { + color: #b94a48; +} + +a.text-error:hover { + color: #953b39; +} + +.text-info { + color: #3a87ad; +} + +a.text-info:hover { + color: #2d6987; +} + +.text-success { + color: #468847; +} + +a.text-success:hover { + color: #356635; +} + h1, h2, h3, @@ -617,7 +723,7 @@ h6 { margin: 10px 0; font-family: inherit; font-weight: bold; - line-height: 1; + line-height: 20px; color: inherit; text-rendering: optimizelegibility; } @@ -633,42 +739,42 @@ h6 small { color: #999999; } -h1 { - font-size: 36px; +h1, +h2, +h3 { line-height: 40px; } +h1 { + font-size: 38.5px; +} + h2 { - font-size: 30px; - line-height: 40px; + font-size: 31.5px; } h3 { - font-size: 24px; - line-height: 40px; + font-size: 24.5px; } h4 { - font-size: 18px; - line-height: 20px; + font-size: 17.5px; } h5 { font-size: 14px; - line-height: 20px; } h6 { - font-size: 12px; - line-height: 20px; + font-size: 11.9px; } h1 small { - font-size: 24px; + font-size: 24.5px; } h2 small { - font-size: 18px; + font-size: 17.5px; } h3 small { @@ -708,6 +814,19 @@ ol.unstyled { list-style: none; } +ul.inline, +ol.inline { + margin-left: 0; + list-style: none; +} + +ul.inline > li, +ol.inline > li { + display: inline-block; + padding-right: 5px; + padding-left: 5px; +} + dl { margin-bottom: 20px; } @@ -725,9 +844,24 @@ dd { margin-left: 10px; } +.dl-horizontal { + *zoom: 1; +} + +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + line-height: 0; + content: ""; +} + +.dl-horizontal:after { + clear: both; +} + .dl-horizontal dt { float: left; - width: 120px; + width: 160px; overflow: hidden; clear: left; text-align: right; @@ -736,7 +870,7 @@ dd { } .dl-horizontal dd { - margin-left: 130px; + margin-left: 180px; } hr { @@ -746,7 +880,8 @@ hr { border-bottom: 1px solid #ffffff; } -abbr[title] { +abbr[title], +abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #999999; } @@ -828,6 +963,7 @@ pre { code { padding: 2px 4px; color: #d14; + white-space: nowrap; background-color: #f7f7f9; border: 1px solid #e1e1e8; } @@ -857,6 +993,8 @@ pre.prettyprint { pre code { padding: 0; color: inherit; + white-space: pre; + white-space: pre-wrap; background-color: transparent; border: 0; } @@ -935,18 +1073,20 @@ input[type="color"], display: inline-block; height: 20px; padding: 4px 6px; - margin-bottom: 9px; + margin-bottom: 10px; font-size: 14px; line-height: 20px; color: #555555; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; + vertical-align: middle; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; } input, -textarea { - width: 210px; +textarea, +.uneditable-input { + width: 206px; } textarea { @@ -1012,7 +1152,6 @@ input[type="checkbox"] { margin-top: 1px \9; *margin-top: 0; line-height: normal; - cursor: pointer; } input[type="file"], @@ -1039,7 +1178,7 @@ input[type="file"] { select { width: 220px; background-color: #ffffff; - border: 1px solid #bbb; + border: 1px solid #cccccc; } select[multiple], @@ -1094,14 +1233,14 @@ textarea::-webkit-input-placeholder { .radio, .checkbox { - min-height: 18px; - padding-left: 18px; + min-height: 20px; + padding-left: 20px; } .radio input[type="radio"], .checkbox input[type="checkbox"] { float: left; - margin-left: -18px; + margin-left: -20px; } .controls > .radio:first-child, @@ -1268,10 +1407,16 @@ textarea.span1, clear: both; } -.controls-row [class*="span"] { +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { float: left; } +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} + input[disabled], select[disabled], textarea[disabled], @@ -1289,7 +1434,7 @@ input[type="checkbox"][readonly] { background-color: transparent; } -.control-group.warning > label, +.control-group.warning .control-label, .control-group.warning .help-block, .control-group.warning .help-inline { color: #c09853; @@ -1301,14 +1446,17 @@ input[type="checkbox"][readonly] { .control-group.warning select, .control-group.warning textarea { color: #c09853; +} + +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { border-color: #c09853; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } -.control-group.warning .checkbox:focus, -.control-group.warning .radio:focus, .control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus { @@ -1325,7 +1473,7 @@ input[type="checkbox"][readonly] { border-color: #c09853; } -.control-group.error > label, +.control-group.error .control-label, .control-group.error .help-block, .control-group.error .help-inline { color: #b94a48; @@ -1337,14 +1485,17 @@ input[type="checkbox"][readonly] { .control-group.error select, .control-group.error textarea { color: #b94a48; +} + +.control-group.error input, +.control-group.error select, +.control-group.error textarea { border-color: #b94a48; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } -.control-group.error .checkbox:focus, -.control-group.error .radio:focus, .control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus { @@ -1361,7 +1512,7 @@ input[type="checkbox"][readonly] { border-color: #b94a48; } -.control-group.success > label, +.control-group.success .control-label, .control-group.success .help-block, .control-group.success .help-inline { color: #468847; @@ -1373,14 +1524,17 @@ input[type="checkbox"][readonly] { .control-group.success select, .control-group.success textarea { color: #468847; +} + +.control-group.success input, +.control-group.success select, +.control-group.success textarea { border-color: #468847; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } -.control-group.success .checkbox:focus, -.control-group.success .radio:focus, .control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus { @@ -1397,16 +1551,55 @@ input[type="checkbox"][readonly] { border-color: #468847; } -input:focus:required:invalid, -textarea:focus:required:invalid, -select:focus:required:invalid { +.control-group.info .control-label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} + +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} + +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} + +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} + +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { color: #b94a48; border-color: #ee5f5b; } -input:focus:required:invalid:focus, -textarea:focus:required:invalid:focus, -select:focus:required:invalid:focus { +input:focus:invalid:focus, +textarea:focus:invalid:focus, +select:focus:invalid:focus { border-color: #e9322d; -webkit-box-shadow: 0 0 6px #f8b9b7; -moz-box-shadow: 0 0 6px #f8b9b7; @@ -1458,6 +1651,17 @@ select:focus:required:invalid:focus { white-space: nowrap; } +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu { + font-size: 14px; +} + .input-append input, .input-prepend input, .input-append select, @@ -1467,11 +1671,10 @@ select:focus:required:invalid:focus { position: relative; margin-bottom: 0; *margin-left: 0; - font-size: 14px; vertical-align: top; - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; } .input-append input:focus, @@ -1502,8 +1705,9 @@ select:focus:required:invalid:focus { .input-append .add-on, .input-prepend .add-on, .input-append .btn, -.input-prepend .btn { - margin-left: -1px; +.input-prepend .btn, +.input-append .btn-group > .dropdown-toggle, +.input-prepend .btn-group > .dropdown-toggle { vertical-align: top; -webkit-border-radius: 0; -moz-border-radius: 0; @@ -1523,24 +1727,39 @@ select:focus:required:invalid:focus { .input-prepend .add-on:first-child, .input-prepend .btn:first-child { - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; } .input-append input, .input-append select, .input-append .uneditable-input { - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-append input + .btn-group .btn:last-child, +.input-append select + .btn-group .btn:last-child, +.input-append .uneditable-input + .btn-group .btn:last-child { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; } .input-append .add-on:last-child, -.input-append .btn:last-child { - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; +.input-append .btn:last-child, +.input-append .btn-group:last-child > .dropdown-toggle { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; } .input-prepend.input-append input, @@ -1551,20 +1770,32 @@ select:focus:required:invalid:focus { border-radius: 0; } +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + .input-prepend.input-append .add-on:first-child, .input-prepend.input-append .btn:first-child { margin-right: -1px; - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; } .input-prepend.input-append .add-on:last-child, .input-prepend.input-append .btn:last-child { margin-left: -1px; - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; } input.search-query { @@ -1706,7 +1937,7 @@ legend + .control-group { .form-horizontal .control-label { float: left; - width: 140px; + width: 160px; padding-top: 5px; text-align: right; } @@ -1714,21 +1945,29 @@ legend + .control-group { .form-horizontal .controls { *display: inline-block; *padding-left: 20px; - margin-left: 160px; + margin-left: 180px; *margin-left: 0; } .form-horizontal .controls:first-child { - *padding-left: 160px; + *padding-left: 180px; } .form-horizontal .help-block { - margin-top: 10px; margin-bottom: 0; } +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block, +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { + margin-top: 10px; +} + .form-horizontal .form-actions { - padding-left: 160px; + padding-left: 180px; } table { @@ -1773,6 +2012,10 @@ table { border-top: 2px solid #dddddd; } +.table .table { + background-color: #ffffff; +} + .table-condensed th, .table-condensed td { padding: 4px 5px; @@ -1805,39 +2048,48 @@ table { border-top: 0; } -.table-bordered thead:first-child tr:first-child th:first-child, -.table-bordered tbody:first-child tr:first-child td:first-child { +.table-bordered thead:first-child tr:first-child > th:first-child, +.table-bordered tbody:first-child tr:first-child > td:first-child { -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topleft: 4px; } -.table-bordered thead:first-child tr:first-child th:last-child, -.table-bordered tbody:first-child tr:first-child td:last-child { +.table-bordered thead:first-child tr:first-child > th:last-child, +.table-bordered tbody:first-child tr:first-child > td:last-child { -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-topright: 4px; } -.table-bordered thead:last-child tr:last-child th:first-child, -.table-bordered tbody:last-child tr:last-child td:first-child, -.table-bordered tfoot:last-child tr:last-child td:first-child { - -webkit-border-radius: 0 0 0 4px; - -moz-border-radius: 0 0 0 4px; - border-radius: 0 0 0 4px; +.table-bordered thead:last-child tr:last-child > th:first-child, +.table-bordered tbody:last-child tr:last-child > td:first-child, +.table-bordered tfoot:last-child tr:last-child > td:first-child { -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomleft: 4px; } -.table-bordered thead:last-child tr:last-child th:last-child, -.table-bordered tbody:last-child tr:last-child td:last-child, -.table-bordered tfoot:last-child tr:last-child td:last-child { +.table-bordered thead:last-child tr:last-child > th:last-child, +.table-bordered tbody:last-child tr:last-child > td:last-child, +.table-bordered tfoot:last-child tr:last-child > td:last-child { -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; -moz-border-radius-bottomright: 4px; } +.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomleft: 0; +} + +.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomright: 0; +} + .table-bordered caption + thead tr:first-child th:first-child, .table-bordered caption + tbody tr:first-child td:first-child, .table-bordered colgroup + thead tr:first-child th:first-child, @@ -1853,11 +2105,11 @@ table { .table-bordered colgroup + tbody tr:first-child td:last-child { -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; - -moz-border-right-topleft: 4px; + -moz-border-radius-topright: 4px; } -.table-striped tbody tr:nth-child(odd) td, -.table-striped tbody tr:nth-child(odd) th { +.table-striped tbody > tr:nth-child(odd) > td, +.table-striped tbody > tr:nth-child(odd) > th { background-color: #f9f9f9; } @@ -1866,167 +2118,129 @@ table { background-color: #f5f5f5; } -table [class*=span], -.row-fluid table [class*=span] { +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { display: table-cell; float: none; margin-left: 0; } -table .span1 { +.table td.span1, +.table th.span1 { float: none; width: 44px; margin-left: 0; } -table .span2 { +.table td.span2, +.table th.span2 { float: none; width: 124px; margin-left: 0; } -table .span3 { +.table td.span3, +.table th.span3 { float: none; width: 204px; margin-left: 0; } -table .span4 { +.table td.span4, +.table th.span4 { float: none; width: 284px; margin-left: 0; } -table .span5 { +.table td.span5, +.table th.span5 { float: none; width: 364px; margin-left: 0; } -table .span6 { +.table td.span6, +.table th.span6 { float: none; width: 444px; margin-left: 0; } -table .span7 { +.table td.span7, +.table th.span7 { float: none; width: 524px; margin-left: 0; } -table .span8 { +.table td.span8, +.table th.span8 { float: none; width: 604px; margin-left: 0; } -table .span9 { +.table td.span9, +.table th.span9 { float: none; width: 684px; margin-left: 0; } -table .span10 { +.table td.span10, +.table th.span10 { float: none; width: 764px; margin-left: 0; } -table .span11 { +.table td.span11, +.table th.span11 { float: none; width: 844px; margin-left: 0; } -table .span12 { +.table td.span12, +.table th.span12 { float: none; width: 924px; margin-left: 0; } -table .span13 { - float: none; - width: 1004px; - margin-left: 0; -} - -table .span14 { - float: none; - width: 1084px; - margin-left: 0; -} - -table .span15 { - float: none; - width: 1164px; - margin-left: 0; -} - -table .span16 { - float: none; - width: 1244px; - margin-left: 0; -} - -table .span17 { - float: none; - width: 1324px; - margin-left: 0; -} - -table .span18 { - float: none; - width: 1404px; - margin-left: 0; -} - -table .span19 { - float: none; - width: 1484px; - margin-left: 0; -} - -table .span20 { - float: none; - width: 1564px; - margin-left: 0; +.table tbody tr.success td { + background-color: #dff0d8; } -table .span21 { - float: none; - width: 1644px; - margin-left: 0; +.table tbody tr.error td { + background-color: #f2dede; } -table .span22 { - float: none; - width: 1724px; - margin-left: 0; +.table tbody tr.warning td { + background-color: #fcf8e3; } -table .span23 { - float: none; - width: 1804px; - margin-left: 0; +.table tbody tr.info td { + background-color: #d9edf7; } -table .span24 { - float: none; - width: 1884px; - margin-left: 0; +.table-hover tbody tr.success:hover td { + background-color: #d0e9c6; } -.table tbody tr.success td { - background-color: #dff0d8; +.table-hover tbody tr.error:hover td { + background-color: #ebcccc; } -.table tbody tr.error td { - background-color: #f2dede; +.table-hover tbody tr.warning:hover td { + background-color: #faf2cc; } -.table tbody tr.info td { - background-color: #d9edf7; +.table-hover tbody tr.info:hover td { + background-color: #c4e3f3; } [class^="icon-"], @@ -2046,12 +2260,18 @@ table .span24 { /* White icons with optional class, or on hover/active states of certain elements */ .icon-white, -.nav > .active > a > [class^="icon-"], -.nav > .active > a > [class*=" icon-"], +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], .dropdown-menu > li > a:hover > [class^="icon-"], .dropdown-menu > li > a:hover > [class*=" icon-"], .dropdown-menu > .active > a > [class^="icon-"], -.dropdown-menu > .active > a > [class*=" icon-"] { +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"] { background-image: url("../img/glyphicons-halflings-white.png"); } @@ -2689,7 +2909,7 @@ table .span24 { border-bottom: 1px solid #ffffff; } -.dropdown-menu a { +.dropdown-menu li > a { display: block; padding: 3px 20px; clear: both; @@ -2704,7 +2924,6 @@ table .span24 { .dropdown-submenu:hover > a { color: #ffffff; text-decoration: none; - background-color: #0088cc; background-color: #0081c2; background-image: -moz-linear-gradient(top, #0088cc, #0077b3); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); @@ -2712,23 +2931,22 @@ table .span24 { background-image: -o-linear-gradient(top, #0088cc, #0077b3); background-image: linear-gradient(to bottom, #0088cc, #0077b3); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); } .dropdown-menu .active > a, .dropdown-menu .active > a:hover { color: #ffffff; text-decoration: none; - background-color: #0088cc; background-color: #0081c2; - background-image: linear-gradient(to bottom, #0088cc, #0077b3); background-image: -moz-linear-gradient(top, #0088cc, #0077b3); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); background-repeat: repeat-x; outline: 0; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); } .dropdown-menu .disabled > a, @@ -2740,6 +2958,8 @@ table .span24 { text-decoration: none; cursor: default; background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .open { @@ -2759,7 +2979,7 @@ table .span24 { .navbar-fixed-bottom .dropdown .caret { border-top: 0; border-bottom: 4px solid #000000; - content: "\2191"; + content: ""; } .dropup .dropdown-menu, @@ -2783,10 +3003,20 @@ table .span24 { border-radius: 0 6px 6px 6px; } -.dropdown-submenu:hover .dropdown-menu { +.dropdown-submenu:hover > .dropdown-menu { display: block; } +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} + .dropdown-submenu > a:after { display: block; float: right; @@ -2805,12 +3035,25 @@ table .span24 { border-left-color: #ffffff; } +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + .dropdown .dropdown-menu .nav-header { padding-right: 20px; padding-left: 20px; } .typeahead { + z-index: 1051; margin-top: 2px; -webkit-border-radius: 4px; -moz-border-radius: 4px; @@ -2866,7 +3109,6 @@ table .span24 { position: relative; height: 0; overflow: hidden; - overflow: visible \9; -webkit-transition: height 0.35s ease; -moz-transition: height 0.35s ease; -o-transition: height 0.35s ease; @@ -2907,12 +3149,11 @@ button.close { .btn { display: inline-block; *display: inline; - padding: 4px 14px; + padding: 4px 12px; margin-bottom: 0; *margin-left: .3em; font-size: 14px; line-height: 20px; - *line-height: 20px; color: #333333; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); @@ -2920,22 +3161,22 @@ button.close { cursor: pointer; background-color: #f5f5f5; *background-color: #e6e6e6; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); - background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); background-repeat: repeat-x; border: 1px solid #bbbbbb; *border: 0; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); border-bottom-color: #a2a2a2; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); *zoom: 1; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); @@ -2964,10 +3205,6 @@ button.close { .btn:hover { color: #333333; text-decoration: none; - background-color: #e6e6e6; - *background-color: #d9d9d9; - /* Buttons in IE7 don't get borders, so darken on hover */ - background-position: 0 -15px; -webkit-transition: background-position 0.1s linear; -moz-transition: background-position 0.1s linear; @@ -2983,8 +3220,6 @@ button.close { .btn.active, .btn:active { - background-color: #e6e6e6; - background-color: #d9d9d9 \9; background-image: none; outline: 0; -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); @@ -2995,7 +3230,6 @@ button.close { .btn.disabled, .btn[disabled] { cursor: default; - background-color: #e6e6e6; background-image: none; opacity: 0.65; filter: alpha(opacity=65); @@ -3005,32 +3239,42 @@ button.close { } .btn-large { - padding: 9px 14px; - font-size: 16px; - line-height: normal; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; + padding: 11px 19px; + font-size: 17.5px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; } -.btn-large [class^="icon-"] { - margin-top: 2px; +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 4px; +} + +.btn-small { + padding: 2px 10px; + font-size: 11.9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; } -.btn-small { - padding: 3px 9px; - font-size: 12px; - line-height: 18px; +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; } -.btn-small [class^="icon-"] { - margin-top: 0; +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; } .btn-mini { - padding: 2px 6px; - font-size: 11px; - line-height: 16px; + padding: 0 6px; + font-size: 10.5px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; } .btn-block { @@ -3047,6 +3291,12 @@ button.close { margin-top: 5px; } +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} + .btn-primary.active, .btn-warning.active, .btn-danger.active, @@ -3066,16 +3316,16 @@ button.close { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #006dcc; *background-color: #0044cc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); background-image: linear-gradient(to bottom, #0088cc, #0044cc); - background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-repeat: repeat-x; border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-primary:hover, @@ -3098,16 +3348,16 @@ button.close { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #faa732; *background-color: #f89406; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); background-image: -webkit-linear-gradient(top, #fbb450, #f89406); background-image: -o-linear-gradient(top, #fbb450, #f89406); background-image: linear-gradient(to bottom, #fbb450, #f89406); - background-image: -moz-linear-gradient(top, #fbb450, #f89406); background-repeat: repeat-x; border-color: #f89406 #f89406 #ad6704; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-warning:hover, @@ -3130,16 +3380,16 @@ button.close { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #da4f49; *background-color: #bd362f; + background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); - background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); background-repeat: repeat-x; border-color: #bd362f #bd362f #802420; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-danger:hover, @@ -3162,16 +3412,16 @@ button.close { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #5bb75b; *background-color: #51a351; + background-image: -moz-linear-gradient(top, #62c462, #51a351); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); background-image: -webkit-linear-gradient(top, #62c462, #51a351); background-image: -o-linear-gradient(top, #62c462, #51a351); background-image: linear-gradient(to bottom, #62c462, #51a351); - background-image: -moz-linear-gradient(top, #62c462, #51a351); background-repeat: repeat-x; border-color: #51a351 #51a351 #387038; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-success:hover, @@ -3194,16 +3444,16 @@ button.close { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #49afcd; *background-color: #2f96b4; + background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); - background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); background-repeat: repeat-x; border-color: #2f96b4 #2f96b4 #1f6377; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-info:hover, @@ -3226,16 +3476,16 @@ button.close { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #363636; *background-color: #222222; + background-image: -moz-linear-gradient(top, #444444, #222222); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); background-image: -webkit-linear-gradient(top, #444444, #222222); background-image: -o-linear-gradient(top, #444444, #222222); background-image: linear-gradient(to bottom, #444444, #222222); - background-image: -moz-linear-gradient(top, #444444, #222222); background-repeat: repeat-x; border-color: #222222 #222222 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-inverse:hover, @@ -3284,7 +3534,8 @@ input[type="submit"].btn.btn-mini { } .btn-link, -.btn-link:active { +.btn-link:active, +.btn-link[disabled] { background-color: transparent; background-image: none; -webkit-box-shadow: none; @@ -3307,11 +3558,20 @@ input[type="submit"].btn.btn-mini { background-color: transparent; } +.btn-link[disabled]:hover { + color: #333333; + text-decoration: none; +} + .btn-group { position: relative; + display: inline-block; + *display: inline; *margin-left: .3em; font-size: 0; white-space: nowrap; + vertical-align: middle; + *zoom: 1; } .btn-group:first-child { @@ -3328,17 +3588,9 @@ input[type="submit"].btn.btn-mini { font-size: 0; } -.btn-toolbar .btn-group { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; -} - -.btn-toolbar .btn + .btn, -.btn-toolbar .btn-group + .btn, -.btn-toolbar .btn + .btn-group { +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { margin-left: 5px; } @@ -3354,20 +3606,21 @@ input[type="submit"].btn.btn-mini { } .btn-group > .btn, -.btn-group > .dropdown-menu { +.btn-group > .dropdown-menu, +.btn-group > .popover { font-size: 14px; } .btn-group > .btn-mini { - font-size: 11px; + font-size: 10.5px; } .btn-group > .btn-small { - font-size: 12px; + font-size: 11.9px; } .btn-group > .btn-large { - font-size: 16px; + font-size: 17.5px; } .btn-group > .btn:first-child { @@ -3504,8 +3757,7 @@ input[type="submit"].btn.btn-mini { } .dropup .btn-large .caret { - border-top: 0; - border-bottom: 5px solid #000000; + border-bottom-width: 5px; } .btn-primary .caret, @@ -3526,39 +3778,39 @@ input[type="submit"].btn.btn-mini { *zoom: 1; } -.btn-group-vertical .btn { +.btn-group-vertical > .btn { display: block; float: none; - width: 100%; + max-width: 100%; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; } -.btn-group-vertical .btn + .btn { +.btn-group-vertical > .btn + .btn { margin-top: -1px; margin-left: 0; } -.btn-group-vertical .btn:first-child { +.btn-group-vertical > .btn:first-child { -webkit-border-radius: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; } -.btn-group-vertical .btn:last-child { +.btn-group-vertical > .btn:last-child { -webkit-border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; } -.btn-group-vertical .btn-large:first-child { +.btn-group-vertical > .btn-large:first-child { -webkit-border-radius: 6px 6px 0 0; -moz-border-radius: 6px 6px 0 0; border-radius: 6px 6px 0 0; } -.btn-group-vertical .btn-large:last-child { +.btn-group-vertical > .btn-large:last-child { -webkit-border-radius: 0 0 6px 6px; -moz-border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px; @@ -3567,7 +3819,6 @@ input[type="submit"].btn.btn-mini { .alert { padding: 8px 35px 8px 14px; margin-bottom: 20px; - color: #c09853; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); background-color: #fcf8e3; border: 1px solid #fbeed5; @@ -3576,6 +3827,11 @@ input[type="submit"].btn.btn-mini { border-radius: 4px; } +.alert, +.alert h4 { + color: #c09853; +} + .alert h4 { margin: 0; } @@ -3593,6 +3849,10 @@ input[type="submit"].btn.btn-mini { border-color: #d6e9c6; } +.alert-success h4 { + color: #468847; +} + .alert-danger, .alert-error { color: #b94a48; @@ -3600,12 +3860,21 @@ input[type="submit"].btn.btn-mini { border-color: #eed3d7; } +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} + .alert-info { color: #3a87ad; background-color: #d9edf7; border-color: #bce8f1; } +.alert-info h4 { + color: #3a87ad; +} + .alert-block { padding-top: 14px; padding-bottom: 14px; @@ -3635,6 +3904,10 @@ input[type="submit"].btn.btn-mini { background-color: #eeeeee; } +.nav > li > a > img { + max-width: none; +} + .nav > .pull-right { float: right; } @@ -3678,7 +3951,8 @@ input[type="submit"].btn.btn-mini { background-color: #0088cc; } -.nav-list [class^="icon-"] { +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { margin-right: 2px; } @@ -4018,7 +4292,6 @@ input[type="submit"].btn.btn-mini { *z-index: 2; margin-bottom: 20px; overflow: visible; - color: #555555; } .navbar-inner { @@ -4036,18 +4309,31 @@ input[type="submit"].btn.btn-mini { -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + *zoom: 1; -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); } +.navbar-inner:before, +.navbar-inner:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-inner:after { + clear: both; +} + .navbar .container { width: auto; } .nav-collapse.collapse { height: auto; + overflow: visible; } .navbar .brand { @@ -4057,7 +4343,7 @@ input[type="submit"].btn.btn-mini { margin-left: -20px; font-size: 20px; font-weight: 200; - color: #555555; + color: #777777; text-shadow: 0 1px 0 #ffffff; } @@ -4068,10 +4354,11 @@ input[type="submit"].btn.btn-mini { .navbar-text { margin-bottom: 0; line-height: 40px; + color: #777777; } .navbar-link { - color: #555555; + color: #777777; } .navbar-link:hover { @@ -4087,11 +4374,13 @@ input[type="submit"].btn.btn-mini { .navbar .btn, .navbar .btn-group { - margin-top: 6px; + margin-top: 5px; } -.navbar .btn-group .btn { - margin: 0; +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn { + margin-top: 0; } .navbar-form { @@ -4132,7 +4421,7 @@ input[type="submit"].btn.btn-mini { .navbar-form .input-append, .navbar-form .input-prepend { - margin-top: 6px; + margin-top: 5px; white-space: nowrap; } @@ -4162,7 +4451,6 @@ input[type="submit"].btn.btn-mini { .navbar-static-top { position: static; - width: 100%; margin-bottom: 0; } @@ -4182,9 +4470,12 @@ input[type="submit"].btn.btn-mini { } .navbar-fixed-top .navbar-inner, -.navbar-fixed-bottom .navbar-inner, .navbar-static-top .navbar-inner { - border: 0; + border-width: 0 0 1px; +} + +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; } .navbar-fixed-top .navbar-inner, @@ -4208,9 +4499,9 @@ input[type="submit"].btn.btn-mini { .navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner { - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); + -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); } .navbar-fixed-bottom { @@ -4218,9 +4509,9 @@ input[type="submit"].btn.btn-mini { } .navbar-fixed-bottom .navbar-inner { - -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 -1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 -1px 10px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 -1px 10px rgba(0, 0, 0, 0.1); + -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); } .navbar .nav { @@ -4233,6 +4524,7 @@ input[type="submit"].btn.btn-mini { .navbar .nav.pull-right { float: right; + margin-right: 0; } .navbar .nav > li { @@ -4242,7 +4534,7 @@ input[type="submit"].btn.btn-mini { .navbar .nav > li > a { float: none; padding: 10px 15px 10px; - color: #555555; + color: #777777; text-decoration: none; text-shadow: 0 1px 0 #ffffff; } @@ -4279,16 +4571,16 @@ input[type="submit"].btn.btn-mini { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #ededed; *background-color: #e5e5e5; + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); - background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); background-repeat: repeat-x; border-color: #e5e5e5 #e5e5e5 #bfbfbf; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); @@ -4364,6 +4656,11 @@ input[type="submit"].btn.btn-mini { border-bottom: 0; } +.navbar .nav li.dropdown > a:hover .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + .navbar .nav li.dropdown.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, .navbar .nav li.dropdown.open.active > .dropdown-toggle { @@ -4372,8 +4669,8 @@ input[type="submit"].btn.btn-mini { } .navbar .nav li.dropdown > .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; + border-top-color: #777777; + border-bottom-color: #777777; } .navbar .nav li.dropdown.open > .dropdown-toggle .caret, @@ -4412,10 +4709,6 @@ input[type="submit"].btn.btn-mini { border-radius: 6px 0 6px 6px; } -.navbar-inverse { - color: #999999; -} - .navbar-inverse .navbar-inner { background-color: #1b1b1b; background-image: -moz-linear-gradient(top, #222222, #111111); @@ -4425,7 +4718,7 @@ input[type="submit"].btn.btn-mini { background-image: linear-gradient(to bottom, #222222, #111111); background-repeat: repeat-x; border-color: #252525; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); } .navbar-inverse .brand, @@ -4439,6 +4732,14 @@ input[type="submit"].btn.btn-mini { color: #ffffff; } +.navbar-inverse .brand { + color: #999999; +} + +.navbar-inverse .navbar-text { + color: #999999; +} + .navbar-inverse .nav > li > a:focus, .navbar-inverse .nav > li > a:hover { color: #ffffff; @@ -4472,6 +4773,11 @@ input[type="submit"].btn.btn-mini { background-color: #111111; } +.navbar-inverse .nav li.dropdown > a:hover .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + .navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { border-top-color: #999999; border-bottom-color: #999999; @@ -4527,16 +4833,16 @@ input[type="submit"].btn.btn-mini { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #0e0e0e; *background-color: #040404; + background-image: -moz-linear-gradient(top, #151515, #040404); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); background-image: -webkit-linear-gradient(top, #151515, #040404); background-image: -o-linear-gradient(top, #151515, #040404); background-image: linear-gradient(to bottom, #151515, #040404); - background-image: -moz-linear-gradient(top, #151515, #040404); background-repeat: repeat-x; border-color: #040404 #040404 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .navbar-inverse .btn-navbar:hover, @@ -4564,24 +4870,23 @@ input[type="submit"].btn.btn-mini { border-radius: 4px; } -.breadcrumb li { +.breadcrumb > li { display: inline-block; *display: inline; text-shadow: 0 1px 0 #ffffff; *zoom: 1; } -.breadcrumb .divider { +.breadcrumb > li > .divider { padding: 0 5px; color: #ccc; } -.breadcrumb .active { +.breadcrumb > .active { color: #999999; } .pagination { - height: 40px; margin: 20px 0; } @@ -4590,63 +4895,69 @@ input[type="submit"].btn.btn-mini { *display: inline; margin-bottom: 0; margin-left: 0; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; *zoom: 1; -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } -.pagination li { +.pagination ul > li { display: inline; } -.pagination a, -.pagination span { +.pagination ul > li > a, +.pagination ul > li > span { float: left; - padding: 0 14px; - line-height: 38px; + padding: 4px 12px; + line-height: 20px; text-decoration: none; background-color: #ffffff; border: 1px solid #dddddd; border-left-width: 0; } -.pagination a:hover, -.pagination .active a, -.pagination .active span { +.pagination ul > li > a:hover, +.pagination ul > .active > a, +.pagination ul > .active > span { background-color: #f5f5f5; } -.pagination .active a, -.pagination .active span { +.pagination ul > .active > a, +.pagination ul > .active > span { color: #999999; cursor: default; } -.pagination .disabled span, -.pagination .disabled a, -.pagination .disabled a:hover { +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover { color: #999999; cursor: default; background-color: transparent; } -.pagination li:first-child a, -.pagination li:first-child span { +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { border-left-width: 1px; - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; } -.pagination li:last-child a, -.pagination li:last-child span { - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; } .pagination-centered { @@ -4657,6 +4968,68 @@ input[type="submit"].btn.btn-mini { text-align: right; } +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 17.5px; +} + +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topleft: 3px; +} + +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; +} + +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.9px; +} + +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 0 6px; + font-size: 10.5px; +} + .pager { margin: 20px 0; text-align: center; @@ -4679,7 +5052,8 @@ input[type="submit"].btn.btn-mini { display: inline; } -.pager a { +.pager li > a, +.pager li > span { display: inline-block; padding: 5px 14px; background-color: #fff; @@ -4689,42 +5063,29 @@ input[type="submit"].btn.btn-mini { border-radius: 15px; } -.pager a:hover { +.pager li > a:hover { text-decoration: none; background-color: #f5f5f5; } -.pager .next a { +.pager .next > a, +.pager .next > span { float: right; } -.pager .previous a { +.pager .previous > a, +.pager .previous > span { float: left; } -.pager .disabled a, -.pager .disabled a:hover { +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > span { color: #999999; cursor: default; background-color: #fff; } -.modal-open .dropdown-menu { - z-index: 2050; -} - -.modal-open .dropdown.open { - *z-index: 2050; -} - -.modal-open .popover { - z-index: 2060; -} - -.modal-open .tooltip { - z-index: 2080; -} - .modal-backdrop { position: fixed; top: 0; @@ -4747,12 +5108,11 @@ input[type="submit"].btn.btn-mini { .modal { position: fixed; - top: 50%; + top: 10%; left: 50%; z-index: 1050; width: 560px; - margin: -250px 0 0 -280px; - overflow: auto; + margin-left: -280px; background-color: #ffffff; border: 1px solid #999; border: 1px solid rgba(0, 0, 0, 0.3); @@ -4760,6 +5120,7 @@ input[type="submit"].btn.btn-mini { -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; + outline: none; -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); @@ -4777,7 +5138,7 @@ input[type="submit"].btn.btn-mini { } .modal.fade.in { - top: 50%; + top: 10%; } .modal-header { @@ -4795,6 +5156,7 @@ input[type="submit"].btn.btn-mini { } .modal-body { + position: relative; max-height: 400px; padding: 15px; overflow-y: auto; @@ -4839,6 +5201,10 @@ input[type="submit"].btn.btn-mini { margin-left: -1px; } +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} + .tooltip { position: absolute; z-index: 1030; @@ -4931,6 +5297,8 @@ input[type="submit"].btn.btn-mini { display: none; width: 236px; padding: 1px; + text-align: left; + white-space: normal; background-color: #ffffff; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); @@ -4946,7 +5314,7 @@ input[type="submit"].btn.btn-mini { } .popover.top { - margin-bottom: 10px; + margin-top: -10px; } .popover.right { @@ -4958,7 +5326,7 @@ input[type="submit"].btn.btn-mini { } .popover.left { - margin-right: 10px; + margin-left: -10px; } .popover-title { @@ -4978,85 +5346,87 @@ input[type="submit"].btn.btn-mini { padding: 9px 14px; } -.popover-content p, -.popover-content ul, -.popover-content ol { - margin-bottom: 0; -} - .popover .arrow, .popover .arrow:after { position: absolute; - display: inline-block; + display: block; width: 0; height: 0; border-color: transparent; border-style: solid; } +.popover .arrow { + border-width: 11px; +} + .popover .arrow:after { - z-index: -1; + border-width: 10px; content: ""; } .popover.top .arrow { - bottom: -10px; + bottom: -11px; left: 50%; - margin-left: -10px; - border-top-color: #ffffff; - border-width: 10px 10px 0; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, 0.25); + border-bottom-width: 0; } .popover.top .arrow:after { - bottom: -1px; - left: -11px; - border-top-color: rgba(0, 0, 0, 0.25); - border-width: 11px 11px 0; + bottom: 1px; + margin-left: -10px; + border-top-color: #ffffff; + border-bottom-width: 0; } .popover.right .arrow { top: 50%; - left: -10px; - margin-top: -10px; - border-right-color: #ffffff; - border-width: 10px 10px 10px 0; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, 0.25); + border-left-width: 0; } .popover.right .arrow:after { - bottom: -11px; - left: -1px; - border-right-color: rgba(0, 0, 0, 0.25); - border-width: 11px 11px 11px 0; + bottom: -10px; + left: 1px; + border-right-color: #ffffff; + border-left-width: 0; } .popover.bottom .arrow { - top: -10px; + top: -11px; left: 50%; - margin-left: -10px; - border-bottom-color: #ffffff; - border-width: 0 10px 10px; + margin-left: -11px; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, 0.25); + border-top-width: 0; } .popover.bottom .arrow:after { - top: -1px; - left: -11px; - border-bottom-color: rgba(0, 0, 0, 0.25); - border-width: 0 11px 11px; + top: 1px; + margin-left: -10px; + border-bottom-color: #ffffff; + border-top-width: 0; } .popover.left .arrow { top: 50%; - right: -10px; - margin-top: -10px; - border-left-color: #ffffff; - border-width: 10px 0 10px 10px; + right: -11px; + margin-top: -11px; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, 0.25); + border-right-width: 0; } .popover.left .arrow:after { - right: -1px; - bottom: -11px; - border-left-color: rgba(0, 0, 0, 0.25); - border-width: 11px 0 11px 11px; + right: 1px; + bottom: -10px; + border-left-color: #ffffff; + border-right-width: 0; } .thumbnails { @@ -5122,8 +5492,47 @@ a.thumbnail:hover { color: #555555; } +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} + +.media, +.media .media { + margin-top: 15px; +} + +.media:first-child { + margin-top: 0; +} + +.media-object { + display: block; +} + +.media-heading { + margin: 0 0 5px; +} + +.media .pull-left { + margin-right: 10px; +} + +.media .pull-right { + margin-left: 10px; +} + +.media-list { + margin-left: 0; + list-style: none; +} + .label, .badge { + display: inline-block; + padding: 2px 4px; font-size: 11.844px; font-weight: bold; line-height: 14px; @@ -5135,19 +5544,24 @@ a.thumbnail:hover { } .label { - padding: 1px 4px 2px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } .badge { - padding: 1px 9px 2px; + padding-right: 9px; + padding-left: 9px; -webkit-border-radius: 9px; -moz-border-radius: 9px; border-radius: 9px; } +.label:empty, +.badge:empty { + display: none; +} + a.label:hover, a.badge:hover { color: #ffffff; @@ -5275,7 +5689,7 @@ a.badge:hover { -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); @@ -5296,7 +5710,7 @@ a.badge:hover { background-image: -o-linear-gradient(top, #149bdf, #0480be); background-image: linear-gradient(to bottom, #149bdf, #0480be); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); @@ -5345,7 +5759,7 @@ a.badge:hover { background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); } .progress-danger.progress-striped .bar, @@ -5367,7 +5781,7 @@ a.badge:hover { background-image: -o-linear-gradient(top, #62c462, #57a957); background-image: linear-gradient(to bottom, #62c462, #57a957); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); } .progress-success.progress-striped .bar, @@ -5389,7 +5803,7 @@ a.badge:hover { background-image: -o-linear-gradient(top, #5bc0de, #339bb9); background-image: linear-gradient(to bottom, #5bc0de, #339bb9); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); } .progress-info.progress-striped .bar, @@ -5411,7 +5825,7 @@ a.badge:hover { background-image: -o-linear-gradient(top, #fbb450, #f89406); background-image: linear-gradient(to bottom, #fbb450, #f89406); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); } .progress-warning.progress-striped .bar, @@ -5466,7 +5880,7 @@ a.badge:hover { overflow: hidden; } -.carousel .item { +.carousel-inner > .item { position: relative; display: none; -webkit-transition: 0.6s ease-in-out left; @@ -5475,46 +5889,46 @@ a.badge:hover { transition: 0.6s ease-in-out left; } -.carousel .item > img { +.carousel-inner > .item > img { display: block; line-height: 1; } -.carousel .active, -.carousel .next, -.carousel .prev { +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { display: block; } -.carousel .active { +.carousel-inner > .active { left: 0; } -.carousel .next, -.carousel .prev { +.carousel-inner > .next, +.carousel-inner > .prev { position: absolute; top: 0; width: 100%; } -.carousel .next { +.carousel-inner > .next { left: 100%; } -.carousel .prev { +.carousel-inner > .prev { left: -100%; } -.carousel .next.left, -.carousel .prev.right { +.carousel-inner > .next.left, +.carousel-inner > .prev.right { left: 0; } -.carousel .active.left { +.carousel-inner > .active.left { left: -100%; } -.carousel .active.right { +.carousel-inner > .active.right { left: 100%; } @@ -5578,6 +5992,10 @@ a.badge:hover { .hero-unit { padding: 60px; margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 30px; + color: inherit; background-color: #eeeeee; -webkit-border-radius: 6px; -moz-border-radius: 6px; @@ -5592,11 +6010,8 @@ a.badge:hover { color: inherit; } -.hero-unit p { - font-size: 18px; - font-weight: 200; +.hero-unit li { line-height: 30px; - color: inherit; } .pull-right { diff --git a/nikola/data/themes/default/assets/css/slides.css b/nikola/data/themes/default/assets/css/slides.css new file mode 100644 index 0000000..272c83e --- /dev/null +++ b/nikola/data/themes/default/assets/css/slides.css @@ -0,0 +1,11 @@ +.slides_container { + display: block; + margin-left: auto; + margin-right: auto; + max-width: 80%; + width: 400px; + height: 300px; +} +.slide-current { + font-weight: bold; +} diff --git a/nikola/data/themes/default/assets/js/bootstrap.js b/nikola/data/themes/default/assets/js/bootstrap.js index 7f303eb..6c15a58 100644 --- a/nikola/data/themes/default/assets/js/bootstrap.js +++ b/nikola/data/themes/default/assets/js/bootstrap.js @@ -1,5 +1,5 @@ /* =================================================== - * bootstrap-transition.js v2.1.0 + * bootstrap-transition.js v2.2.2 * http://twitter.github.com/bootstrap/javascript.html#transitions * =================================================== * Copyright 2012 Twitter, Inc. @@ -20,13 +20,13 @@ !function ($) { - $(function () { + "use strict"; // jshint ;_; - "use strict"; // jshint ;_; + /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) + * ======================================================= */ - /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) - * ======================================================= */ + $(function () { $.support.transition = (function () { @@ -58,7 +58,7 @@ }) }(window.jQuery);/* ========================================================== - * bootstrap-alert.js v2.1.0 + * bootstrap-alert.js v2.2.2 * http://twitter.github.com/bootstrap/javascript.html#alerts * ========================================================== * Copyright 2012 Twitter, Inc. @@ -127,6 +127,8 @@ /* ALERT PLUGIN DEFINITION * ======================= */ + var old = $.fn.alert + $.fn.alert = function (option) { return this.each(function () { var $this = $(this) @@ -139,15 +141,22 @@ $.fn.alert.Constructor = Alert + /* ALERT NO CONFLICT + * ================= */ + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + /* ALERT DATA-API * ============== */ - $(function () { - $('body').on('click.alert.data-api', dismiss, Alert.prototype.close) - }) + $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) }(window.jQuery);/* ============================================================ - * bootstrap-button.js v2.1.0 + * bootstrap-button.js v2.2.2 * http://twitter.github.com/bootstrap/javascript.html#buttons * ============================================================ * Copyright 2012 Twitter, Inc. @@ -199,7 +208,7 @@ } Button.prototype.toggle = function () { - var $parent = this.$element.parent('[data-toggle="buttons-radio"]') + var $parent = this.$element.closest('[data-toggle="buttons-radio"]') $parent && $parent .find('.active') @@ -212,6 +221,8 @@ /* BUTTON PLUGIN DEFINITION * ======================== */ + var old = $.fn.button + $.fn.button = function (option) { return this.each(function () { var $this = $(this) @@ -230,19 +241,26 @@ $.fn.button.Constructor = Button + /* BUTTON NO CONFLICT + * ================== */ + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + /* BUTTON DATA-API * =============== */ - $(function () { - $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - }) + $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') }) }(window.jQuery);/* ========================================================== - * bootstrap-carousel.js v2.1.0 + * bootstrap-carousel.js v2.2.2 * http://twitter.github.com/bootstrap/javascript.html#carousel * ========================================================== * Copyright 2012 Twitter, Inc. @@ -272,7 +290,6 @@ var Carousel = function (element, options) { this.$element = $(element) this.options = options - this.options.slide && this.slide(this.options.slide) this.options.pause == 'hover' && this.$element .on('mouseenter', $.proxy(this.pause, this)) .on('mouseleave', $.proxy(this.cycle, this)) @@ -337,9 +354,7 @@ , direction = type == 'next' ? 'left' : 'right' , fallback = type == 'next' ? 'first' : 'last' , that = this - , e = $.Event('slide', { - relatedTarget: $next[0] - }) + , e this.sliding = true @@ -347,6 +362,10 @@ $next = $next.length ? $next : this.$element.find('.item')[fallback]() + e = $.Event('slide', { + relatedTarget: $next[0] + }) + if ($next.hasClass('active')) return if ($.support.transition && this.$element.hasClass('slide')) { @@ -382,6 +401,8 @@ /* CAROUSEL PLUGIN DEFINITION * ========================== */ + var old = $.fn.carousel + $.fn.carousel = function (option) { return this.each(function () { var $this = $(this) @@ -403,21 +424,27 @@ $.fn.carousel.Constructor = Carousel + /* CAROUSEL NO CONFLICT + * ==================== */ + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + /* CAROUSEL DATA-API * ================= */ - $(function () { - $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { - var $this = $(this), href - , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) - $target.carousel(options) - e.preventDefault() - }) + $(document).on('click.carousel.data-api', '[data-slide]', function (e) { + var $this = $(this), href + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + , options = $.extend({}, $target.data(), $this.data()) + $target.carousel(options) + e.preventDefault() }) }(window.jQuery);/* ============================================================= - * bootstrap-collapse.js v2.1.0 + * bootstrap-collapse.js v2.2.2 * http://twitter.github.com/bootstrap/javascript.html#collapse * ============================================================= * Copyright 2012 Twitter, Inc. @@ -538,8 +565,10 @@ } - /* COLLAPSIBLE PLUGIN DEFINITION - * ============================== */ + /* COLLAPSE PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.collapse $.fn.collapse = function (option) { return this.each(function () { @@ -558,23 +587,30 @@ $.fn.collapse.Constructor = Collapse - /* COLLAPSIBLE DATA-API + /* COLLAPSE NO CONFLICT * ==================== */ - $(function () { - $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { - var $this = $(this), href - , target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 - , option = $(target).data('collapse') ? 'toggle' : $this.data() - $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') - $(target).collapse(option) - }) + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + /* COLLAPSE DATA-API + * ================= */ + + $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + $(target).collapse(option) }) }(window.jQuery);/* ============================================================ - * bootstrap-dropdown.js v2.1.0 + * bootstrap-dropdown.js v2.2.2 * http://twitter.github.com/bootstrap/javascript.html#dropdowns * ============================================================ * Copyright 2012 Twitter, Inc. @@ -628,9 +664,10 @@ if (!isActive) { $parent.toggleClass('open') - $this.focus() } + $this.focus() + return false } @@ -657,7 +694,7 @@ if (!isActive || (isActive && e.keyCode == 27)) return $this.click() - $items = $('[role=menu] li:not(.divider) a', $parent) + $items = $('[role=menu] li:not(.divider):visible a', $parent) if (!$items.length) return @@ -675,8 +712,9 @@ } function clearMenus() { - getParent($(toggle)) - .removeClass('open') + $(toggle).each(function () { + getParent($(this)).removeClass('open') + }) } function getParent($this) { @@ -685,7 +723,7 @@ if (!selector) { selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } $parent = $(selector) @@ -698,6 +736,8 @@ /* DROPDOWN PLUGIN DEFINITION * ========================== */ + var old = $.fn.dropdown + $.fn.dropdown = function (option) { return this.each(function () { var $this = $(this) @@ -710,20 +750,27 @@ $.fn.dropdown.Constructor = Dropdown + /* DROPDOWN NO CONFLICT + * ==================== */ + + $.fn.dropdown.noConflict = function () { + $.fn.dropdown = old + return this + } + + /* APPLY TO STANDARD DROPDOWN ELEMENTS * =================================== */ - $(function () { - $('html') - .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) - $('body') - .on('click.dropdown touchstart.dropdown.data-api', '.dropdown', function (e) { e.stopPropagation() }) - .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) - .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) - }) + $(document) + .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) + .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() }) + .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) + .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) }(window.jQuery);/* ========================================================= - * bootstrap-modal.js v2.1.0 + * bootstrap-modal.js v2.2.2 * http://twitter.github.com/bootstrap/javascript.html#modals * ========================================================= * Copyright 2012 Twitter, Inc. @@ -773,8 +820,6 @@ if (this.isShown || e.isDefaultPrevented()) return - $('body').addClass('modal-open') - this.isShown = true this.escape() @@ -796,13 +841,12 @@ that.$element .addClass('in') .attr('aria-hidden', false) - .focus() that.enforceFocus() transition ? - that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : - that.$element.trigger('shown') + that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) : + that.$element.focus().trigger('shown') }) } @@ -820,8 +864,6 @@ this.isShown = false - $('body').removeClass('modal-open') - this.escape() $(document).off('focusin.modal') @@ -891,9 +933,11 @@ this.$backdrop = $('