Merge branch 'release/1.6.0'

This commit is contained in:
Flavio Copes 2016-12-09 17:00:09 +01:00
commit 4bba46244b
13 changed files with 102 additions and 45 deletions

View file

@ -1,3 +1,13 @@
# v1.6.0
## 12/09/2016
1. [](#new)
* Add an option to have a sticky menu. Also added blueprint configuration to turn in on from the admin. Disabled by default. Uses https://github.com/bigspotteddog/ScrollToFixed
1. [](#improved)
* Invert order of previous and next button in the blog posts navigation
1. [](#bugfix)
* Fix forms not working as expected. Drop the form twig overrides as they break the forms, and don't really customise the output
# v1.5.0
## 07/14/2016

View file

@ -1,5 +1,5 @@
name: Deliver
version: 1.5.0
version: 1.6.0
description: "Deliver theme is a port of the Michael Reimer's Deliver Free PSD theme."
icon: newspaper-o
author:
@ -11,3 +11,28 @@ demo: http://demo.getgrav.org/deliver-skeleton/
keywords: deliver, theme, modern, fast, responsive, html5, css3
bugs: https://github.com/getgrav/grav-theme-deliver/issues
license: MIT
form:
validation: loose
fields:
dropdown.enabled:
type: toggle
label: Dropdown in navbar
highlight: 1
default: 0
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool
sticky_menu.enabled:
type: toggle
label: Sticky menu
highlight: 1
default: 0
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool

View file

@ -95,7 +95,7 @@ b, strong, label, th {
#header {
position: absolute;
z-index: 10;
z-index: 10000;
width: 100%;
height: 12rem;
background-color: rgba(255, 255, 255, 0.9);
@ -104,6 +104,16 @@ b, strong, label, th {
height: 50%; }
#header .fa {
color: #000; }
#header .fixed {
background: #fff;
padding-left: 14rem;
padding-right: 14rem;
position: fixed;
top: 0;
left: 0;
width: 100%;
opacity: 0.9;
box-shadow: 0 0px 20px 0px rgba(0, 0, 0, 0.2); }
@media only all and (max-width: 47.938em) {
#header .logo h3 {
font-size: 1.9rem; } }
@ -216,6 +226,9 @@ b, strong, label, th {
#header #navbar .panel-activation {
display: inline-block; } }
.modular.header-image #header .fixed {
background: #666; }
.header-image.fullwidth #body {
padding-left: 0;
padding-right: 0; }

File diff suppressed because one or more lines are too long

View file

@ -1,3 +1,5 @@
enabled: true
dropdown:
enabled: false
sticky_menu:
enabled: false

15
js/fixed-header.js Normal file
View file

@ -0,0 +1,15 @@
$(document).ready(function() {
var navbar = $('#navbar');
var navbarOffset = navbar.offset().top;
$(window).scroll(function(){
var scroll = $(window).scrollTop();
if (scroll >= navbarOffset) {
navbar.height(navbar.height());
navbar.addClass('fixed');
} else {
navbar.removeClass('fixed');
}
});
});

1
js/jquery-scrolltofixed-min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -3,7 +3,7 @@
#header {
@extend .padding-horiz;
position: absolute;
z-index: 10;
z-index: 10000;
width: 100%;
height: $header-height;
background-color: rgba(255,255,255,0.90);
@ -16,6 +16,18 @@
color: $black;
}
.fixed {
background: #fff;
padding-left: 14rem;
padding-right: 14rem;
position: fixed;
top: 0;
left: 0;
width: 100%;
opacity: 0.9;
box-shadow: 0 0px 20px 0px rgba(0,0,0,0.2);
}
.logo {
h3 {
@extend %vertical-align;
@ -189,6 +201,10 @@
}
}
.modular.header-image #header .fixed {
background: #666;
}
.header-image {
&.fullwidth {
#body {

View file

@ -1,3 +0,0 @@
{% for field in form.fields %}
<div><strong>{{ field.label }}</strong>: {{ form.value(field.name)|e }}</div>
{% endfor %}

View file

@ -1,3 +0,0 @@
{% for field in form.fields %}
{{ field.label }}: {{ form.value(field.name)|e }}
{% endfor %}

View file

@ -1,21 +0,0 @@
<div class="alert">{{ form.message }}</div>
<form name="{{ form.name }}"
action="{{ uri.rootUrl ~ (form.action|default(page.route)) }}"
method="{{ form.method|upper|default('POST') }}">
{% for field in form.fields %}
{% set value = form.value(field.name) %}
<div>
{% include "forms/fields/#{field.type}/#{field.type}.html.twig" %}
</div>
{% endfor %}
<div class="buttons">
{% for button in form.buttons %}
<button class="button" type="{{ button.type|default('submit') }}">{{ button.value|default('Submit') }}</button>
{% endfor %}
</div>
{{ nonce_field('form', 'form-nonce') }}
</form>

View file

@ -33,6 +33,10 @@
{% do assets.addJs('theme://js/deliver.js') %}
{% do assets.addJs('theme://js/slidebars.min.js') %}
{% do assets.addJs('theme://js/jquery.slideme2.js') %}
{% if theme_config.sticky_menu.enabled %}
{% do assets.addJs('theme://js/jquery-scrolltofixed-min.js') %}
{% do assets.addJs('theme://js/fixed-header.js') %}
{% endif %}
{% endblock %}
{{ assets.js() }}

View file

@ -22,14 +22,12 @@
<i class="fa fa-calendar"></i>
{{ page.date|date("d") }}, {{ page.date|date("M") }}
</span>
{% if page.header.author %}
<span class="list-blog-author">
<i class="fa fa-user"></i>
{{ page.header.author }}
</span>
{% endif %}
{% if page.taxonomy.tag %}
<ul class="tags">
<i class="fa fa-tag"></i>
@ -62,12 +60,12 @@
{% if show_prev_next %}
<p class="prev-next">
{% if not page.isFirst %}
<a class="button" href="{{ page.nextSibling.url }}"><i class="fa fa-chevron-left"></i> Next Post</a>
{% if not page.isLast %}
<a class="button" href="{{ page.prevSibling.url }}"><i class="fa fa-chevron-left"></i> Previous Post</a>
{% endif %}
{% if not page.isLast %}
<a class="button" href="{{ page.prevSibling.url }}">Previous Post <i class="fa fa-chevron-right"></i></a>
{% if not page.isFirst %}
<a class="button" href="{{ page.nextSibling.url }}">Next Post <i class="fa fa-chevron-right"></i></a>
{% endif %}
</p>
{% endif %}