Merge branch 'release/1.0.2'

This commit is contained in:
Andy Miller 2015-02-19 16:27:29 -07:00
commit 37387521b6
7 changed files with 132 additions and 3 deletions

View file

@ -1,3 +1,10 @@
# v1.0.2
## 02/19/2015
2. [](#improved)
* Added SimpleSearch capability
* Implemented new `param_sep` variable from Grav 0.9.18
# v1.0.1 # v1.0.1
## 02/10/2015 ## 02/10/2015

View file

@ -1,5 +1,5 @@
name: Deliver name: Deliver
version: 1.0.1 version: 1.0.2
description: "Deliver theme is a port of the Michael Reimer's Deliver Free PSD theme." description: "Deliver theme is a port of the Michael Reimer's Deliver Free PSD theme."
icon: newspaper-o icon: newspaper-o
author: author:

View file

@ -34,7 +34,7 @@
<ul class="tags"> <ul class="tags">
<i class="fa fa-tag"></i> <i class="fa fa-tag"></i>
{% for tag in page.taxonomy.tag %} {% for tag in page.taxonomy.tag %}
<li><a href="{{ base_url }}/tag:{{ tag }}">{{ tag }}</a></li> <li><a href="{{ base_url }}/tag{{ config.system.param_sep }}{{ tag }}">{{ tag }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}

View file

@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% block head %}
<meta charset="utf-8" />
<title>{% if header.title %}{{ header.title }} | {% endif %}{{ site.title }}</title>
{% include 'partials/metadata.html.twig' %}
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="icon" type="image/png" href="{{ theme_url }}/images/favicon.png" />
{% block stylesheets %}
{% do assets.addCss('theme://css-compiled/nucleus.css',102) %}
{% do assets.addCss('theme://css-compiled/template.css',101) %}
{% do assets.addCss('theme://css/custom.css',100) %}
{% do assets.addCss('theme://css/font-awesome.min.css',100) %}
{% do assets.addCss('theme://css/slidebars.min.css') %}
{% do assets.addCss('theme://css/slideme.css') %}
{% if browser.getBrowser == 'msie' and browser.getVersion == 10 %}
{% do assets.addCss('theme://css/nucleus-ie10.css') %}
{% endif %}
{% if browser.getBrowser == 'msie' and browser.getVersion >= 8 and browser.getVersion <= 9 %}
{% do assets.addCss('theme://css/nucleus-ie9.css') %}
{% do assets.addCss('theme://css/pure-0.5.0/grids-min.css') %}
{% do assets.addCss('theme://js/html5shiv-printshiv.min.js') %}
{% endif %}
{% endblock %}
{{ assets.css() }}
{% block javascripts %}
{% do assets.addJs('theme://js/jquery-2.1.1.min.js',101) %}
{% do assets.addJs('theme://js/modernizr.custom.71422.js',100) %}
{% do assets.addJs('theme://js/deliver.js') %}
{% do assets.addJs('theme://js/slidebars.min.js') %}
{% do assets.addJs('theme://js/jquery.slideme2.js') %}
{% endblock %}
{{ assets.js() }}
{% endblock head%}
</head>
<body id="top" class="modular header-lite fullwidth">
<div id="sb-site">
{% block header %}
<header id="header">
<div class="logo">
<h3><a href="{{ base_url == '' ? '/' : base_url }}">{{ config.site.title }}</a></h3>
{% block social %}
{% include 'partials/social.html.twig' %}
{% endblock %}
</div>
<div id="navbar">
{% block header_extra %}{% endblock %}
{% block header_navigation %}
{% include 'partials/navigation.html.twig' %}
{% endblock %}
{% include 'partials/search.html.twig' %}
<span class="panel-activation sb-toggle-left navbar-left menu-btn fa fa-bars"></span>
</div>
</header>
{% endblock %}
{% block showcase %}{% endblock %}
{% block body %}
<section id="body" class="{{ class }}">
{% block content %}{% endblock %}
{% block footer %}
{% include 'modular/footer.html.twig' %}
{% endblock %}
</section>
{% endblock %}
</div>
<div class="sb-slidebar sb-left sb-width-thin">
<div id="panel">
{% include 'partials/navigation.html.twig' %}
</div>
</div>
{% block bottom %}
<script>
$(function () {
$(document).ready(function() {
$.slidebars({
hideControlClasses: true,
scrollLock: true
});
});
});
</script>
{% endblock %}
</body>
</html>

View file

@ -0,0 +1,13 @@
<input type="text" placeholder="Search..." value="{{ query }}" data-searchsidebar-input="{{ base_url_relative }}{{ config.plugins.simplesearch.route}}/query" />
<script>
jQuery(document).ready(function($){
var input = $('[data-searchsidebar-input]');
input.on('keypress', function(event) {
if (event.which == 13 && input.val().length > 3) {
event.preventDefault();
window.location.href = input.data('searchsidebar-input') + ':' + input.val();
}
});
});
</script>

View file

@ -5,7 +5,7 @@
<ul class="archives"> <ul class="archives">
{% for tax,value in taxlist[taxonomy] %} {% for tax,value in taxlist[taxonomy] %}
<li> <li>
<a href="{{ base_url }}/tag:{{ tax|e('url') }}">{{ tax }} <span>({{ tax|length }})</span></a> <a href="{{ base_url }}/tag{{ config.system.param_sep }}{{ tax|e('url') }}">{{ tax }} <span>({{ tax|length }})</span></a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>

View file

@ -0,0 +1,17 @@
{% extends 'partials/simplesearch_base.html.twig' %}
{% block content %}
<div class="content-wrapper simplesearch">
<h1 class="search-header">Search Results</h1>
<div class="center">
{% include 'partials/simplesearch_searchbox.html.twig' %}
</div>
{% set body_classes = 'bar' %}
<p>Query: <strong>{{ query }}</strong> found {{ search_results.count }} {{ 'result'|pluralize(search_results.count) }}</p>
{% for page in search_results %}
{% include 'partials/simplesearch_item.html.twig' with {'page':page} %}
{% endfor %}
</div>
{% endblock %}