Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/nikola
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 850c714c956f
Choose a base ref
...
head repository: getnikola/nikola
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b56427f95994
Choose a head ref
  • 3 commits
  • 8 files changed
  • 1 contributor

Commits on Apr 24, 2015

  1. removed bootstrap for a sec

    ralsina committed Apr 24, 2015
    Copy the full SHA
    669be92 View commit details
  2. bootstrap again

    ralsina committed Apr 24, 2015
    Copy the full SHA
    e14ee49 View commit details
  3. moved to katex

    ralsina committed Apr 24, 2015
    Copy the full SHA
    b56427f View commit details
27 changes: 21 additions & 6 deletions nikola/data/themes/bootstrap/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
A bootstrap3 version of the bootstrap theme.
A "website-done-with-bootstrap" theme, so to speak.

There is a variant called bootstrap3-gradients which uses an extra CSS
file for a *visually enhanced experience* (according to Bootstrap
developers at least). This one uses the default bootstrap3 flat look.
Has a fixed navigation bar at top that displays the NAVIGATION_LINKS
setting and supports nested menus.

This theme supports Bootswtach font/color schemes (unlike
bootstrap3-gradients) through the `nikola bootswatch_theme` command.
This theme is used in Nikola's website: http://getnikola.com

Important: To fit in the bootstrap navigation bar, the search form needs the
navbar-form and pull-left CSS classes applied. Here is an example with Nikola's
default duckduckgo search form:

SEARCH_FORM = """
<!-- Custom search -->
<form method="get" id="search" action="http://duckduckgo.com/" class="navbar-form pull-left">
<input type="hidden" name="sites" value="%s"/>
<input type="hidden" name="k8" value="#444444"/>
<input type="hidden" name="k9" value="#D51920"/>
<input type="hidden" name="kt" value="h"/>
<input type="text" name="q" maxlength="255" placeholder="Search&hellip;" class="span2" style="margin-top: 4px;"/>
<input type="submit" value="DuckDuckGo Search" style="visibility: hidden;" />
</form>
<!-- End of custom search -->
""" % SITE_URL
2 changes: 1 addition & 1 deletion nikola/data/themes/bootstrap/engine
Original file line number Diff line number Diff line change
@@ -1 +1 @@
jinja
mako
2 changes: 1 addition & 1 deletion nikola/data/themes/bootstrap/parent
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bootstrap3
base
147 changes: 73 additions & 74 deletions nikola/data/themes/bootstrap/templates/base.tmpl
Original file line number Diff line number Diff line change
@@ -1,94 +1,93 @@
{# -*- coding: utf-8 -*- #}
{% import 'base_helper.tmpl' as base with context %}
{% import 'annotation_helper.tmpl' as notes with context %}
{{ set_locale(lang) }}
{{ base.html_headstart() }}
{% block extra_head %}
{# Leave this block alone. #}
{% endblock %}
{{ template_hooks['extra_head']() }}
## -*- coding: utf-8 -*-
<%namespace name="base" file="base_helper.tmpl" import="*" />
<%namespace name="notes" file="annotation_helper.tmpl" import="*" />
${set_locale(lang)}
${base.html_headstart()}
<%block name="extra_head">
### Leave this block alone.
</%block>
${template_hooks['extra_head']()}
</head>
<body>
<a href="#content" class="sr-only sr-only-focusable">{{ messages("Skip to main content") }}</a>
<a href="#content" class="sr-only sr-only-focusable">${messages("Skip to main content")}</a>

<!-- Menubar -->

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container"><!-- This keeps the margins nice -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<div class="navbar navbar-fixed-top" id="navbar">
<div class="navbar-inner">
<div class="container">

<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ abs_link(_link("root", None, lang)) }}">
{% if logo_url %}
<img src="{{ logo_url }}" alt="{{ blog_title }}" id="logo">
{% endif %}

{% if show_blog_title %}
<span id="blog-title">{{ blog_title }}</span>
{% endif %}
</a>
</div><!-- /.navbar-header -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
{{ base.html_navigation_links() }}
{{ template_hooks['menu']() }}
</ul>
{% if search_form %}
{{ search_form }}
{% endif %}
</a>

<ul class="nav navbar-nav navbar-right">
{% block belowtitle %}
{% if translations|length > 1 %}
<li>{{ base.html_translations() }}</li>
{% endif %}
{% endblock %}
{% if show_sourcelink %}
{% block sourcelink %}{% endblock %}
{% endif %}
{{ template_hooks['menu_alt']() }}
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</nav>
<a class="brand" href="${abs_link(_link("root", None, lang))}">
%if logo_url:
<img src="${logo_url}" alt="${blog_title}" id="logo">
%endif

<!-- End of Menubar -->

<div class="container" id="content" role="main">
<div class="body-content">
<!--Body content-->
<div class="row">
{{ template_hooks['page_header']() }}
{% block content %}{% endblock %}
% if show_blog_title:
<span id="blog-title">${blog_title}</span>
% endif
</a>
<!-- Everything you want hidden at 940px or less, place within here -->
<div class="nav-collapse collapse">
<ul class="nav">
${base.html_navigation_links()}
${template_hooks['menu']()}
</ul>
%if search_form:
${search_form}
%endif
<ul class="nav pull-right">
<%block name="belowtitle">
%if len(translations) > 1:
<li>${base.html_translations()}</li>
%endif
</%block>
% if show_sourcelink:
<li><%block name="sourcelink"></%block></li>
%endif
${template_hooks['menu_alt']()}
</ul>
</div>
</div>
<!--End of body content-->

<footer>
{{ content_footer }}
{{ template_hooks['page_footer']() }}
</footer>
</div>
</div>

{{ base.late_load_js() }}
<!-- End of Menubar -->
<div class="container-fluid" id="content" role="main">
<!--Body content-->
<div class="row-fluid">
<div class="span2"></div>
<div class="span8">
${template_hooks['page_header']()}
<%block name="content"></%block>
</div>
</div>
<!--End of body content-->
</div>
<div class="footerbox">
${content_footer}
${template_hooks['page_footer']()}
</div>
${base.late_load_js()}
<script>$('a.image-reference:not(.islink)').colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script>
<!-- fancy dates -->
<script>
moment.locale("{{ momentjs_locales[lang] }}");
fancydates({{ date_fanciness }}, {{ js_date_format }});
moment.locale("${momentjs_locales[lang]}");
fancydates(${date_fanciness}, ${js_date_format});
</script>
<!-- end fancy dates -->
{% block extra_js %}{% endblock %}
{% if annotations and post and not post.meta('noannotations') %}
{{ notes.code() }}
{% elif not annotations and post and post.meta('annotations') %}
{{ notes.code() }}
{% endif %}
{{ body_end }}
{{ template_hooks['body_end']() }}
<%block name="extra_js"></%block>
% if annotations and post and not post.meta('noannotations'):
${notes.code()}
% elif not annotations and post and post.meta('annotations'):
${notes.code()}
% endif
${body_end}
${template_hooks['body_end']()}
</body>
</html>
Loading