Switch to new theme

This commit is contained in:
Don Harper 2017-02-22 11:10:22 -06:00
parent 826c907a85
commit fac0ef25cb
13 changed files with 11578 additions and 1 deletions

View file

@ -40,7 +40,8 @@ NAVIGATION_LINKS = {
#THEME = "slate"
#THEME = "duckland"
#THEME = "superhero"
THEME = "material-theme"
#THEME = "material-theme"
THEME = "slidemenu"
TIMEZONE = "CDT6CST"
DATE_FORMAT = '%Y-%m-%d'
JS_DATE_FORMAT = 'YYYY-MM-DD'

30
themes/slidemenu/LICENSE Normal file
View file

@ -0,0 +1,30 @@
Copyright © 2016, Chris Warrick.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the author of this software nor the names of
contributors to this software may be used to endorse or promote
products derived from this software without specific prior written
consent.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -0,0 +1,47 @@
slidemenu theme for Nikola
==========================
A minimalistic, responsive-ish theme for Nikola, based on the `base-jinja` theme, with a slide-out menu.
Customization
-------------
You can customize the theme by creating a `custom.css` file (`files/assets/css/custom.css`). Copy-paste the `/* Color preferences */` section from the provided `slidemenu.css` file and choose your own color scheme. Make sure to change `THEME_COLOR` in `conf.py` to fit.
The theme defaults to the system font stack (taken from Bootstrap 4), but you can use your own fonts by editing CSS.
License
-------
*This theme was originally created in January 2016 for a private project and is now being made available to the public, with some modifications.*
Copyright © 2016, [Chris Warrick](https://chriswarrick.com/).
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the author of this software nor the names of
contributors to this software may be used to endorse or promote
products derived from this software without specific prior written
consent.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -0,0 +1,281 @@
/* CSS for slidemenu
* Copyright © 2016, Chris Warrick. All rights reserved.
* License: 3-clause BSD
*/
/* Color preferences */
#header, nav#menu li.active a, nav#menu li a:hover, #menu-toggle,
button.form-control, a.btn {
background: #5670d4;
}
.entry-title, .entry-title a {
color: #5670d4;
}
nav#menu li.group, ul.pager li a, input.form-control {
border: 1px solid #5670d4;
}
nav#menu, nav#menu li a, #menu-toggle.active {
background: #ccf;
}
#menu-toggle:focus, #menu-toggle:active {
outline: none;
color: #ccf;
}
#menu-toggle.active:focus, #menu-toggle.active:active {
color: #00c;
}
/* End of color preferences */
/* Display CSS */
body {
font-size: 11pt;
margin: 0 auto;
padding: 0;
}
body, #menu-toggle, input.form-control, button.form-control, a.btn {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#container {
max-width: 1200px;
margin-top: 0;
}
@media (max-width: 840px) {
body {
margin-left: 20px;
margin-right: 20px;
}
}
@media (min-width: 841px) and (max-width: 999px) {
#container {
max-width: 800px;
}
}
@media (min-width: 1000px) and (max-width: 1400px) {
#container {
max-width: 960px;
}
}
#header {
margin-top: 0;
text-align: center;
min-height: 100px;
border-bottom-left-radius: 30px;
border-bottom-right-radius: 30px;
box-shadow: #000 0px 0px 20px;
}
#header #brand {
margin: 0;
padding: 0;
}
#header #brand a {
color: white;
line-height: 100px;
font-size: 60px;
text-decoration: none;
}
#footer {
text-align: center;
color: #555;
}
table {
margin: 0 auto;
width: 95%;
table-layout: fixed;
border-spacing: 0;
border-collapse: collapse;
}
.table td, .table th {
border: 1px solid #000;
}
.table th {
font-weight: bold;
}
nav#menu {
width: 300px;
height: 100%;
margin: 0;
transition: all 1s ease;
position: fixed;
left: 0px;
top: 0px;
overflow: auto;
box-shadow: #000 3px 3px 5px;
}
nav#menu ul {
list-style: none;
padding: 0;
margin: 0;
}
nav#menu ul li {
display: block;
margin-right: 0;
border-radius: 20px;
}
nav#menu li a {
margin: 0;
width: 100%;
text-decoration: none;
display: block;
height: 40px;
line-height: 40px;
border-radius: 20px;
transition: all 0.3s ease;
}
nav#menu li a {
color: #000;
}
nav#menu li.active a {
color: white;
}
nav#menu li a:hover {
color: white;
}
nav#menu li .group-header {
height: 40px;
font-weight: bold;
text-transform: uppercase;
}
nav#menu li.group {
margin: 10px 0;
}
nav#menu.hide {
left: -300px;
box-shadow: none;
}
#menu-toggle {
margin: 0;
height: 40px;
width: 100px;
text-align: center;
border: 0;
color: white;
border-bottom-right-radius: 20px;
font-size: 20px;
line-height: 30px;
position: fixed;
top: 0px;
left: 0px;
transition: all 1s ease;
box-shadow: #000 3px 3px 5px;
z-index: 2;
}
#menu-toggle.active {
color: #000;
left: 300px;
}
.entry-title, .entry-title a {
text-align: center;
text-decoration: none;
font-size: 20pt;
}
ul.pager {
display: block;
list-style: none;
padding: 0;
text-align: center;
}
ul.pager li {
display: inline;
margin: 0 15px;
}
ul.pager li a {
display: inline-block;
border-radius: 12.5px;
height: 25px;
line-height: 25px;
text-decoration: none;
color: #000;
padding: 0 10px;
text-align: center;
}
ul.pager .previous a:before {
content: "« ";
}
ul.pager .next a:after {
content: " »";
}
/* reset from base theme */
.postindexpager .pager .next:before,
.postindexpager .pager .previous:before,
.postpromonav .pager .next:after,
.postpromonav .pager .previous:before {
content: "";
}
.lead {
font-size: 1.3em;
}
input.form-control {
font-size: 15px;
line-height: 30px;
margin-right: 10px;
border-radius: 15px;
padding: 5px;
height: 20px;
}
button.form-control, a.btn {
border: 0;
border-radius: 15px;
height: 30px;
color: white;
display: inline-block;
padding: 0 10px;
font-size: 15px;
line-height: 30px;
}
button.form-control:hover, a.btn:hover {
color: #ddd;
}
pre.code {
border: 1px solid #888;
border-radius: 4px;
padding: 15px;
}
div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning, div.sidebar {
border: 1px solid #888;
}
div.admonition p.admonition-title, div.hint p.admonition-title, div.important p.admonition-title, div.note p.admonition-title, div.tip p.admonition-title, div.sidebar p.sidebar-title, div.attention p.admonition-title, div.caution p.admonition-title, div.danger p.admonition-title, div.error p.admonition-title, div.warning p.admonition-title {
border-bottom: 1px solid #888;
}

