Skip to content

Commit

Permalink
Merge branch 'release/2.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Sep 29, 2021
2 parents e1ef3fb + dfff2a5 commit b04d992
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 6 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# v2.0.4
## 09/29/2021

1. [](#new)
* Added simple gallery modular page for `lightbox-gallery` plugin
2. [](#bugfix)
* Fixed `radio` form field error when admin isn't installed
* Translate `grid size` text

# v2.0.3
## 06/08/2020

Expand Down
10 changes: 5 additions & 5 deletions blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Quark
slug: quark
type: theme
version: 2.0.3
version: 2.0.4
description: New Grav Default Theme
icon: microchip
icon: microchip
author:
name: Team Grav
email: devs@getgrav.org
url: http://getgrav.org
url: https://getgrav.org
homepage: https://github.com/getgrav/grav-theme-quark
demo: https://demo.getgrav.org/onepage-skeleton
keywords: quark, spectre, theme, core, modern, fast, responsive, html5, css3
Expand Down Expand Up @@ -35,7 +35,7 @@ form:

grid-size:
type: select
label: Grid size
label: THEME_QUARK.ADMIN.GRID_SIZE
help: The maximum width of the theme
size: small
options:
Expand Down Expand Up @@ -173,4 +173,4 @@ form:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool
type: bool
2 changes: 2 additions & 0 deletions languages.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
en:
THEME_QUARK:
ADMIN:
GRID_SIZE: Grid size
BLOG:
ITEM:
CONTINUE_READING: Continue reading...
Expand Down
2 changes: 1 addition & 1 deletion templates/forms/fields/radio/radio.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{% if required %}required="required"{% endif %}
/>
<i class="form-icon"></i>
{% if grav.twig.twig.filters['tu'] is defined %}{{ text|tu|raw }}{% else %}{{ text|t|raw }}{% endif %}
{{ text|t|raw }}
</label>
</div>
{% endfor %}
Expand Down
83 changes: 83 additions & 0 deletions templates/modular/gallery.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{% set styling %}
.lightbox-gallery {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}

.lightbox-gallery .lightbox-gallery__columns {
display: flex;
flex-wrap: wrap;
margin: 0 -10px;
}

.lightbox-gallery .lightbox-gallery__column {
width: 50%;
padding: 0 10px;
margin-bottom: 20px;
}

.lightbox-gallery img {
display: block;
border-radius: 5px;
transition: all .2s ease-in-out;
}

.lightbox-gallery img:hover {
filter: brightness(60%);
transform: scale(1.05);
}

@media only screen and (min-width: 600px) {
.lightbox-gallery .lightbox-gallery__column {
width: calc(100% / 3);
}
}

@media only screen and (min-width: 1000px) {
.lightbox-gallery .lightbox-gallery__column {
width: 25%;
}
}

.lightbox-gallery .hidden {
display: none;
}
{% endset %}

{% do assets.addInlineCss(styling) %}

{% block module_content %}
{% set data = page.header.gallery %}
{% set thumb_width = data.thumb.width|default(600) %}
{% set thumb_height = data.thumb.height|default(450) %}

<div class="lightbox-gallery">
<div class="lightbox-gallery__columns">
{% set gallery = md5(page.url) %}
{% for item in data.items %}
<div class="lightbox-gallery__column">
{% set item_image = page.media[item.image] %}
{% if item.title %}
{% set title = item.title %}
{% endif %}
{% if item.desc %}
{% set desc = ".desc-" ~ md5(item.desc) %}
{% endif %}
{% set content = item_image.cropZoom(thumb_width,thumb_height).html(title, title) %}
{% set image = item_image.url %}
{% include "partials/lightbox.html.twig" %}
</div>
{% endfor %}
</div>
<div class="hidden">
{% for item in data.items %}
{% if item.desc %}
<div class="glightbox-desc desc-{{ md5(item.desc) }}">
<p>{{ item.desc|markdown(false) }}</p>
</div>
{% endif %}
{% endfor %}
</div>
</div>
{% endblock %}

0 comments on commit b04d992

Please sign in to comment.