Permalink
Browse files

Fixes and some improvements

* Disqus break with title quotes
* Added new colors in some blueprints
* Carousel controls id broken
* Icon in dropdown
* Navbar color change from items header
  • Loading branch information...
ayozehd committed Nov 17, 2018
1 parent a4f801b commit e40f4cd00118126d6adf15e4368387134b8e4ad5
@@ -1,3 +1,13 @@
# v1.1.5
## 17-11-2018
1. [](#improved)
* Navbar color change from item headers
* Added new colors to blueprints
* Icon in dropdown menus
2. [](#bugfix)
* Fixed disqus bug when title has quotes
* Carousel controls id broken

# v1.1.4
## 10-11-2018

@@ -60,14 +60,15 @@ Templates supporting `style`:
* `text`

#### Styles supported
**Theme colors**
* primary
* success
* danger
* warning
* secondary
* info

Only in expert mode:
**All Colors**
* blue
* indigo
* purple
@@ -99,6 +100,7 @@ favicon:
navbar:
image:
icon:
override_page_style: true
style: default
dropdown: true
sticky: false
@@ -182,7 +184,7 @@ This is the default modular template. It supports `style` parameter to change ba

Create a simple [carousel](https://getbootstrap.com/docs/4.1/components/carousel/) in `page.header.slides` or setting up a [collection]((https://learn.getgrav.org/content/collections)) of your items from another page/folder. Remember slides overwrite collection, so we should remove first that parameter.

```
```yaml
title: Carousel
slide_interval: 5000
indicators: true
@@ -202,9 +204,9 @@ slides:

## Skills Modular

Template useful to display your best skills! Setup an array of values with text and style optional. Also you can set a different suffix `page.header.suffix` than %. Add some css classes in bars with `progress_classes`.
Template useful to display your best skills! Setup an array of values with text and optional style. Also you can set a different suffix `page.header.suffix` than %. Add some css classes in bars with `progress_classes`.

```
```yaml
title: Skills
style: cyan
progress_classes: progress-bar-striped
@@ -58,8 +58,14 @@ form:
success: Success
warning: Warning
danger: Danger
validate:
pattern: (dark|light|primary|secondary|info|success|warning|danger|blue|indigo|purple|pink|red|orange|yellow|green|teal|cyan)
blue: Blue
orange: Orange
red: Red
indigo: Indigo
pink: Pink
purple: Purple
teal: Teal
cyan: Cyan
header.buttons:
name: buttons
type: list
@@ -28,8 +28,6 @@ form:
success: Success
warning: Warning
danger: Danger
validate:
pattern: (dark|light|primary|secondary|info|success|warning|danger|blue|indigo|purple|pink|red|orange|yellow|green|teal|cyan)
header.layout:
type: select
label: ADMIN.MODULAR.ITEMS_LAYOUT
@@ -18,6 +18,7 @@ form:
label: ADMIN.STYLE
help: ADMIN.STYLE_HELP
toggleable: true
novalidate: true
options:
dark: Dark
light: Light
@@ -27,8 +28,6 @@ form:
success: Success
warning: Warning
danger: Danger
validate:
pattern: (null|dark|light|primary|secondary|info|success|warning|danger|blue|indigo|purple|pink|red|orange|yellow|green|teal|cyan)
header.text_align:
type: select
size: medium
@@ -61,6 +60,7 @@ form:
size: small
label: ADMIN.MODULAR.ICON_STYLE
default: primary
novalidate: true
options:
primary: Primary
dark: Dark
@@ -70,8 +70,6 @@ form:
success: Success
warning: Warning
danger: Danger
validate:
pattern: (dark|light|primary|secondary|info|success|warning|danger|blue|indigo|purple|pink|red|orange|yellow|green|teal|cyan)
.color:
type: colorpicker
label: ADMIN.MODULAR.CHOOSE_ICON_COLOR
@@ -27,8 +27,6 @@ form:
success: Success
warning: Warning
danger: Danger
validate:
pattern: (dark|light|primary|secondary|info|success|warning|danger|blue|indigo|purple|pink|red|orange|yellow|green|teal|cyan)
header.image_file:
type: pagemediaselect
label: ADMIN.ITEM.CHOOSE_HEADER_IMAGE
@@ -27,8 +27,16 @@ form:
success: Success
warning: Warning
danger: Danger
validate:
pattern: (null|dark|light|primary|secondary|info|success|warning|danger|blue|indigo|purple|pink|red|orange|yellow|green|teal|cyan)
blue: Blue
orange: Orange
green: Green
red: Red
indigo: Indigo
pink: Pink
purple: Purple
yellow: Yellow
teal: Teal
cyan: Cyan
header.skills:
type: list
label: ADMIN.MODULAR.SKILLS_LIST
@@ -44,6 +52,7 @@ form:
label: ADMIN.STYLE
help: ADMIN.STYLE_HELP
toggleable: true
novalidate: true
options:
dark: Dark
light: Light
@@ -53,8 +62,16 @@ form:
success: Success
warning: Warning
danger: Danger
validate:
pattern: (null|dark|light|primary|secondary|info|success|warning|danger|blue|indigo|purple|pink|red|orange|yellow|green|teal|cyan)
blue: Blue
orange: Orange
green: Green
red: Red
indigo: Indigo
pink: Pink
purple: Purple
yellow: Yellow
teal: Teal
cyan: Cyan
.value:
type: text
label: ADMIN.VALUE
@@ -28,8 +28,16 @@ form:
success: Success
warning: Warning
danger: Danger
validate:
pattern: (null|dark|light|primary|secondary|info|success|warning|danger|blue|indigo|purple|pink|red|orange|yellow|green|teal|cyan)
blue: Blue
orange: Orange
green: Green
red: Red
indigo: Indigo
pink: Pink
purple: Purple
yellow: Yellow
teal: Teal
cyan: Cyan
header.text_align:
type: select
label: ADMIN.TEXT_ALIGN
@@ -6,6 +6,7 @@ navbar:
image:
icon:
style: light
override_page_style: true
dropdown: true
sticky: false
sidebar:
@@ -31,6 +31,8 @@ en:
BRAND_LOGO_IMAGE: Brand/Logo Image
BRAND_LOGO_IMAGE_HELP: Upload an image into navbar
BRAND_ICON: Brand icon
OVERRIDE_PAGE_STYLE: Override Page Style
OVERRIDE_PAGE_STYLE_HELP: Change navbar color when a page style header is defined. If disabled, "Navbar style" will keep value from theme settings in whole site.
NAVBAR_STYLE: Navbar style
ITEMS: Items
SHOW_PREV_NEXT_BUTTONS: Show Previous/Next buttons
@@ -205,6 +207,8 @@ es:
BRAND_LOGO_IMAGE: Logo o imagen de cabecera
BRAND_LOGO_IMAGE_HELP: Subir una imagen a la barra de navegación
BRAND_ICON: Icono de cabecera
OVERRIDE_PAGE_STYLE: Sobrescribir el estilo de página
OVERRIDE_PAGE_STYLE_HELP: Cambia el color de la navegación cuando algún estilo está definido en la cabecera. Si se desactiva, la navegación mantendrá la configuración del tema.
NAVBAR_STYLE: Estilo de barra de navegación
ITEMS: Elementos
SHOW_PREV_NEXT_BUTTONS: Mostrar botones anterior/siguiente
@@ -7,12 +7,12 @@
{% else %}
{% set slides = [] %}
{% endif %}

<div id="{{ page.id }}" class="carousel slide" data-ride="carousel">
{% if page.header.indicators is not defined or page.indicators != false %}
{% set carouselId = 'carousel' ~ page.id|slice(-1) %}
<div id="{{ carouselId }}" class="carousel slide" data-ride="carousel">
{% if page.header.indicators is not defined or page.header.indicators != false %}
<ol class="carousel-indicators">
{% for slide in slides %}
<li data-target="#{{ page.id }}" data-slide-to="{{ loop.index0 }}" class="active"></li>
<li data-target="#{{ carouselId }}" data-slide-to="{{ loop.index0 }}" class="active"></li>
{% endfor %}
</ol>
{% endif %}
@@ -25,12 +25,12 @@
{{ page.media[slide.image].html(slide.title, null, 'd-block w-100') }}
{% if slide.url %}</a>{% endif %}
{% else %}
<a href="{{ slide.url }}">
{{ slide.media.images|first.html(slide.title, null, 'd-block w-100') }}
</a>
<a href="{{ slide.url }}">
{{ slide.media.images|first.html(slide.title, null, 'd-block w-100') }}
</a>
{% endif %}
<div class="carousel-caption d-block d-md-block">
<h5>{{ slide.title }}</h5>
<h5>{{ slide.title }}</h5>
{% if isPageCollection %}
<p>{{ slide.summary }}</p>
{% else %}
@@ -42,11 +42,11 @@
</div>

{% if not page.header.hide_controls %}
<a class="carousel-control-prev" href="#{{ page.id }}" role="button" data-slide="prev">
<a class="carousel-control-prev" href="#{{ carouselId }}" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">{{ 'MODULAR.CAROUSEL_PREVIOUS'|t }}</span>
</a>
<a class="carousel-control-next" href="#{{ page.id }}" role="button" data-slide="next">
<a class="carousel-control-next" href="#{{ carouselId }}" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">{{ 'MODULAR.CAROUSEL_NEXT'|t }}</span>
</a>
@@ -48,7 +48,7 @@
</head>
<body id="top" class="{{ page.header.body_classes }}">
{% block header %}
<nav class="navbar navbar-expand-md {{ bsTools.navbarStyle(theme_config.navbar.style) }} {% if theme_config.navbar.sticky %}fixed-top{% endif %}"
<nav class="navbar navbar-expand-md {{ bsTools.navbarStyle(page.header.style, theme_config.navbar.style, theme_config.navbar.override_page_style)|trim }} {% if theme_config.navbar.sticky %}fixed-top{% endif %}"
role="navigation"
{% if theme_config.navbar.background_color %}style="background-color:{{ theme_config.navbar.background_color }}"{% endif %}>
<a class="navbar-brand" href="{{ base_url == '' ? '/' : base_url }}">
@@ -4,7 +4,7 @@
var disqus_config = function () {
this.page.url = '{{ page.url(true) }}';
this.page.identifier = '{{ page.id }}';
this.page.title = '{{ page.title }}';
this.page.title = '{{ page.title|raw|e('html') }}';
};
(function () { // DON'T EDIT BELOW THIS LINE
@@ -33,7 +33,7 @@
{% endif %}
</div>
<div class="btn-group" role="group" aria-label="Extra Links">
{{ bsTools.buttons(page.header.buttons, page.header.style, true, true, 'dark') }}
{{ bsTools.buttons(page.header.buttons, page.header.style, true, false, 'dark') }}
</div>
</div>
</div>
@@ -10,7 +10,10 @@
</a>
<div class="dropdown-menu" arial-labelledby="dropdown-{{ p.id }}"> {# Translation? #}
{% for c in p.children.visible %}
<a class="dropdown-item" href="{{ c.url }}">{{ c.menu }}</a>
<a class="dropdown-item" href="{{ c.url }}">
{% if c.header.icon %}<i class="fas fa-{{ c.header.icon }}"></i>{% endif %}
{{ c.menu }}
</a>
{% endfor %}
</div>
</li>
@@ -1,4 +1,4 @@
<div class="d-flex flex-row">
<div class="d-block">
{% for related_path, score in related_pages %}
{% set related = grav['pages'].get(related_path) %}
{% if related %}

0 comments on commit e40f4cd

Please sign in to comment.