tentative blueprint modules

This commit is contained in:
2021-03-10 12:58:51 +01:00
parent 3e532f49ec
commit 7d2396c196
19 changed files with 137 additions and 46 deletions
+21 -13
View File
@@ -1,14 +1,22 @@
# EpauEpau Antimatter
# Epau Antimatter
![EpauEpau Antimatter](assets/readme_1.png)
EpauEpau Antimatter is the default [Grav](http://getgrav.org) theme. Simple, fast and modern.
# modif par Ouidade
le 10/03/21
ai créer un module "personnes.html.twig" mais ce module n'est pas visible.
ai donc rajouté ligne 51 à 55 dans modular.html.twig >>> marche pas
ai rajouté lignes 11 à 16 dans personnes.html.twig >>> marche pas
![Epau Antimatter](assets/readme_1.png)
Epau Antimatter is the default [Grav](http://getgrav.org) theme. Simple, fast and modern.
# Installation
Installing the EpauEpau Antimatter theme can be done in one of two ways. Our GPM (Grav Package Manager) installation method enables you to quickly and easily install the theme with a simple terminal command, while the manual method enables you to do so via a zip file.
Installing the Epau Antimatter theme can be done in one of two ways. Our GPM (Grav Package Manager) installation method enables you to quickly and easily install the theme with a simple terminal command, while the manual method enables you to do so via a zip file.
The theme by itself is useful, but you may have an easier time getting up and running by installing a skeleton. The EpauEpau Antimatter theme can be found in both the [One-page](https://github.com/getgrav/grav-skeleton-onepage-site) and [Blog Site](https://github.com/getgrav/grav-skeleton-blog-site) which are self-contained repositories for a complete sites which include: sample content, configuration, theme, and plugins.
The theme by itself is useful, but you may have an easier time getting up and running by installing a skeleton. The Epau Antimatter theme can be found in both the [One-page](https://github.com/getgrav/grav-skeleton-onepage-site) and [Blog Site](https://github.com/getgrav/grav-skeleton-blog-site) which are self-contained repositories for a complete sites which include: sample content, configuration, theme, and plugins.
## GPM Installation (Preferred)
@@ -16,7 +24,7 @@ The simplest way to install this theme is via the [Grav Package Manager (GPM)](h
bin/gpm install epau-epau_antimatter
This will install the EpauEpau Antimatter theme into your `/user/themes` directory within Grav. Its files can be found under `/your/site/grav/user/themes/epau-epau_antimatter`.
This will install the Epau Antimatter theme into your `/user/themes` directory within Grav. Its files can be found under `/your/site/grav/user/themes/epau-epau_antimatter`.
## Manual Installation
@@ -30,7 +38,7 @@ You should now have all the theme files under
# Updating
As development for the EpauEpau Antimatter theme continues, new versions may become available that add additional features and functionality, improve compatibility with newer Grav releases, and generally provide a better user experience. Updating EpauEpau Antimatter is easy, and can be done through Grav's GPM system, as well as manually.
As development for the Epau Antimatter theme continues, new versions may become available that add additional features and functionality, improve compatibility with newer Grav releases, and generally provide a better user experience. Updating Epau Antimatter is easy, and can be done through Grav's GPM system, as well as manually.
## GPM Update (Preferred)
@@ -38,14 +46,14 @@ The simplest way to update this theme is via the [Grav Package Manager (GPM)](ht
bin/gpm update epau-epau_antimatter
This command will check your Grav install to see if your EpauEpau Antimatter theme is due for an update. If a newer release is found, you will be asked whether or not you wish to update. To continue, type `y` and hit enter. The theme will automatically update and clear Grav's cache.
This command will check your Grav install to see if your Epau Antimatter theme is due for an update. If a newer release is found, you will be asked whether or not you wish to update. To continue, type `y` and hit enter. The theme will automatically update and clear Grav's cache.
## Manual Update
Manually updating EpauEpau Antimatter is pretty simple. Here is what you will need to do to get this done:
Manually updating Epau Antimatter is pretty simple. Here is what you will need to do to get this done:
* Delete the `your/site/user/themes/epau-epau_antimatter` directory.
* Download the new version of the EpauEpau Antimatter theme from either [GitHub](https://github.com/getgrav/grav-plugin-epau-epau_antimatter) or [GetGrav.org](http://getgrav.org/downloads/themes#extras).
* Download the new version of the Epau Antimatter theme from either [GitHub](https://github.com/getgrav/grav-plugin-epau-epau_antimatter) or [GetGrav.org](http://getgrav.org/downloads/themes#extras).
* Unzip the zip file in `your/site/user/themes` and rename the resulting folder to `epau-epau_antimatter`.
* Clear the Grav cache. The simplest way to do this is by going to the root Grav directory in terminal and typing `bin/grav clear-cache`.
@@ -101,7 +109,7 @@ icon: bar-chart-o
#### Custom Menu Items
By default, Grav generates the menu from the page structure. However, there are times when you may want to add custom menu items to the end of the menu. This is now supported in EpauEpau Antimatter by creating a menu list in your `site.yaml` file. An example of this is as follows:
By default, Grav generates the menu from the page structure. However, there are times when you may want to add custom menu items to the end of the menu. This is now supported in Epau Antimatter by creating a menu list in your `site.yaml` file. An example of this is as follows:
```
menu:
@@ -117,7 +125,7 @@ The `url:` option is required, but you can provide **either** or **both** `text:
##### Daring Fireball Link Pages
EpauEpau Antimatter supports the ability for a page to have a `link:` header option. This will then in turn create a **link page** where the title of the page will actually be linked to the link provided and a prefexid double angle `>>` will link to the page itself. Simply provide the link in the page header:
Epau Antimatter supports the ability for a page to have a `link:` header option. This will then in turn create a **link page** where the title of the page will actually be linked to the link provided and a prefexid double angle `>>` will link to the page itself. Simply provide the link in the page header:
```
link: http://getgrav.org/blog
@@ -125,7 +133,7 @@ link: http://getgrav.org/blog
# Setup
If you want to set EpauEpau Antimatter as the default theme, you can do so by following these steps:
If you want to set Epau Antimatter as the default theme, you can do so by following these steps:
* Navigate to `/your/site/grav/user/config`.
* Open the **system.yaml** file.
@@ -1,70 +0,0 @@
media:
video:
mp4: video/mp4
mov: video/quicktime
m4v: video/x-m4v
swf: video/x-flv
image:
jpg: image/jpeg
jpeg: image/jpeg
png: image/png
gif: image/gif
file:
txt: text/plain
doc: application/msword
html: text/html
pdf: application/pdf
zip: application/zip
gz: application/gzip
form:
key: filename
fields:
upload:
type: upload
label: Upload
allow:
'@media.*.keys'
accept:
'@media.*.values'
filename:
type: text
label: Filename
type:
type: hidden
default: video
name:
type: unset
description:
type: textarea
label: Description
url:
type: unset
path:
type: unset
thumb:
type: unset
width:
type: text
label: Width
height:
type: text
label: Height
mime:
type: hidden
default: 'application/octet-stream'
modified:
type: unset
@@ -1,89 +0,0 @@
title: Blog
'@extends':
type: default
context: blueprints://pages
child_type: item
title: Default
rules:
slug:
pattern: "[a-z][a-z0-9_\-]+"
min: 2
max: 80
form:
fields:
tabs:
type: tabs
active: 1
fields:
advanced:
fields:
overrides:
fields:
header.child_type:
default: item
blog:
type: tab
title: Blog List
fields:
header.content.items:
type: textarea
yaml: true
label: Items
default: '@self.children'
header.content.limit:
type: text
label: Max Item Count
default: 5
validate:
required: true
type: int
min: 1
header.content.order.by:
type: select
label: Order By
default: date
options:
folder: Folder
title: Title
date: Date
default: Default
header.content.order.dir:
type: select
label: Order
default: desc
options:
asc: Ascending
desc: Descending
header.content.pagination:
type: toggle
label: Pagination
highlight: 1
default: 1
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool
header.content.url_taxonomy_filters:
type: toggle
label: URL Taxonomy Filters
highlight: 1
default: 1
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool
@@ -1,2 +0,0 @@
title: Nopad
'@extends': default
@@ -1,103 +0,0 @@
title: Item
'@extends':
type: default
context: blueprints://pages
form:
fields:
tabs:
fields:
blog:
type: tab
title: Blog Item
fields:
header_image:
type: section
title: Header Image
underline: true
header.header_image:
type: toggle
toggleable: true
label: Display Header Image
help: Enabled displaying of a header image
highlight: 1
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
header.header_image_file:
type: text
toggleable: true
label: Image File
help: image filename that exists in the page folder. If not provided, will use the first image found.
placeholder: For example: myimage.jpg
header.header_image_width:
type: text
toggleable: true
label: Image Width
size: small
help: Header width in px
placeholder: Default is 900
validate:
type: int
min: 0
max: 5000
header.header_image_height:
type: text
toggleable: true
label: Image Height
size: small
help: Header height in px
placeholder: Default is 300
validate:
type: int
min: 0
max: 5000
summary:
type: section
title: Summary
underline: true
header.summary.enabled:
type: toggle
toggleable: true
label: Summary
highlight: 1
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
header.summary.format:
type: select
toggleable: true
label: Format
classes: fancy
options:
'short': 'Use the first occurence of delimter or size'
'long': 'Summary delimiter will be ignored'
header.summary.size:
type: text
toggleable: true
label: Size
classes: large
placeholder: 300
validate:
type: int
min: 1
header.summary.delimiter:
type: text
toggleable: true
label: Summary delimiter
classes: large
placeholder: ===
@@ -1,40 +0,0 @@
title: Features
'@extends': default
form:
fields:
tabs:
fields:
advanced:
fields:
columns:
fields:
column1:
fields:
name:
default: modular/features
'@data-options': '\Grav\Common\Page\Pages::modularTypes'
overrides:
fields:
header.template:
default: modular/features
'@data-options': '\Grav\Common\Page\Pages::modularTypes'
features:
type: tab
title: Features
fields:
header.features:
name: features
type: list
label: Features
fields:
.icon:
type: text
label: Icon
.header:
type: text
label: Header
.text:
type: text
label: Text
@@ -1,36 +0,0 @@
title: Personnes
'@extends': default
form:
fields:
tabs:
fields:
features:
type: tab
title: Personnes
fields:
header.class:
type: select
label: Layout
default: small
size: medium
header.features:
name: features
type: list
label: Personnes
fields:
.nom:
type: text
label: Nom
.fonction:
type: text
label: Fonction
.biographie:
type: editor
label: Biographie
.portrait:
type: file
label: Portrait
@@ -1,46 +0,0 @@
title: Showcase
'@extends': default
form:
fields:
tabs:
fields:
advanced:
fields:
columns:
fields:
column1:
fields:
name:
default: modular/showcase
'@data-options': '\Grav\Common\Page\Pages::modularTypes'
overrides:
fields:
header.template:
default: modular/showcase
'@data-options': '\Grav\Common\Page\Pages::modularTypes'
buttons:
type: tab
title: Buttons
fields:
header.buttons:
name: buttons
type: list
label: Buttons
fields:
.text:
type: text
label: Text
.url:
type: text
label: URL
.primary:
type: toggle
label: Primary
highlight: 1
default: 1
options:
1: 'Yes'
0: 'No'
validate:
type: bool
@@ -1,34 +0,0 @@
title: Text
'@extends': default
form:
fields:
tabs:
fields:
advanced:
fields:
columns:
fields:
column1:
fields:
name:
default: modular/text
'@data-options': '\Grav\Common\Page\Pages::modularTypes'
overrides:
fields:
header.template:
default: modular/text
'@data-options': '\Grav\Common\Page\Pages::modularTypes'
content:
fields:
uploads:
label: Page Media (first one will be displayed next to your content)
header.image_align:
type: select
label: Image position
classes: fancy
default: left
options:
'left': 'Left'
'right': 'Right'
type:
@@ -48,9 +48,18 @@
{% endblock %}
{% block content %}
{# ça marche pas non plus #}
<section class="personnes">
{{ header.personnes}}
</section>
{{ page.content|raw }}
{% for module in page.collection() %}
<div id="{{ _self.pageLinkName(module.menu) }}"></div>
{{ module.content|raw }}
{% endfor %}
{% endblock %}
@@ -1,5 +1,7 @@
<div class="modular-row features {{ page.header.class}}">
{{ content|raw }}
{{ dump(page) }}
<div class="feature-items">
{% for feature in page.header.features %}
<div class="feature">
@@ -1,30 +1,32 @@
{% 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-personnes {{ page.header.class}}">
<section class="container {{ grid_size }}">
<div class="frame-box">
<div class="modular-row features {{ page.header.class}}">
{{ content|raw }}
<div class="feature-items">
{% for feature in page.header.personnes %}
<div class="personnes">
{% if feature.icon %}
<i class="fa fa-fw fa-{{ feature.icon }}"></i>
<div class="feature-content icon-offset">
{% else %}
{{ content|raw }}
{# ai essayé de changer les nom et class avec nouveaux champs mais marche pas #}
<div class="personnes-content">
{% endif %}
{% if personnes.nom %}
<h4>{{ personnes.nom }}</h4>
{% endif %}
<div class="columns">
{% for features in page.header.features %}
<div class="column {{ columns }}">
{% if features.url %}<a href="{{features.url}}">{% endif %}
<div class="features-icon">
<i class="fa fa-fw {{ features.icon }}"></i>
{% if features.header %}
<h6>{{ features.header }}</h6>
{% endif %}
</div>
{% if features.url %}</a>{% endif %}
<div class="features-content">
{% if features.text %}
<p>{{ features.text }}</p>
{% endif %}
</div>
</div>
{% endfor %}
</div>
{# voici l'original du module features pré existant #}
<div class="feature-content">
{% endif %}
{% if feature.header %}
<h4>{{ feature.header }}</h4>
{% endif %}
{% if feature.text %}
<p>{{ feature.text }}</p>
{% endif %}
</div>
</section>
</section>
</div>
{% endfor %}
</div>
</div>
@@ -0,0 +1,22 @@
<div class="modular-row programmes{{ page.header.class}}">
{{ content|raw }}
<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>
@@ -63,6 +63,8 @@
{% block showcase %}{% endblock %}
{% block body %}
<section id="body" class="{{ class }}">
{% block content %}{% endblock %}