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,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