Skip to content

Commit

Permalink
Merge branch 'release/2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Aug 9, 2019
2 parents 5a9ff09 + f6e4964 commit 3a832dc
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 17 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# v2.0.2
## 08/09/2019

1. [](#improved)
* Allow for overriding of `{% block content %}{% endblock %}`
* Improved default `.table` styling
1. [](#bugfix)
* Fixed issue with Prism Highlight [prism-highlight#1](https://github.com/trilbymedia/grav-plugin-prism-highlight/issues/1)
* Use slug for onpage links [#115](https://github.com/getgrav/grav-theme-quark/issues/115)
* Fixed 2 minor YAML linting issues

# v2.0.1
## 05/09/2019

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Quark
version: 2.0.1
version: 2.0.2
description: New Grav Default Theme
icon: microchip
author:
Expand Down
2 changes: 1 addition & 1 deletion blueprints/blog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ child_type: item

rules:
slug:
pattern: "[a-z][a-z0-9_\-]+"
pattern: "[a-z][a-z0-9_-]+"
min: 2
max: 80

Expand Down
2 changes: 1 addition & 1 deletion blueprints/item.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ form:
toggleable: true
label: Image File
help: image filename that exists in the page folder. If not provided, will use the first image found.
placeholder: For example: myimage.jpg
placeholder: "For example: myimage.jpg"

header.header_image_width:
type: text
Expand Down
8 changes: 6 additions & 2 deletions css-compiled/theme.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css-compiled/theme.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion quark.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ public function onTwigInitialized()

}

}
}
18 changes: 17 additions & 1 deletion scss/theme/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ img {
max-width: 100%;
}

// Tables
.table > table {
border-spacing: 0;
border-collapse: collapse;
width: 100%;
}


// Codeblocks
pre code, pre.xdebug-var-dump{
Expand All @@ -73,8 +80,16 @@ pre code, pre.xdebug-var-dump{
overflow-x: auto;
}

pre[class*="language-"] {
code {
border-radius: inherit;
padding: 0 !important;
overflow-x: initial;
}
}

pre {
code:not(.hljs) {
code:not(.hljs):not([class*="language-"]) {
background: #f8f8f8;
}
}
Expand Down Expand Up @@ -160,3 +175,4 @@ ol {
}
}


3 changes: 3 additions & 0 deletions templates/blocks/base.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% block content_surround %}
{% block content %}{% endblock %}
{% endblock %}
10 changes: 3 additions & 7 deletions templates/modular.html.twig
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{% extends 'partials/base.html.twig' %}

{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}

{% import _self as macro %}

{% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}

{% block javascripts %}
Expand Down Expand Up @@ -33,7 +29,7 @@
<ul class="navigation">
{% for module in page.collection() if module.header.visible is not same as(false) %}
{% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
<li><a class="{{ current_module }}" href="#{{ macro.pageLinkName(module.menu) }}">{{ module.menu }}</a></li>
<li><a class="{{ current_module }}" href="#{{ module.menu|hyphenize }}">{{ module.menu }}</a></li>
{% endfor %}
{% for mitem in site.menu %}
<li>
Expand All @@ -51,14 +47,14 @@

{% block hero %}
{% for module in page.collection() if module.template == 'modular/hero' %}
<div id="{{ macro.pageLinkName(module.menu) }}"></div>
<div id="{{ module.menu|hyphenize }}"></div>
{{ module.content|raw }}
{% endfor %}
{% endblock %}

{% block body %}
{% for module in page.collection() if module.template != 'modular/hero' %}
<div id="{{ macro.pageLinkName(module.menu) }}"></div>
<div id="{{ module.menu|hyphenize }}"></div>
{{ module.content|raw }}
{% endfor %}
{% endblock %}
7 changes: 5 additions & 2 deletions templates/partials/base.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% set body_classes = body_class(['header-fixed', 'header-animated', 'header-dark', 'header-transparent', 'sticky-footer']) %}
{% set grid_size = theme_var('grid-size') %}
{% set compress = theme_var('production-mode') ? '.min.css' : '.css' %}
{% use 'blocks/base.html.twig' %}
<!DOCTYPE html>
<html lang="{{ grav.language.getActive ?: grav.config.site.default_lang }}">
<head>
Expand Down Expand Up @@ -38,7 +39,7 @@
</head>
<body id="top" class="{% block body_classes %}{{ body_classes }}{% endblock %}">
<div id="page-wrapper">
{% block header deferred %}
{% block header %}
<section id="header" class="section">
<section class="container {{ grid_size }}">
<nav class="navbar">
Expand Down Expand Up @@ -79,7 +80,7 @@
{% block messages %}
{% include 'partials/messages.html.twig' ignore missing %}
{% endblock %}
{% block content %}{% endblock %}
{{ block('content_surround') }}
</section>
</section>
{% endblock %}
Expand All @@ -91,6 +92,7 @@
{% include 'partials/footer.html.twig' %}
{% endblock %}

{% block mobile %}
<div class="mobile-container">
<div class="overlay" id="overlay">
<div class="mobile-logo">
Expand All @@ -101,6 +103,7 @@
</nav>
</div>
</div>
{% endblock %}

{% block bottom %}
{{ assets.js('bottom')|raw }}
Expand Down

0 comments on commit 3a832dc

Please sign in to comment.