mirror of
https://github.com/pierre42100/comunic
synced 2025-06-21 17:45:18 +00:00
First commit
This commit is contained in:
38
developer/user/themes/antimatter/templates/blog.html.twig
Normal file
38
developer/user/themes/antimatter/templates/blog.html.twig
Normal file
@ -0,0 +1,38 @@
|
||||
{% embed 'partials/base.html.twig' %}
|
||||
|
||||
{% set collection = page.collection() %}
|
||||
|
||||
{% block content %}
|
||||
{% set blog_image = page.media.images|first.grayscale().contrast(20).brightness(-100).colorize(-35,81,122) %}
|
||||
|
||||
{% if blog_image %}
|
||||
<div class="flush-top blog-header blog-header-image" style="background-image: url({{ blog_image.url }});">
|
||||
{% else %}
|
||||
<div class="blog-header">
|
||||
{% endif %}
|
||||
{{ page.content }}
|
||||
</div>
|
||||
|
||||
{% if config.plugins.breadcrumbs.enabled %}
|
||||
{% include 'partials/breadcrumbs.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="content-wrapper blog-content-list grid pure-g">
|
||||
<div id="listing" class="block pure-u-2-3 h-feed">
|
||||
{% for child in collection %}
|
||||
{% include 'partials/blog_item.html.twig' with {'blog':page, 'page':child, 'truncate':true} %}
|
||||
{% endfor %}
|
||||
|
||||
{% if config.plugins.pagination.enabled and collection.params.pagination %}
|
||||
{% include 'partials/pagination.html.twig' with {'base_url':page.url, 'pagination':collection.params.pagination} %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="sidebar" class="block size-1-3 pure-u-1-3">
|
||||
{% include 'partials/sidebar.html.twig' with {'blog':page} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% endembed %}
|
||||
|
||||
|
@ -0,0 +1,5 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{{ page.content }}
|
||||
{% endblock %}
|
12
developer/user/themes/antimatter/templates/error.html.twig
Normal file
12
developer/user/themes/antimatter/templates/error.html.twig
Normal file
@ -0,0 +1,12 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div id="error">
|
||||
<div>
|
||||
<h1>{{ 'ERROR'|t }} {{ page.header.http_response_code }}</h1>
|
||||
<p>
|
||||
{{ page.content }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
@ -0,0 +1,8 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ content }}
|
||||
{% include "forms/form.html.twig" %}
|
||||
|
||||
{% endblock %}
|
18
developer/user/themes/antimatter/templates/item.html.twig
Normal file
18
developer/user/themes/antimatter/templates/item.html.twig
Normal file
@ -0,0 +1,18 @@
|
||||
{% embed 'partials/base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{% if config.plugins.breadcrumbs.enabled %}
|
||||
{% include 'partials/breadcrumbs.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="blog-content-item grid pure-g-r">
|
||||
<div id="item" class="block pure-u-2-3 h-entry">
|
||||
{% include 'partials/blog_item.html.twig' with {'blog':page.parent, 'truncate':false} %}
|
||||
</div>
|
||||
<div id="sidebar" class="block size-1-3 pure-u-1-3">
|
||||
{% include 'partials/sidebar.html.twig' with {'blog':page.parent}%}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% endembed %}
|
@ -0,0 +1,3 @@
|
||||
{% macro input(name, value, type, size) %}
|
||||
<input type="{{ type|default('text') }}" name="{{ name }}" value="{{ value|e }}" size="{{ size|default(20) }}" />
|
||||
{% endmacro %}
|
56
developer/user/themes/antimatter/templates/modular.html.twig
Normal file
56
developer/user/themes/antimatter/templates/modular.html.twig
Normal file
@ -0,0 +1,56 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}
|
||||
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}
|
||||
|
||||
{% 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
|
||||
$('#navbar').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() %}
|
||||
{% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
|
||||
<li class="{{ current_module }}"><a href="#{{ _self.pageLinkName(module.menu) }}">{{ module.menu }}</a></li>
|
||||
{% endfor %}
|
||||
{% for mitem in site.menu %}
|
||||
<li>
|
||||
<a 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 content %}
|
||||
{{ page.content }}
|
||||
{% for module in page.collection() %}
|
||||
<div id="{{ _self.pageLinkName(module.menu) }}"></div>
|
||||
{{ module.content }}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
@ -0,0 +1,22 @@
|
||||
<div class="modular-row features {{ page.header.class}}">
|
||||
{{ content }}
|
||||
<div class="feature-items">
|
||||
{% for feature in page.header.features %}
|
||||
<div class="feature">
|
||||
{% if feature.icon %}
|
||||
<i class="fa fa-fw fa-{{ feature.icon }}"></i>
|
||||
<div class="feature-content icon-offset">
|
||||
{% else %}
|
||||
<div class="feature-content">
|
||||
{% endif %}
|
||||
{% if feature.header %}
|
||||
<h4>{{ feature.header }}</h4>
|
||||
{% endif %}
|
||||
{% if feature.text %}
|
||||
<p>{{ feature.text }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,13 @@
|
||||
{% set showcase_image = page.media.images|first.grayscale().contrast(20).brightness(-125).colorize(-35,81,122) %}
|
||||
{% if showcase_image %}
|
||||
<div class="modular-row showcase flush-top" style="background-image: url({{ showcase_image.url }});">
|
||||
{% else %}
|
||||
<div class="modular-row showcase">
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
|
||||
{% for button in page.header.buttons %}
|
||||
<a class="button{% if button.primary %} primary{% endif %}" href="{{ button.url }}">{{ button.text }}</a>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
@ -0,0 +1,7 @@
|
||||
<div class="modular-row callout">
|
||||
{% set image = page.media.images|first %}
|
||||
{% if image %}
|
||||
{{ image.cropResize(400,400).html('','','align-'~page.header.image_align) }}
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
</div>
|
@ -0,0 +1,97 @@
|
||||
{% set theme_config = attribute(config.themes, config.system.pages.theme) %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ grav.language.getLanguage ?: 'en' }}">
|
||||
<head>
|
||||
{% block head %}
|
||||
<meta charset="utf-8" />
|
||||
<title>{% if header.title %}{{ header.title|e('html') }} | {% endif %}{{ site.title|e('html') }}</title>
|
||||
{% include 'partials/metadata.html.twig' %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<link rel="icon" type="image/png" href="{{ url('theme://images/favicon.png') }}" />
|
||||
<link rel="canonical" href="{{ page.url(true, true) }}" />
|
||||
|
||||
{% block stylesheets %}
|
||||
{% do assets.addCss('theme://css/pure-0.5.0/grids-min.css', 103) %}
|
||||
{% do assets.addCss('theme://css-compiled/nucleus.css', 102) %}
|
||||
{% do assets.addCss('theme://css-compiled/template.css', 101) %}
|
||||
{% do assets.addCss('theme://css/custom.css', 100) %}
|
||||
{% do assets.addCss('theme://css/font-awesome.min.css', 100) %}
|
||||
{% do assets.addCss('theme://css/slidebars.min.css') %}
|
||||
|
||||
{% if browser.getBrowser == 'msie' and browser.getVersion == 10 %}
|
||||
{% do assets.addCss('theme://css/nucleus-ie10.css') %}
|
||||
{% endif %}
|
||||
{% if browser.getBrowser == 'msie' and browser.getVersion >= 8 and browser.getVersion <= 9 %}
|
||||
{% do assets.addCss('theme://css/nucleus-ie9.css') %}
|
||||
{% do assets.addJs('theme://js/html5shiv-printshiv.min.js') %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{{ assets.css() }}
|
||||
|
||||
{% block javascripts %}
|
||||
{% do assets.addJs('jquery', 101) %}
|
||||
{% do assets.addJs('theme://js/modernizr.custom.71422.js', 100) %}
|
||||
{% do assets.addJs('theme://js/antimatter.js') %}
|
||||
{% do assets.addJs('theme://js/slidebars.min.js') %}
|
||||
{% endblock %}
|
||||
{{ assets.js() }}
|
||||
|
||||
{% endblock head %}
|
||||
</head>
|
||||
<body id="top" class="{{ page.header.body_classes }}">
|
||||
<div id="sb-site">
|
||||
{% block header %}
|
||||
<header id="header">
|
||||
<div id="logo">
|
||||
<h3><a href="{{ base_url == '' ? '/' : base_url }}">{{ config.site.title }}</a></h3>
|
||||
</div>
|
||||
<div id="navbar">
|
||||
{% block header_extra %}{% endblock %}
|
||||
{% if config.plugins.langswitcher.enabled %}
|
||||
{% include 'partials/langswitcher.html.twig' %}
|
||||
{% endif %}
|
||||
{% block header_navigation %}
|
||||
{% include 'partials/navigation.html.twig' %}
|
||||
{% endblock %}
|
||||
<span class="panel-activation sb-toggle-left navbar-left menu-btn fa fa-bars"></span>
|
||||
</div>
|
||||
</header>
|
||||
{% endblock %}
|
||||
|
||||
{% block showcase %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<section id="body" class="{{ class }}">
|
||||
{% block content %}{% endblock %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
<footer id="footer">
|
||||
<div class="totop">
|
||||
<span><a href="#" id="toTop"><i class="fa fa-arrow-up"></i></a></span>
|
||||
</div>
|
||||
<p><a href="http://getgrav.org">Grav</a> was <i class="fa fa-code"></i> with <i class="fa fa-heart"></i> by <a href="http://www.rockettheme.com">RocketTheme</a>.</p>
|
||||
</footer>
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="sb-slidebar sb-left sb-width-thin">
|
||||
<div id="panel">
|
||||
{% include 'partials/navigation.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
{% block bottom %}
|
||||
{{ assets.js('bottom') }}
|
||||
<script>
|
||||
$(function () {
|
||||
$(document).ready(function() {
|
||||
$.slidebars({
|
||||
hideControlClasses: true,
|
||||
scrollLock: true
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,95 @@
|
||||
<div class="list-item h-entry">
|
||||
|
||||
{% set header_image = page.header.header_image|defined(true) %}
|
||||
{% set header_image_width = page.header.header_image_width|defined(900) %}
|
||||
{% set header_image_height = page.header.header_image_height|defined(300) %}
|
||||
{% set header_image_file = page.header.header_image_file %}
|
||||
|
||||
<div class="list-blog-header">
|
||||
<span class="list-blog-date">
|
||||
<time class="dt-published" datetime="{{ page.date|date("c") }}">
|
||||
<span>{{ page.date|date("d") }}</span>
|
||||
<em>{{ page.date|date("M") }}</em>
|
||||
</time>
|
||||
</span>
|
||||
{% if page.header.link %}
|
||||
<h4 class="p-name">
|
||||
{% if page.header.continue_link is not sameas(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>
|
||||
</h4>
|
||||
{% else %}
|
||||
<h4 class="p-name"><a href="{{ page.url }}" class="u-url">{{ page.title }}</a></h4>
|
||||
{% endif %}
|
||||
|
||||
{% if page.taxonomy.tag %}
|
||||
<span class="tags">
|
||||
{% for tag in page.taxonomy.tag %}
|
||||
<a href="{{ blog.url|rtrim('/') }}/tag{{ config.system.param_sep }}{{ tag }}" class="p-category">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if header_image %}
|
||||
{% if header_image_file %}
|
||||
{% set header_image_media = page.media.images[header_image_file] %}
|
||||
{% else %}
|
||||
{% set header_image_media = page.media.images|first %}
|
||||
{% endif %}
|
||||
{{ header_image_media.cropZoom(header_image_width, header_image_height).html }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="list-blog-padding">
|
||||
|
||||
{% if page.header.continue_link is sameas(false) %}
|
||||
<div class="e-content">
|
||||
{{ page.content }}
|
||||
</div>
|
||||
{% if not truncate %}
|
||||
{% set show_prev_next = true %}
|
||||
{% endif %}
|
||||
{% elseif truncate and page.summary != page.content %}
|
||||
<div class="p-summary e-content">
|
||||
{{ page.summary }}
|
||||
<p><a href="{{ page.url }}">{{ 'BLOG.ITEM.CONTINUE_READING'|t }}</a></p>
|
||||
</div>
|
||||
{% elseif truncate %}
|
||||
<div class="p-summary e-content">
|
||||
{% if page.summary != page.content %}
|
||||
{{ page.content|truncate(550) }}
|
||||
</div>
|
||||
{% else %}
|
||||
{{ page.content }}
|
||||
|
||||
{% endif %}
|
||||
<p><a href="{{ page.url }}">{{ 'BLOG.ITEM.CONTINUE_READING'|t }}</a></p>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="e-content">
|
||||
{{ page.content }}
|
||||
</div>
|
||||
|
||||
{% if config.plugins.comments.enabled %}
|
||||
{% include 'partials/comments.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
{% set show_prev_next = true %}
|
||||
{% endif %}
|
||||
|
||||
{% if show_prev_next %}
|
||||
|
||||
<p class="prev-next">
|
||||
{% if not page.isFirst %}
|
||||
<a class="button" href="{{ page.nextSibling.url }}"><i class="fa fa-chevron-left"></i> {{ 'BLOG.ITEM.NEXT_POST'|t }}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if not page.isLast %}
|
||||
<a class="button" href="{{ page.prevSibling.url }}">{{ 'BLOG.ITEM.PREV_POST'|t }} <i class="fa fa-chevron-right"></i></a>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,3 @@
|
||||
{% for meta in page.metadata %}
|
||||
<meta {% if meta.name %}name="{{ meta.name }}" {% endif %}{% if meta.http_equiv %}http-equiv="{{ meta.http_equiv }}" {% endif %}{% if meta.charset %}charset="{{ meta.charset }}" {% endif %}{% if meta.property %}property="{{ meta.property }}" {% endif %}{% if meta.content %}content="{{ meta.content }}" {% endif %}/>
|
||||
{% endfor %}
|
@ -0,0 +1,52 @@
|
||||
{% macro loop(page) %}
|
||||
{% for p in page.children.visible %}
|
||||
{% set current_page = (p.active or p.activeChild) ? 'active' : '' %}
|
||||
{% if p.children.visible.count > 0 %}
|
||||
<li class="has-children {{ current_page }}">
|
||||
<a href="{{ p.url }}">
|
||||
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
|
||||
{{ p.menu }}
|
||||
<span></span>
|
||||
</a>
|
||||
<ul>
|
||||
{{ _self.loop(p) }}
|
||||
</ul>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="{{ current_page }}">
|
||||
<a href="{{ p.url }}">
|
||||
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
|
||||
{{ p.menu }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
|
||||
<ul class="navigation">
|
||||
{% if theme_config.dropdown.enabled %}
|
||||
{{ _self.loop(pages) }}
|
||||
{% else %}
|
||||
{% for page in pages.children.visible %}
|
||||
{% set current_page = (page.active or page.activeChild) ? 'active' : '' %}
|
||||
<li class="{{ current_page }}">
|
||||
<a href="{{ page.url }}">
|
||||
{% if page.header.icon %}<i class="fa fa-{{ page.header.icon }}"></i>{% endif %}
|
||||
{{ page.menu }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% for mitem in site.menu %}
|
||||
<li>
|
||||
<a href="{{ mitem.url }}">
|
||||
{% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %}
|
||||
{{ mitem.text }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% if config.plugins.login.enabled and grav.user.username %}
|
||||
<li><i class="fa fa-lock"></i> {% include 'partials/login-status.html.twig' %}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
@ -0,0 +1,42 @@
|
||||
{% 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">
|
||||
<h4>{{ 'SIDEBAR.SIMPLE_SEARCH.HEADLINE'|t }}</h4>
|
||||
{% include 'partials/simplesearch_searchbox.html.twig' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if config.plugins.relatedpages.enabled and related_pages|length > 0 %}
|
||||
<h4>{{ 'SIDEBAR.RELATED_POSTS.HEADLINE'|t }}</h4>
|
||||
{% include 'partials/relatedpages.html.twig' %}
|
||||
{% endif %}
|
||||
{% if config.plugins.random.enabled %}
|
||||
<div class="sidebar-content">
|
||||
<h4>{{ 'SIDEBAR.RANDOM_ARTICLE.HEADLINE'|t }}</h4>
|
||||
<a class="button" href="{{ base_url }}/random"><i class="fa fa-retweet"></i> {{ 'SIDEBAR.RANDOM_ARTICLE.FEELING_LUCKY'|t }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="sidebar-content">
|
||||
<h4>{{ 'SIDEBAR.SOME_TEXT_WIDGET.HEADLINE'|t }}</h4>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna.</p>
|
||||
</div>
|
||||
{% if config.plugins.taxonomylist.enabled %}
|
||||
<div class="sidebar-content">
|
||||
<h4>{{ 'SIDEBAR.POPULAR_TAGS.HEADLINE'|t }}</h4>
|
||||
{% include 'partials/taxonomylist.html.twig' with {'base_url':new_base_url, 'taxonomy':'tag'} %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if config.plugins.archives.enabled %}
|
||||
<div class="sidebar-content">
|
||||
<h4>{{ '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>{{ 'SIDEBAR.SYNDICATE.HEADLINE'|t }}</h4>
|
||||
<a class="button" href="{{ feed_url }}.atom"><i class="fa fa-rss-square"></i> Atom 1.0</a>
|
||||
<a class="button" href="{{ feed_url }}.rss"><i class="fa fa-rss-square"></i> RSS</a>
|
||||
</div>
|
||||
{% endif %}
|
Reference in New Issue
Block a user