addtheme
This commit is contained in:
32
user/themes/lecampus/templates/blog.html.twig
Normal file
32
user/themes/lecampus/templates/blog.html.twig
Normal file
@@ -0,0 +1,32 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
{% set collection = page.collection() %}
|
||||
{% set image = page.media.images|first %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{% do assets.addCss('theme://css/bricklayer.css') %}
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
<section id="body-wrapper" class="section blog-listing">
|
||||
{% if image %}
|
||||
{{image.html}}
|
||||
{% endif %}
|
||||
|
||||
<h2>{{page.title}}</h2>
|
||||
{{content}}
|
||||
|
||||
{% if show_sidebar %}
|
||||
{% block sidebar %}
|
||||
{% include 'partials/sidebar.html.twig' %}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% for item in page.collection %}
|
||||
<h3>{{item.title}}</h3>
|
||||
{{item.content}}
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
49
user/themes/lecampus/templates/calendrier.html.twig
Normal file
49
user/themes/lecampus/templates/calendrier.html.twig
Normal file
@@ -0,0 +1,49 @@
|
||||
{% 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/cal-list-event.html.twig' with {blog: page, page: child} %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
</section>
|
||||
</section>
|
||||
<script>
|
||||
//Bricklayer
|
||||
var bricklayer = new Bricklayer(document.querySelector('.bricklayer'))
|
||||
</script>
|
||||
{% endblock %}
|
15
user/themes/lecampus/templates/default.html.twig
Normal file
15
user/themes/lecampus/templates/default.html.twig
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
{% set image = page.media.images|first %}
|
||||
|
||||
{% block content %}
|
||||
{% if image %}
|
||||
{{ image.html }}
|
||||
{% endif %}
|
||||
|
||||
{{ page.content|raw }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'partials/sidebar.html.twig' %}
|
||||
{% endblock %}
|
12
user/themes/lecampus/templates/error.html.twig
Normal file
12
user/themes/lecampus/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 %}
|
38
user/themes/lecampus/templates/event.html.twig
Normal file
38
user/themes/lecampus/templates/event.html.twig
Normal file
@@ -0,0 +1,38 @@
|
||||
{% 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 %}
|
||||
{% endembed %}
|
||||
|
||||
</section>
|
||||
</section>
|
||||
{% endblock %}
|
16
user/themes/lecampus/templates/footer.html.twig
Normal file
16
user/themes/lecampus/templates/footer.html.twig
Normal file
@@ -0,0 +1,16 @@
|
||||
{% set collection = page.collection() %}
|
||||
{% set image = page.media.images|first %}
|
||||
|
||||
{% for item in page.collection if page.template == "footer" %}
|
||||
{{item.title}}
|
||||
{% endfor %}
|
||||
<section id="footer" class="section blog-listing">
|
||||
{% if image %}
|
||||
{{image.html}}
|
||||
{% endif %}
|
||||
|
||||
{% for item in collection %}
|
||||
<h3>{{item.title}}</h3>
|
||||
{{item.content}}
|
||||
{% endfor %}
|
||||
</section>
|
12
user/themes/lecampus/templates/formdata.html.twig
Normal file
12
user/themes/lecampus/templates/formdata.html.twig
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ content }}
|
||||
|
||||
<div class="alert">{{ form.message }}</div>
|
||||
<p>Here is the summary of what you wrote to us:</p>
|
||||
|
||||
{% include "forms/data.html.twig" %}
|
||||
|
||||
{% endblock %}
|
17
user/themes/lecampus/templates/forms/default/data.txt.twig
Normal file
17
user/themes/lecampus/templates/forms/default/data.txt.twig
Normal file
@@ -0,0 +1,17 @@
|
||||
{%- macro render_field(form, fields, scope) %}
|
||||
{%- for index, field in fields %}
|
||||
{%- set input = attribute(field, "input@") %}
|
||||
{%- if input is null or input == true %}
|
||||
{%- set value = form.value(scope ~ (field.name ?? index)) %}
|
||||
{{- scope ~ (field.name ?? index) }}: {{ string(value is iterable ? value|json_encode : value|escape('yaml')) ~ "\r\n" }}
|
||||
{%- else %}
|
||||
{%- if field.fields %}
|
||||
{%- set new_scope = field.nest_id ? scope ~ field.name ~ '.' : scope -%}
|
||||
{{- _self.render_field(form, field.fields, new_scope) }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endmacro %}
|
||||
{%- autoescape false %}
|
||||
{{- _self.render_field(form, form.fields, '') ~ "\r\n" }}
|
||||
{%- endautoescape %}
|
@@ -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 @@
|
||||
{% extends "forms/default/data.txt.twig" %}
|
@@ -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>
|
||||
{% if grav.twig.twig.filters['tu'] is defined %}{{ text|tu|raw }}{% else %}{{ text|t|raw }}{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
@@ -0,0 +1,3 @@
|
||||
{% set form_field_checkbox_classes = 'form-switch' %}
|
||||
{% extends "forms/fields/checkbox/checkbox.html.twig" %}
|
||||
|
43
user/themes/lecampus/templates/item.html.twig
Normal file
43
user/themes/lecampus/templates/item.html.twig
Normal file
@@ -0,0 +1,43 @@
|
||||
{% 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 %}
|
||||
{% endembed %}
|
||||
|
||||
{% for child in page.collection %}
|
||||
{{child.content}}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</section>
|
||||
</section>
|
||||
{% endblock %}
|
22
user/themes/lecampus/templates/macros/macros.html.twig
Normal file
22
user/themes/lecampus/templates/macros/macros.html.twig
Normal file
@@ -0,0 +1,22 @@
|
||||
{% macro nav_loop(page) %}
|
||||
{% import _self as macros %}
|
||||
{% for p in page.children.visible %}
|
||||
{% set active_page = (p.active or p.activeChild) ? 'active' : '' %}
|
||||
{% if p.children.visible.count > 0 %}
|
||||
<li>
|
||||
<a href="{{ p.url }}"{{ active_page }}>
|
||||
{{ p.menu }}
|
||||
</a>
|
||||
<ul>
|
||||
{{ macros.nav_loop(p) }}
|
||||
</ul>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a href="{{ p.url }}" class="{{ active_page }} ">
|
||||
{{ p.menu }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
69
user/themes/lecampus/templates/modular.html.twig
Normal file
69
user/themes/lecampus/templates/modular.html.twig
Normal file
@@ -0,0 +1,69 @@
|
||||
{% 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 %}
|
||||
{% 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="#{{ macro.pageLinkName(module.menu) }}">{{ 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="{{ macro.pageLinkName(module.menu) }}"></div>
|
||||
{{ module.content|raw }}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<span class="ariane">
|
||||
{% for module in page.collection() if module.template != 'modular/hero' %}
|
||||
{{module.title}}
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% for module in page.collection() if module.template != 'modular/hero' %}
|
||||
<div id="{{ macro.pageLinkName(module.menu) }}"></div>
|
||||
{{ module.content|raw }}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
30
user/themes/lecampus/templates/modular/features.html.twig
Normal file
30
user/themes/lecampus/templates/modular/features.html.twig
Normal file
@@ -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>
|
4
user/themes/lecampus/templates/modular/hero.html.twig
Normal file
4
user/themes/lecampus/templates/modular/hero.html.twig
Normal file
@@ -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' %}
|
24
user/themes/lecampus/templates/modular/text.html.twig
Normal file
24
user/themes/lecampus/templates/modular/text.html.twig
Normal file
@@ -0,0 +1,24 @@
|
||||
{% 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">
|
||||
<h2>{{page.title}}</h2>
|
||||
{{ content|raw }}
|
||||
</div>
|
||||
<div class="column col-6 col-md-12">
|
||||
{% if image %}
|
||||
{{ image.html|raw }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="column col-12">
|
||||
{{ content|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
13
user/themes/lecampus/templates/partials/archives.html.twig
Normal file
13
user/themes/lecampus/templates/partials/archives.html.twig
Normal file
@@ -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('M_Y')|lower|e('url') }}">
|
||||
{% if archives_show_count %}
|
||||
<span class="label label-rounded label-primary">{{ items|length }}</span>
|
||||
{% endif %}
|
||||
<span class="archive_date">{{ month }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
133
user/themes/lecampus/templates/partials/base.html.twig
Normal file
133
user/themes/lecampus/templates/partials/base.html.twig
Normal file
@@ -0,0 +1,133 @@
|
||||
{% 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' %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ grav.language.getActive ?: grav.config.site.default_lang }}">
|
||||
<head>
|
||||
{% block head %}
|
||||
<meta charset="utf-8" />
|
||||
<title>{% if header.title %}{{ header.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) }}" />
|
||||
|
||||
{% 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 %}
|
||||
<!-- <script>
|
||||
$(document).ready(function(){
|
||||
|
||||
var form = $('#ajax-test-form');
|
||||
form.submit(function(e) {
|
||||
// prevent form submission
|
||||
e.preventDefault();
|
||||
|
||||
// submit the form via Ajax
|
||||
$.ajax({
|
||||
url: form.attr('action'),
|
||||
type: form.attr('method'),
|
||||
dataType: 'html',
|
||||
data: form.serialize(),
|
||||
success: function(result) {
|
||||
// Inject the result in the HTML
|
||||
$('#form-result').html(result);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script> -->
|
||||
{% endblock head %}
|
||||
</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' %}</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 %}{% endblock %}
|
||||
{% block sidebar %}{% endblock %}
|
||||
</section>
|
||||
</section>
|
||||
{% endblock %}
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
{% block footer %}
|
||||
{% include 'partials/footer.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
<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>
|
||||
|
||||
{% block bottom %}
|
||||
{{ assets.js('bottom')|raw }}
|
||||
{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
20
user/themes/lecampus/templates/partials/blog-item.html.twig
Normal file
20
user/themes/lecampus/templates/partials/blog-item.html.twig
Normal file
@@ -0,0 +1,20 @@
|
||||
{% set image = page.media.images|first %}
|
||||
|
||||
<div class="content-item h-entry">
|
||||
{% if image %}
|
||||
{{ image.html }}
|
||||
{% endif %}
|
||||
{% 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 %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="e-content">
|
||||
{{ page.content|raw }}
|
||||
</div>
|
||||
|
||||
</div>
|
@@ -0,0 +1,26 @@
|
||||
<div class="card">
|
||||
<div class="card-footer">
|
||||
{% include 'partials/blog/public.html.twig' %}
|
||||
</div>
|
||||
{% set image = page.media.images|first %}
|
||||
{% if image %}
|
||||
<div class="card-image">
|
||||
<a href="{{ page.url }}">{{ image.cropZoom(800,400).html }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'h5'} %}
|
||||
</div>
|
||||
<div class="card-subtitle text-gray">
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if page.summary != page.content %}
|
||||
{{ page.summary|raw }}
|
||||
{% else %}
|
||||
{{ page.content|raw }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
16
user/themes/lecampus/templates/partials/blog/date.html.twig
Normal file
16
user/themes/lecampus/templates/partials/blog/date.html.twig
Normal file
@@ -0,0 +1,16 @@
|
||||
<div class="date">
|
||||
<span class="dt">
|
||||
Du
|
||||
{% if page.header.date_begin %}
|
||||
<time class="dt-begin" datetime="{{ page.header.date_begin|date("c") }}">
|
||||
{{ page.header.date_begin|date(system.pages.dateformat.short) }}
|
||||
</time>
|
||||
{% endif %}
|
||||
à
|
||||
{% if page.header.date_end %}
|
||||
<time class="dt-end" datetime="{{ page.header.date_end|date("c") }}">
|
||||
{{ page.header.date_end|date(system.pages.dateformat.short) }}
|
||||
</time>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
@@ -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,8 @@
|
||||
<div class="publics">
|
||||
<span class="pc">
|
||||
{% set page_public = page.header.public %}
|
||||
{% for public in page_public %}
|
||||
{{ public }}
|
||||
{% endfor %}
|
||||
</span>
|
||||
</div>
|
@@ -0,0 +1,10 @@
|
||||
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : 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 %}
|
@@ -0,0 +1,9 @@
|
||||
<div class="reseaux-sociaux">
|
||||
{% if page.header.rs %}
|
||||
{% for rs in page.header.rs %}
|
||||
<span class="rs">
|
||||
{{ rs }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
{% 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 %}
|
11
user/themes/lecampus/templates/partials/blog/title.html.twig
Normal file
11
user/themes/lecampus/templates/partials/blog/title.html.twig
Normal file
@@ -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 %}
|
23
user/themes/lecampus/templates/partials/cal-event.html.twig
Normal file
23
user/themes/lecampus/templates/partials/cal-event.html.twig
Normal file
@@ -0,0 +1,23 @@
|
||||
{% set image = page.media.images|first %}
|
||||
|
||||
<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/public.html.twig' %}
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
{% include 'partials/blog/reseaux_sociaux.html.twig' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="e-content">
|
||||
{% if image %}
|
||||
{{ image.html }}
|
||||
{% endif %}
|
||||
{{ page.content|raw }}
|
||||
</div>
|
||||
|
||||
</div>
|
@@ -0,0 +1,26 @@
|
||||
<div class="card">
|
||||
<div class="card-footer">
|
||||
{% include 'partials/blog/public.html.twig' %}
|
||||
</div>
|
||||
{% set image = page.media.images|first %}
|
||||
{% if image %}
|
||||
<div class="card-image">
|
||||
<a href="{{ page.url }}">{{ image.cropZoom(800,400).html }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'h5'} %}
|
||||
</div>
|
||||
<div class="card-subtitle text-gray">
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if page.summary != page.content %}
|
||||
{{ page.summary|raw }}
|
||||
{% else %}
|
||||
{{ page.content|raw }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
10
user/themes/lecampus/templates/partials/footer.html.twig
Normal file
10
user/themes/lecampus/templates/partials/footer.html.twig
Normal file
@@ -0,0 +1,10 @@
|
||||
{% set collection = page.collection() %}
|
||||
{% set image = page.media.images|first %}
|
||||
|
||||
<section id="footer" class="section blog-listing">
|
||||
{% for p in page.find('/home').children if p != page %}
|
||||
<h1>{{p.title}}</h1>
|
||||
{{p.content}}
|
||||
<div class="map"></div>
|
||||
{% endfor %}
|
||||
</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 ? "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 %}
|
7
user/themes/lecampus/templates/partials/hero.html.twig
Normal file
7
user/themes/lecampus/templates/partials/hero.html.twig
Normal file
@@ -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>
|
15
user/themes/lecampus/templates/partials/layout.html.twig
Normal file
15
user/themes/lecampus/templates/partials/layout.html.twig
Normal file
@@ -0,0 +1,15 @@
|
||||
{% 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 %}
|
||||
{% include 'partials/sidebar.html.twig' %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
9
user/themes/lecampus/templates/partials/logo.html.twig
Normal file
9
user/themes/lecampus/templates/partials/logo.html.twig
Normal file
@@ -0,0 +1,9 @@
|
||||
{% set logo = theme_var(mobile ? 'custom_logo_mobile' : 'custom_logo') %}
|
||||
<a href="{{ home_url }}" class="navbar-brand mr-10">
|
||||
{% if logo %}
|
||||
{% set logo_file = (logo|first).name %}
|
||||
<img src="{{ url('theme://images/logo/' ~ logo_file) }}" alt="{{ site.name }}" />
|
||||
{% else %}
|
||||
{% include('@images/grav-logo.svg') %}
|
||||
{% endif %}
|
||||
</a>
|
17
user/themes/lecampus/templates/partials/messages.html.twig
Normal file
17
user/themes/lecampus/templates/partials/messages.html.twig
Normal file
@@ -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,5 @@
|
||||
{% 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 lable-primary">{{ score }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<a href="{{ related.url }}" title="{{ related.title }}">{{ related.title }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
15
user/themes/lecampus/templates/partials/sidebar.html.twig
Normal file
15
user/themes/lecampus/templates/partials/sidebar.html.twig
Normal file
@@ -0,0 +1,15 @@
|
||||
{% set options = { items: {'@page.children': '/agenda'}, 'limit': 3, 'order': {'by': 'date', 'dir': 'desc'} } %}
|
||||
|
||||
<div class="sidebar">
|
||||
<div class="side-agenda">
|
||||
<h2>À venir</h2>
|
||||
{% for p in page.collection(options)%}
|
||||
{{p.title}}
|
||||
{% include 'partials/blog/date.html.twig' with {page: p } %}
|
||||
{% endfor %}
|
||||
<a href="agenda">voir tout l'agenda</a>
|
||||
</div>
|
||||
<div class="side-newsletter">
|
||||
<h3>Recevoir l’actualté du Campus</h3>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,10 @@
|
||||
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : 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