11008
themes/slidemenu/assets/js/jquery.js vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,4 @@
$('#menu-toggle').click(function() {
$('#menu').toggleClass('hide');
$('#menu-toggle').toggleClass('active');
});

2
themes/slidemenu/bundles Normal file
View file

@ -0,0 +1,2 @@
assets/css/all.css=rst.css,code.css,theme.css,slidemenu.css,custom.css
assets/css/all-nocdn.css=rst.css,code.css,theme.css,slidemenu.css,custom.css

1
themes/slidemenu/engine Normal file
View file

@ -0,0 +1 @@
jinja

1
themes/slidemenu/parent Normal file
View file

@ -0,0 +1 @@
base-jinja

View file

@ -0,0 +1,68 @@
{# -*- coding: utf-8 -*- #}
{% import 'base_helper.tmpl' as base with context %}
{% macro html_header() %}
<header id="header">
{{ html_site_title() }}
{{ html_translation_header() }}
{{ html_navigation_links() }}
{% if search_form %}
<div class="searchform" role="search">
{{ search_form }}
</div>
{% endif %}
</header>
{{ template_hooks['page_header']() }}
{% endmacro %}
{% macro html_site_title() %}
<h1 id="brand"><a href="{{ abs_link(_link("root", None, lang)) }}" title="{{ blog_title|e }}" rel="home">
{% if logo_url %}
<img src="{{ logo_url }}" alt="{{ blog_title|e }}" id="logo">
{% endif %}
{% if show_blog_title %}
<span id="blog-title">{{ blog_title|e }}</span>
{% endif %}
</a></h1>
<button type="button" id="menu-toggle">Menu</button>
{% endmacro %}
{% macro html_navigation_links() %}
<nav id="menu" class="hide">
<ul>
{% for url, text in navigation_links[lang] %}
{% if isinstance(url, tuple) %}
<li class="group"><span class="group-header">{{ text }}</span>
<ul>
{% for suburl, text in url %}
{% if rel_link(permalink, suburl) == "#" %}
<li class="active"><a href="{{ permalink }}">{{ text }} <span class="sr-only">{{ messages("(active)", lang) }}</span></a></li>
{% else %}
<li><a href="{{ suburl }}">{{ text }}</a></li>
{% endif %}
{% endfor %}
</ul>
</li>
{% else %}
{% if rel_link(permalink, url) == "#" %}
<li class="active"><a href="{{ permalink }}">{{ text }} <span class="sr-only">{{ messages("(active)", lang) }}</span></a></li>
{% else %}
<li><a href="{{ url }}">{{ text }}</a></li>
{% endif %}
{% endif %}
{% endfor %}
{{ template_hooks['menu']() }}
{{ template_hooks['menu_alt']() }}
</ul>
</nav>
{% endmacro %}
{% macro html_translation_header() %}
{% if translations|length > 1 %}
<div id="toptranslations">
<h2>{{ messages("Languages:") }}</h2>
{{ base.html_translations() }}
</div>
{% endif %}
{% endmacro %}

View file

@ -0,0 +1,128 @@
{# -*- coding: utf-8 -*- #}
{% macro html_headstart() %}
<!DOCTYPE html>
<html \
prefix='
{% if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) %}
og: http://ogp.me/ns# article: http://ogp.me/ns/article#
{% endif %}
{% if comment_system == 'facebook' %}
fb: http://ogp.me/ns/fb#
{% endif %}
' \
{% if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) %}
vocab="http://ogp.me/ns" \
{% endif %}
{% if is_rtl %}
dir="rtl"
{% endif %}
lang="{{ lang }}">
<head>
<meta charset="utf-8">
{% if use_base_tag %}
<base href="{{ abs_link(permalink) }}">
{% endif %}
{% if description %}
<meta name="description" content="{{ description|e }}">
{% endif %}
<meta name="viewport" content="width=device-width">
{% if title == blog_title %}
<title>{{ blog_title|e }}</title>
{% else %}
<title>{{ title|e }} | {{ blog_title|e }}</title>
{% endif %}
{{ html_stylesheets() }}
<meta content="{{ theme_color }}" name="theme-color">
{{ html_feedlinks() }}
<link rel="canonical" href="{{ abs_link(permalink) }}">
{% if favicons %}
{% for name, file, size in favicons %}
<link rel="{{ name }}" href="{{ file }}" sizes="{{ size }}"/>
{% endfor %}
{% endif %}
{% if comment_system == 'facebook' %}
<meta property="fb:app_id" content="{{ comment_system_id }}">
{% endif %}
{% if prevlink %}
<link rel="prev" href="{{ prevlink }}" type="text/html">
{% endif %}
{% if nextlink %}
<link rel="next" href="{{ nextlink }}" type="text/html">
{% endif %}
{{ mathjax_config }}
{% if use_cdn %}
<!--[if lt IE 9]><script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
{% else %}
<!--[if lt IE 9]><script src="{{ url_replacer(permalink, '/assets/js/html5.js', lang) }}"></script><![endif]-->
{% endif %}
<script src="/assets/js/jquery.min.js"></script>
{{ extra_head_data }}
{% endmacro %}
{% macro late_load_js() %}
<script src="/assets/js/menu.js"></script>
{{ social_buttons_code }}
{% endmacro %}
{% macro html_stylesheets() %}
{% if use_bundles %}
{% if use_cdn %}
<link href="/assets/css/all.css" rel="stylesheet" type="text/css">
{% else %}
<link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
{% endif %}
{% else %}
<link href="/assets/css/rst.css" rel="stylesheet" type="text/css">
<link href="/assets/css/code.css" rel="stylesheet" type="text/css">
<link href="/assets/css/theme.css" rel="stylesheet" type="text/css">
<link href="/assets/css/slidemenu.css" rel="stylesheet" type="text/css">
{% if has_custom_css %}
<link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
{% endif %}
{% endif %}
{% if needs_ipython_css %}
<link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
{% endif %}
{% endmacro %}
{% macro html_feedlinks() %}
{% if rss_link %}
{{ rss_link }}
{% elif generate_rss %}
{% if translations|length > 1 %}
{% for language in translations|sort %}
<link rel="alternate" type="application/rss+xml" title="RSS ({{ language }})" href="{{ _link('rss', None, language) }}">
{% endfor %}
{% else %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ _link('rss', None) }}">
{% endif %}
{% endif %}
{% if generate_atom %}
{% if translations|length > 1 %}
{% for language in translations|sort %}
<link rel="alternate" type="application/atom+xml" title="Atom ({{ language }})" href="{{ _link('index_atom', None, language) }}">
{% endfor %}
{% else %}
<link rel="alternate" type="application/atom+xml" title="Atom" href="{{ _link('index_atom', None) }}">
{% endif %}
{% endif %}
{% endmacro %}
{% macro html_translations() %}
<ul class="translations">
{% for langname in translations|sort %}
{% if langname != lang %}
<li><a href="{{ abs_link(_link("root", None, langname)) }}" rel="alternate" hreflang="{{ langname }}">{{ messages("LANGUAGE", langname) }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endmacro %}