chore: create production-v2 branch with content only
This branch contains ONLY: - Pages (config/www/user/pages/) - Themes (config/www/user/themes/) - Plugins (config/www/user/plugins/) - PRODUCTION.md - Minimal .gitignore Clean slate for production deployment. All development files, configs, scripts removed.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
{% block content_surround %}
|
||||
{% block content %}{% endblock %}
|
||||
{% endblock %}
|
||||
63
config/www/user/themes/quark/templates/blog.html.twig
Normal file
63
config/www/user/themes/quark/templates/blog.html.twig
Normal file
@@ -0,0 +1,63 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
{% set blog_image = page.media.images[page.header.hero_image] ?: page.media.images|first %}
|
||||
{% set collection = page.collection() %}
|
||||
{% set blog = page.find(header_var('blog_url')|defined(theme_var('blog-page'))) %}
|
||||
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog])|defined(true) %}
|
||||
{% set show_sidebar = header_var('show_sidebar', [page, blog])|defined(true) %}
|
||||
{% set show_pagination = header_var('show_pagination', [page, blog])|defined(true) %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{% do assets.addCss('theme://css/bricklayer.css') %}
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
{% do assets.add('theme://js/bricklayer.min.js') %}
|
||||
{% do assets.add('theme://js/scopedQuerySelectorShim.min.js') %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block hero %}
|
||||
{% include 'partials/hero.html.twig' with {id: 'blog-hero', content: page.content, hero_image: blog_image} %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<section id="body-wrapper" class="section blog-listing">
|
||||
<section class="container {{ grid_size }}">
|
||||
|
||||
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
||||
{% include 'partials/breadcrumbs.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
{% embed 'partials/layout.html.twig' with {blog: page} %}
|
||||
{% block item %}
|
||||
|
||||
<div class="bricklayer">
|
||||
{% for child in collection %}
|
||||
{% include 'partials/blog-list-item.html.twig' with {blog: page, page: child} %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if show_pagination and config.plugins.pagination.enabled and collection.params.pagination %}
|
||||
<div id="listing-footer">
|
||||
{% include 'partials/pagination.html.twig' with {base_url: page.url, pagination: collection.params.pagination} %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'partials/sidebar.html.twig' %}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
</section>
|
||||
</section>
|
||||
<script>
|
||||
//Bricklayer
|
||||
var bricklayer = new Bricklayer(document.querySelector('.bricklayer'))
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{{ page.content|raw }}
|
||||
|
||||
{{ comments_section() }}
|
||||
{% endblock %}
|
||||
5
config/www/user/themes/quark/templates/default.html.twig
Normal file
5
config/www/user/themes/quark/templates/default.html.twig
Normal file
@@ -0,0 +1,5 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{{ page.content|raw }}
|
||||
{% endblock %}
|
||||
12
config/www/user/themes/quark/templates/error.html.twig
Normal file
12
config/www/user/themes/quark/templates/error.html.twig
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div id="error">
|
||||
<div>
|
||||
<h1>{{ 'PLUGIN_ERROR.ERROR'|t }} {{ page.header.http_response_code }}</h1>
|
||||
<p>
|
||||
{{ page.content|raw }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,32 @@
|
||||
{% extends "forms/field.html.twig" %}
|
||||
|
||||
{% block label %}
|
||||
{% endblock %}
|
||||
|
||||
{% block input %}
|
||||
{% set id = field.id|default(field.name) ~ '-' ~ key %}
|
||||
<div class="{{ form_field_wrapper_classes ?: 'form-input-wrapper' }} {{ field.size }} {{ field.wrapper_classes }}">
|
||||
<label class="{{ form_field_checkbox_classes }}" for="{{ id|e }}">
|
||||
<input
|
||||
{# required attribute structures #}
|
||||
name="{{ (scope ~ field.name)|fieldName }}"
|
||||
value="{{ value|join(', ') }}"
|
||||
type="checkbox"
|
||||
{% if value == true %} checked="checked" {% endif %}
|
||||
|
||||
{# input attribute structures #}
|
||||
{% block input_attributes %}
|
||||
id="{{ id|e }}"
|
||||
{% if field.classes is defined %}class="{{ field.classes }}" {% endif %}
|
||||
{% if field.style is defined %}style="{{ field.style|e }}" {% endif %}
|
||||
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
|
||||
{% if field.autofocus in ['on', 'true', 1] %}autofocus="autofocus"{% endif %}
|
||||
{% if field.novalidate in ['on', 'true', 1] %}novalidate="novalidate"{% endif %}
|
||||
{% if required %}required="required"{% endif %}
|
||||
{% endblock %}
|
||||
/>
|
||||
<i class="form-icon"></i>
|
||||
{{ field.label|t|e }} {{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
|
||||
</label>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,44 @@
|
||||
{% extends "forms/field.html.twig" %}
|
||||
|
||||
{% set originalValue = value %}
|
||||
{% set value = (value is null ? field.default : value) %}
|
||||
{% if field.use == 'keys' and field.default %}
|
||||
{% set value = field.default|merge(value) %}
|
||||
{% endif %}
|
||||
|
||||
{% block global_attributes %}
|
||||
{{ parent() }}
|
||||
data-grav-keys="{{ field.use == 'keys' ? 'true' : 'false' }}"
|
||||
data-grav-field-name="{{ (scope ~ field.name)|fieldName }}"
|
||||
{% endblock %}
|
||||
|
||||
{% block input %}
|
||||
{% for key, text in field.options %}
|
||||
|
||||
{% set id = field.id|default(field.name) ~ '-' ~ key %}
|
||||
{% set name = field.use == 'keys' ? key : id %}
|
||||
{% set val = field.use == 'keys' ? '1' : key %}
|
||||
{% set checked = (field.use == 'keys' ? value[key] : key in value) %}
|
||||
{% set help = (key in field.help_options|keys ? field.help_options[key] : false) %}
|
||||
|
||||
<div class="checkboxes {{ form_field_wrapper_classes }} {{ field.wrapper_classes }}">
|
||||
<label class="{{ form_field_checkbox_classes }}" for="{{ id|e }}">
|
||||
<input type="checkbox"
|
||||
id="{{ id|e }}"
|
||||
value="{{ val|e }}"
|
||||
name="{{ (scope ~ field.name)|fieldName ~ '[' ~ name ~ ']' }}"
|
||||
{% if checked %}checked="checked"{% endif %}
|
||||
{% if field.classes is defined %}class="{{ field.classes }}" {% endif %}
|
||||
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
|
||||
|
||||
>
|
||||
<i class="form-icon"></i>
|
||||
{% if help %}
|
||||
<span class="hint--bottom" data-hint="{{ help|t|e('html_attr') }}">{{ text|t|e }}</span>
|
||||
{% else %}
|
||||
{{ text|t|e }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,26 @@
|
||||
{% extends "forms/field.html.twig" %}
|
||||
|
||||
{% set originalValue = value %}
|
||||
{% set value = (value is null ? field.default : value) %}
|
||||
|
||||
{% block input %}
|
||||
{% for key, text in field.options %}
|
||||
{% set id = field.id|default(field.name) ~ '-' ~ key %}
|
||||
|
||||
<div class="radio {{ form_field_wrapper_classes }} {{ field.wrapper_classes }}">
|
||||
<label class="{{ form_field_radio_classes }}" for="{{ id|e }}">
|
||||
<input type="radio"
|
||||
value="{{ key|e }}"
|
||||
id="{{ id|e }}"
|
||||
name="{{ (scope ~ field.name)|fieldName }}"
|
||||
{% if field.classes is defined %}class="{{ field.classes }}" {% endif %}
|
||||
{% if key == value %}checked="checked" {% endif %}
|
||||
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
|
||||
{% if required %}required="required"{% endif %}
|
||||
/>
|
||||
<i class="form-icon"></i>
|
||||
{{ text|t|raw }}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,3 @@
|
||||
{% set form_field_checkbox_classes = 'form-switch' %}
|
||||
{% extends "forms/fields/checkbox/checkbox.html.twig" %}
|
||||
|
||||
41
config/www/user/themes/quark/templates/item.html.twig
Normal file
41
config/www/user/themes/quark/templates/item.html.twig
Normal file
@@ -0,0 +1,41 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
{% set blog = page.find(header_var('blog_url')|defined(theme_var('blog-page'))) %}
|
||||
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog])|defined(true) %}
|
||||
{% set show_sidebar = header_var('show_sidebar', [page, blog])|defined(true) %}
|
||||
{% set show_pagination = header_var('show_pagination', [page, blog])|defined(true) %}
|
||||
{% set hero_image_name = page.header.hero_image %}
|
||||
|
||||
{% block hero %}
|
||||
{% if hero_image_name %}
|
||||
{% set hero_image = page.media[hero_image_name] %}
|
||||
{% set content %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
<h2>{{ page.header.subtitle }}</h2>
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
{% include 'partials/blog/taxonomy.html.twig' %}
|
||||
{% endset %}
|
||||
{% include 'partials/hero.html.twig' with {id: 'blog-hero'} %}
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<section id="body-wrapper" class="section blog-listing">
|
||||
<section class="container {{ grid_size }}">
|
||||
|
||||
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
||||
{% include 'partials/breadcrumbs.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
{% embed 'partials/layout.html.twig' %}
|
||||
{% block item %}
|
||||
{% include 'partials/blog-item.html.twig' %}
|
||||
{% endblock %}
|
||||
{% block sidebar %}
|
||||
{% include 'partials/sidebar.html.twig' %}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
</section>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,16 @@
|
||||
{% macro nav_loop(page) %}
|
||||
{% import _self as macros %}
|
||||
{% for p in page.children.visible %}
|
||||
{% set active_page = (p.active or p.activeChild) ? 'active' : '' %}
|
||||
<li>
|
||||
<a href="{{ p.url }}" class="{{ active_page }}">
|
||||
{{ p.menu }}
|
||||
</a>
|
||||
{% if p.children.visible.count > 0 %}
|
||||
<ul>
|
||||
{{ macros.nav_loop(p) }}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
60
config/www/user/themes/quark/templates/modular.html.twig
Normal file
60
config/www/user/themes/quark/templates/modular.html.twig
Normal file
@@ -0,0 +1,60 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}
|
||||
|
||||
{% block javascripts %}
|
||||
{% if show_onpage_menu %}
|
||||
{% do assets.add('theme://js/singlepagenav.min.js') %}
|
||||
{% endif %}
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block bottom %}
|
||||
{{ parent() }}
|
||||
{% if show_onpage_menu %}
|
||||
<script>
|
||||
// singlePageNav initialization & configuration
|
||||
$('ul.navigation').singlePageNav({
|
||||
offset: $('#header').outerHeight(),
|
||||
filter: ':not(.external)',
|
||||
updateHash: true,
|
||||
currentClass: 'active'
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block header_navigation %}
|
||||
{% if show_onpage_menu %}
|
||||
<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="#{{ module.menu|hyphenize }}">{{ module.menu }}</a></li>
|
||||
{% endfor %}
|
||||
{% for mitem in site.menu %}
|
||||
<li>
|
||||
<a {% if mitem.class %}class="{{ mitem.class }}"{% endif %} href="{{ mitem.url }}">
|
||||
{% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %}
|
||||
{{ mitem.text }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
{{ parent() }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block hero %}
|
||||
{% for module in page.collection() if module.template == 'modular/hero' %}
|
||||
<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="{{ module.menu|hyphenize }}"></div>
|
||||
{{ module.content|raw }}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,30 @@
|
||||
{% set grid_size = theme_var('grid-size') %}
|
||||
{% set columns = page.header.class == 'small' ? 'col-3 col-md-4 col-sm-6' : 'col-4 col-md-6 col-sm-12' %}
|
||||
<section class="section modular-features {{ page.header.class}}">
|
||||
<section class="container {{ grid_size }}">
|
||||
<div class="frame-box">
|
||||
|
||||
{{ content|raw }}
|
||||
|
||||
<div class="columns">
|
||||
{% for feature in page.header.features %}
|
||||
<div class="column {{ columns }}">
|
||||
{% if feature.url %}<a href="{{feature.url}}">{% endif %}
|
||||
<div class="feature-icon">
|
||||
<i class="fa fa-fw {{ feature.icon }}"></i>
|
||||
{% if feature.header %}
|
||||
<h6>{{ feature.header }}</h6>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if feature.url %}</a>{% endif %}
|
||||
<div class="feature-content">
|
||||
{% if feature.text %}
|
||||
<p>{{ feature.text }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
@@ -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,0 +1,4 @@
|
||||
{% set grid_size = theme_var('grid-size') %}
|
||||
{% set hero_image = page.header.hero_image ? page.media[page.header.hero_image] : page.media.images|first %}
|
||||
|
||||
{% include 'partials/hero.html.twig' %}
|
||||
@@ -0,0 +1,21 @@
|
||||
{% set grid_size = theme_var('grid-size') %}
|
||||
{% set image = page.media.images|first %}
|
||||
|
||||
<section class="section modular-text {{ page.header.class}} bg-gray">
|
||||
<section class="container {{ grid_size }}">
|
||||
<div class="columns {{ page.header.image_align|default('align-right') }}">
|
||||
{% if image %}
|
||||
<div class="column col-6 col-md-12">
|
||||
{{ content|raw }}
|
||||
</div>
|
||||
<div class="column col-6 col-md-12">
|
||||
{{ image.html|raw }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="column col-12">
|
||||
{{ content|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
@@ -0,0 +1,13 @@
|
||||
<ul class="archives">
|
||||
|
||||
{% for month,items in archives_data %}
|
||||
<li>
|
||||
<a href="{{ base_url }}/{{ config.plugins.archives.taxonomy_names.month }}{{ config.system.param_sep }}{{ month|date(config.plugins.archives.taxonomy_values.month)|lower|e('url') }}">
|
||||
{% if archives_show_count %}
|
||||
<span class="label label-rounded label-primary">{{ items|length }}</span>
|
||||
{% endif %}
|
||||
<span class="archive_date">{{ month|date(config.plugins.archives.date_display_format) }} </span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
113
config/www/user/themes/quark/templates/partials/base.html.twig
Normal file
113
config/www/user/themes/quark/templates/partials/base.html.twig
Normal file
@@ -0,0 +1,113 @@
|
||||
{% 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>
|
||||
{% block head deferred %}
|
||||
<meta charset="utf-8" />
|
||||
<title>{% if page.title %}{{ page.title|e('html') }} | {% endif %}{{ site.title|e('html') }}</title>
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{% include 'partials/metadata.html.twig' %}
|
||||
|
||||
<link rel="icon" type="image/png" href="{{ url('theme://images/favicon.png') }}" />
|
||||
<link rel="canonical" href="{{ page.url(true, true) }}" />
|
||||
{% endblock head %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{% do assets.addCss('theme://css-compiled/spectre'~compress) %}
|
||||
{% if theme_var('spectre.exp') %}{% do assets.addCss('theme://css-compiled/spectre-exp'~compress) %}{% endif %}
|
||||
{% if theme_var('spectre.icons') %}{% do assets.addCss('theme://css-compiled/spectre-icons'~compress) %}{% endif %}
|
||||
{% do assets.addCss('theme://css-compiled/theme'~compress) %}
|
||||
{% do assets.addCss('theme://css/custom.css') %}
|
||||
{% do assets.addCss('theme://css/line-awesome.min.css') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{% do assets.addJs('jquery', 101) %}
|
||||
{% do assets.addJs('theme://js/jquery.treemenu.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
|
||||
{% endblock %}
|
||||
|
||||
{% block assets deferred %}
|
||||
{{ assets.css()|raw }}
|
||||
{{ assets.js()|raw }}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body id="top" class="{% block body_classes %}{{ body_classes }}{% endblock %}">
|
||||
<div id="page-wrapper">
|
||||
{% block header %}
|
||||
<section id="header" class="section">
|
||||
<section class="container {{ grid_size }}">
|
||||
<nav class="navbar">
|
||||
<section class="navbar-section logo">
|
||||
{% include 'partials/logo.html.twig' %}
|
||||
</section>
|
||||
<section class="navbar-section desktop-menu">
|
||||
|
||||
<nav class="dropmenu animated">
|
||||
{% block header_navigation %}
|
||||
{% include 'partials/navigation.html.twig' %}
|
||||
{% endblock %}
|
||||
</nav>
|
||||
|
||||
{% if config.plugins.login.enabled and grav.user.username %}
|
||||
<span class="login-status-wrapper"><i class="fa fa-user"></i> {% include 'partials/login-status.html.twig' ignore missing %}</span>
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
</nav>
|
||||
</section>
|
||||
</section>
|
||||
<div class="mobile-menu">
|
||||
<div class="button_container" id="toggle">
|
||||
<span class="top"></span>
|
||||
<span class="middle"></span>
|
||||
<span class="bottom"></span>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block hero %}{% endblock %}
|
||||
|
||||
<section id="start">
|
||||
{% block body %}
|
||||
<section id="body-wrapper" class="section">
|
||||
<section class="container {{ grid_size }}">
|
||||
{% block messages %}
|
||||
{% include 'partials/messages.html.twig' ignore missing %}
|
||||
{% endblock %}
|
||||
{{ block('content_surround') }}
|
||||
</section>
|
||||
</section>
|
||||
{% endblock %}
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
{% block footer %}
|
||||
{% include 'partials/footer.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block mobile %}
|
||||
<div class="mobile-container">
|
||||
<div class="overlay" id="overlay">
|
||||
<div class="mobile-logo">
|
||||
{% include 'partials/logo.html.twig' with {mobile: true} %}
|
||||
</div>
|
||||
<nav class="overlay-menu">
|
||||
{% include 'partials/navigation.html.twig' with {tree: true} %}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block bottom %}
|
||||
{{ assets.js('bottom')|raw }}
|
||||
{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,30 @@
|
||||
<div class="content-item h-entry">
|
||||
|
||||
{% if not hero_image_name %}
|
||||
<div class="content-title text-center">
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
|
||||
{% if page.header.subtitle %}
|
||||
<h3 >{{ page.header.subtitle }}</h3>
|
||||
{% endif %}
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
{% include 'partials/blog/taxonomy.html.twig' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="e-content">
|
||||
{{ page.content|raw }}
|
||||
</div>
|
||||
|
||||
{% if page.header.continue_link is same as(true) and config.plugins.comments.enabled %}
|
||||
{% include 'partials/comments.html.twig' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<p class="prev-next text-center">
|
||||
{% if not page.isLast %}
|
||||
<a class="btn" href="{{ page.prevSibling.url }}"><i class="fa fa-angle-left"></i> {{ 'THEME_QUARK.BLOG.ITEM.PREV_POST'|t }}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if not page.isFirst %}
|
||||
<a class="btn" href="{{ page.nextSibling.url }}">{{ 'THEME_QUARK.BLOG.ITEM.NEXT_POST'|t }} <i class="fa fa-angle-right"></i></a>
|
||||
{% endif %}
|
||||
</p>
|
||||
@@ -0,0 +1,27 @@
|
||||
<div class="card">
|
||||
{% set image = page.media.images|first %}
|
||||
{% if image %}
|
||||
<div class="card-image">
|
||||
<a href="{{ page.url }}">{{ image.cropZoom(800,400).html|raw }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card-header">
|
||||
<div class="card-subtitle text-gray">
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
</div>
|
||||
<div class="card-title">
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'h5'} %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if page.summary != page.content %}
|
||||
{{ page.summary|raw }}
|
||||
{% else %}
|
||||
{{ page.content|raw }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
{% include 'partials/blog/taxonomy.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<span class="blog-date">
|
||||
<time class="dt-published" datetime="{{ page.date|date("c") }}">
|
||||
<i class="fa fa-calendar"></i> {{ page.date|date(system.pages.dateformat.short) }}
|
||||
</time>
|
||||
</span>
|
||||
@@ -0,0 +1,8 @@
|
||||
<div class="p-summary e-content">
|
||||
{% if page.summary != page.content %}
|
||||
{{ page.summary|raw }}
|
||||
{% else %}
|
||||
{{ page.content|raw }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{% if page.taxonomy.tag %}
|
||||
<span class="tags">
|
||||
{% for tag in page.taxonomy.tag %}
|
||||
<a class="label label-rounded {{ label_style ?: 'label-secondary' }} p-category" href="{{ blog.url|rtrim('/') }}/tag{{ config.system.param_sep }}{{ tag }}#body-wrapper">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,11 @@
|
||||
{% set title_level = title_level ?: 'h2' %}
|
||||
{% if page.header.link %}
|
||||
<{{ title_level }} class="p-name mt-1">
|
||||
{% if page.header.continue_link is not same as(false) %}
|
||||
<a href="{{ page.url }}"><i class="fa fa-angle-double-right u-url"></i></a>
|
||||
{% endif %}
|
||||
<a href="{{ page.header.link }}" class="u-url">{{ page.title }}</a>
|
||||
</{{ title_level }}>
|
||||
{% else %}
|
||||
<{{ title_level }} class="p-name mt-1"><a href="{{ page.url }}" class="u-url">{{ page.title }}</a></{{ title_level }}>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,5 @@
|
||||
<section id="footer" class="section bg-gray">
|
||||
<section class="container {{ grid_size }}">
|
||||
<p><a href="https://getgrav.org">Grav</a> was <i class="fa fa-code"></i> with <i class="fa fa-heart-o pulse "></i> by <a href="https://trilby.media">Trilby Media</a>.</p>
|
||||
</section>
|
||||
</section>
|
||||
@@ -0,0 +1,6 @@
|
||||
{% if form.message %}
|
||||
{% set inline_errors = form.inline_errors is not null ? form.inline_errors : config.plugins.form.inline_errors(false) %}
|
||||
{% set status_mapping = {'success':'green', 'error': 'red', 'warning': 'yellow'} %}
|
||||
{% set message = inline_errors and form.messages ? "GRAV.FORM.VALIDATION_FAIL"|t : form.message %}
|
||||
<div class="toast toast-{{ form.status }} {{ status_mapping[form.status] ?: 'green' }} mt-2 mb-2">{{ message|raw }}</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,7 @@
|
||||
<section id="{{ id }}" class="section modular-hero hero {{ page.header.hero_classes }} {{ page.header.background.parallax ? 'parallax' : '' }}" {% if hero_image %}style="background-image: url('{{ hero_image.url }}');"{% endif %}>
|
||||
<div class="image-overlay"></div>
|
||||
<section class="container {{ grid_size }}" style="text-align: {{ page.header.hero_align|default('center') }}">
|
||||
{{ content|raw }}
|
||||
</section>
|
||||
<i id="to-start" class="pulse fa fa-angle-down"></i>
|
||||
</section>
|
||||
@@ -0,0 +1,14 @@
|
||||
{% set item_col = show_sidebar ? 'col-9 col-md-12' : 'col-12' %}
|
||||
{% set sidebar_col = show_sidebar ? 'col-3 col-md-12' : 'col-12' %}
|
||||
|
||||
<div class="columns">
|
||||
<div id="item" class="column {{ item_col }} extra-spacing">
|
||||
{% block item %}{% endblock %}
|
||||
</div>
|
||||
{% if show_sidebar %}
|
||||
<div id="sidebar" class="column {{ sidebar_col }}">
|
||||
{% block sidebar %}{% endblock %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<a href="{{ home_url }}" class="navbar-brand mr-10">
|
||||
<img src="{{ url('theme://images/logo.svg') }}" alt="{{ site.title }}" class="logo-img" style="height: 60px; width: auto;" />
|
||||
</a>
|
||||
@@ -0,0 +1,17 @@
|
||||
{% set type_mapping = {'info':'success', 'error': 'error', 'warning': 'warning'} %}
|
||||
{% set icon_mapping = {'info':'checkmark', 'error':'wrong', 'warning':'information'} %}
|
||||
|
||||
{% if grav.messages.all %}
|
||||
<div id="messages">
|
||||
{% for message in grav.messages.fetch %}
|
||||
|
||||
{% set scope = message.scope|e %}
|
||||
{% set type = type_mapping[scope] %}
|
||||
{% set icon = icon_mapping[scope] %}
|
||||
|
||||
<div class="toast toast-{{ type }} {{ scope }}">
|
||||
<i class="icon dripicons-{{ icon }}"></i> {{ message.message|raw }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% import 'macros/macros.html.twig' as macros %}
|
||||
|
||||
<ul {{ tree ? 'class="tree"' : '' }}>
|
||||
{{ macros.nav_loop(pages) }}
|
||||
</ul>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<ul class="related-pages menu">
|
||||
{% for related_path, score in related_pages %}
|
||||
{% set related = grav['pages'].get(related_path) %}
|
||||
{% if related %}
|
||||
<li class="menu-item">
|
||||
{% if config.plugins.relatedpages.show_score %}
|
||||
<div class="menu-badge">
|
||||
<span class="label label-primary">{{ score }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<a href="{{ related.url }}" title="{{ related.title }}">{{ related.title }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@@ -0,0 +1,43 @@
|
||||
{% set feed_url = blog.url == '/' or blog.url == base_url_relative ? (base_url_relative~'/'~blog.slug) : blog.url %}
|
||||
{% set new_base_url = blog.url == '/' ? '' : blog.url %}
|
||||
|
||||
{% if config.plugins.simplesearch.enabled %}
|
||||
<div class="sidebar-content">
|
||||
{% include 'partials/simplesearch_searchbox.html.twig' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if config.plugins.relatedpages.enabled and related_pages|length > 0 %}
|
||||
<div class="sidebar-content">
|
||||
<h4>{{ 'THEME_QUARK.SIDEBAR.RELATED_POSTS.HEADLINE'|t }}</h4>
|
||||
{% include 'partials/relatedpages.html.twig' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if config.plugins.random.enabled %}
|
||||
<div class="sidebar-content">
|
||||
<h4>{{ 'THEME_QUARK.SIDEBAR.RANDOM_ARTICLE.HEADLINE'|t }}</h4>
|
||||
<a class="button" href="{{ base_url }}/random"><i class="fa fa-retweet"></i> {{ 'THEME_QUARK.SIDEBAR.RANDOM_ARTICLE.FEELING_LUCKY'|t }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{{ page.find('/modules/sidebar').content|raw }}
|
||||
|
||||
{% if config.plugins.taxonomylist.enabled %}
|
||||
<div class="sidebar-content">
|
||||
<h4>{{ 'THEME_QUARK.SIDEBAR.POPULAR_TAGS.HEADLINE'|t }}</h4>
|
||||
{% include 'partials/taxonomylist.html.twig' with {'base_url':new_base_url, 'taxonomy':'tag', 'children_only':true} %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if config.plugins.archives.enabled %}
|
||||
<div class="sidebar-content">
|
||||
<h4>{{ 'THEME_QUARK.SIDEBAR.ARCHIVES.HEADLINE'|t }}</h4>
|
||||
{% include 'partials/archives.html.twig' with {'base_url':new_base_url} %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if config.plugins.feed.enabled %}
|
||||
<div class="sidebar-content syndicate">
|
||||
<h4>{{ 'THEME_QUARK.SIDEBAR.SYNDICATE.HEADLINE'|t }}</h4>
|
||||
<a class="btn" href="{{ feed_url }}.atom"><i class="fa fa-rss-square"></i> Atom 1.0</a>
|
||||
<a class="btn" href="{{ feed_url }}.rss"><i class="fa fa-rss-square"></i> RSS</a>
|
||||
{% if config.plugins.feed.enable_json_feed %}<a class="btn" href="{{ feed_url }}.json"><i class="fa fa-rss-square"></i> JSON</a>{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,10 @@
|
||||
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags(of_page, children_only) : taxonomylist.get() %}
|
||||
|
||||
{% if taxlist %}
|
||||
<span class="tags">
|
||||
{% for tax,value in taxlist[taxonomy] %}
|
||||
{% set label_class = uri.param(taxonomy) == tax ? 'label-primary' : 'label-secondary' %}
|
||||
<a class="label label-rounded {{ label_class }}" href="{{ base_url }}/{{ taxonomy }}{{ config.system.param_sep }}{{ tax }}">{{ tax }}</a>
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user