Edit administration panel layout
This commit is contained in:
parent
9c50caa6d7
commit
155b10cc9d
18 changed files with 75 additions and 252 deletions
|
@ -1,21 +0,0 @@
|
||||||
title:
|
|
||||||
en: Home
|
|
||||||
fr: Accueil
|
|
||||||
icon: list-bullet
|
|
||||||
status:
|
|
||||||
draft: true
|
|
||||||
listed: true
|
|
||||||
options:
|
|
||||||
changeSlug:
|
|
||||||
admin: true
|
|
||||||
editor: false
|
|
||||||
changeStatus: false
|
|
||||||
changeTemplate: false
|
|
||||||
changeTitle:
|
|
||||||
admin: true
|
|
||||||
editor: false
|
|
||||||
delete: false
|
|
||||||
duplicate: false
|
|
||||||
tabs:
|
|
||||||
content: tabs/exhibitions_content
|
|
||||||
seo: tabs/exhibitions_seo
|
|
|
@ -1,21 +0,0 @@
|
||||||
title:
|
|
||||||
en: Gallery
|
|
||||||
fr: Galerie
|
|
||||||
icon: images
|
|
||||||
status:
|
|
||||||
draft: true
|
|
||||||
listed: true
|
|
||||||
options:
|
|
||||||
changeSlug:
|
|
||||||
admin: true
|
|
||||||
editor: false
|
|
||||||
changeStatus: false
|
|
||||||
changeTemplate: false
|
|
||||||
changeTitle:
|
|
||||||
admin: true
|
|
||||||
editor: false
|
|
||||||
delete: false
|
|
||||||
duplicate: false
|
|
||||||
tabs:
|
|
||||||
content: tabs/gallery_content
|
|
||||||
seo: tabs/gallery_seo
|
|
5
site/blueprints/pages/home.yaml
Normal file
5
site/blueprints/pages/home.yaml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
title:
|
||||||
|
en: Home
|
||||||
|
fr: Accueil
|
||||||
|
options:
|
||||||
|
read: false
|
|
@ -1,57 +0,0 @@
|
||||||
headline:
|
|
||||||
en: Exhibitions
|
|
||||||
fr: Expositions
|
|
||||||
type: fields
|
|
||||||
fields:
|
|
||||||
exhibitions:
|
|
||||||
label:
|
|
||||||
en: Exhibitions
|
|
||||||
fr: Expositions
|
|
||||||
type: structure
|
|
||||||
prepend: true
|
|
||||||
sortable: true
|
|
||||||
required: true
|
|
||||||
fields:
|
|
||||||
url:
|
|
||||||
label:
|
|
||||||
en: URL
|
|
||||||
fr: URL
|
|
||||||
type: url
|
|
||||||
width: 2/4
|
|
||||||
external_link:
|
|
||||||
label:
|
|
||||||
en: External link
|
|
||||||
fr: Lien externe
|
|
||||||
type: toggle
|
|
||||||
text:
|
|
||||||
-
|
|
||||||
en: 'No'
|
|
||||||
fr: Non
|
|
||||||
-
|
|
||||||
en: 'Yes'
|
|
||||||
fr: Oui
|
|
||||||
width: 1/4
|
|
||||||
background_color:
|
|
||||||
when:
|
|
||||||
external_link: false
|
|
||||||
label:
|
|
||||||
en: Background color
|
|
||||||
fr: Couleur de fond
|
|
||||||
type: select
|
|
||||||
options:
|
|
||||||
feldgrau: Feldgrau
|
|
||||||
white:
|
|
||||||
en: White
|
|
||||||
fr: Blanc
|
|
||||||
default: feldgrau
|
|
||||||
width: 1/4
|
|
||||||
columns:
|
|
||||||
url:
|
|
||||||
width: 2/4
|
|
||||||
external_link:
|
|
||||||
width: 1/4
|
|
||||||
background_color:
|
|
||||||
width: 1/4
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
type: fields
|
|
||||||
fields:
|
|
||||||
meta_description:
|
|
||||||
label:
|
|
||||||
en: Meta description
|
|
||||||
fr: Méta description
|
|
||||||
type: textarea
|
|
||||||
size: small
|
|
||||||
buttons: false
|
|
||||||
help:
|
|
||||||
en: "Short description of the page displayed by search engines and social networks (recommended maximum length: 160 characters). Home page meta description is used if this field is empty."
|
|
||||||
fr: "Courte description de la page affichée par les moteurs de recherche et les réseaux sociaux (taille maximale conseillée : 160 caractères). La méta description de la page d'accueil est utilisée si ce champ est vide."
|
|
||||||
width: 3/4
|
|
||||||
gap:
|
|
||||||
type: gap
|
|
||||||
width: 1/4
|
|
||||||
meta_image:
|
|
||||||
label:
|
|
||||||
en: Meta image
|
|
||||||
fr: Méta image
|
|
||||||
type: image-clip
|
|
||||||
query: page.images
|
|
||||||
uploads: image
|
|
||||||
layout: cards
|
|
||||||
image:
|
|
||||||
cover: true
|
|
||||||
back: white
|
|
||||||
multiple: false
|
|
||||||
clip:
|
|
||||||
minwidth: 1200
|
|
||||||
minheight: 675
|
|
||||||
ratio: fixed
|
|
||||||
help:
|
|
||||||
en: "Image displayed by social networks (format: JPEG or PNG). Home page meta image is used if this field is empty."
|
|
||||||
fr: "Image affichée par les réseaux sociaux (format : JPEG ou PNG). La méta image de la page d'accueil est utilisée si ce champ est vide."
|
|
||||||
width: 1/4
|
|
||||||
# Hidden fields
|
|
||||||
og_type:
|
|
||||||
type: hidden
|
|
||||||
default: article
|
|
||||||
twitter_card_type:
|
|
||||||
type: hidden
|
|
||||||
default: summary_large_image
|
|
|
@ -2,16 +2,6 @@ type: fields
|
||||||
fields:
|
fields:
|
||||||
contact_line:
|
contact_line:
|
||||||
type: line
|
type: line
|
||||||
email:
|
|
||||||
label:
|
|
||||||
en: Email
|
|
||||||
fr: Adresse e-mail
|
|
||||||
type: email
|
|
||||||
required: true
|
|
||||||
width: 1/2
|
|
||||||
gap:
|
|
||||||
type: gap
|
|
||||||
width: 1/2
|
|
||||||
instagram:
|
instagram:
|
||||||
type: url
|
type: url
|
||||||
label:
|
label:
|
||||||
|
@ -20,3 +10,13 @@ fields:
|
||||||
icon: instagram
|
icon: instagram
|
||||||
required: true
|
required: true
|
||||||
width: 1/2
|
width: 1/2
|
||||||
|
contact_gap:
|
||||||
|
type: gap
|
||||||
|
width: 1/2
|
||||||
|
email:
|
||||||
|
label:
|
||||||
|
en: Email
|
||||||
|
fr: Adresse e-mail
|
||||||
|
type: email
|
||||||
|
required: true
|
||||||
|
width: 1/2
|
22
site/blueprints/sections/site_content_exhibitions.yml
Normal file
22
site/blueprints/sections/site_content_exhibitions.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
headline:
|
||||||
|
en: Exhibitions
|
||||||
|
fr: Expositions
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
exhibitions:
|
||||||
|
label:
|
||||||
|
en: Exhibitions
|
||||||
|
fr: Expositions
|
||||||
|
type: structure
|
||||||
|
prepend: true
|
||||||
|
sortable: true
|
||||||
|
required: true
|
||||||
|
fields:
|
||||||
|
url:
|
||||||
|
label:
|
||||||
|
en: URL
|
||||||
|
fr: URL
|
||||||
|
type: url
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
headline:
|
headline:
|
||||||
en: Artworks
|
en: Image gallery
|
||||||
fr: Œuvres
|
fr: Galerie d'images
|
||||||
type: files
|
type: files
|
||||||
template: full_screen_image
|
template: full_screen_image
|
||||||
min: 2
|
min: 2
|
||||||
layout: cards
|
layout: cards
|
||||||
size: small
|
size: small
|
||||||
limit: 60
|
limit: 10
|
||||||
image:
|
image:
|
||||||
ratio: 1/1
|
ratio: 1/1
|
||||||
back: white
|
back: white
|
|
@ -1,16 +0,0 @@
|
||||||
headline:
|
|
||||||
en: Pages
|
|
||||||
fr: Pages
|
|
||||||
type: pages
|
|
||||||
templates:
|
|
||||||
- exhibitions
|
|
||||||
- gallery
|
|
||||||
sortBy: title desc
|
|
||||||
create: false
|
|
||||||
layout: cards
|
|
||||||
size: small
|
|
||||||
image:
|
|
||||||
ratio: 1/1
|
|
||||||
cover: true
|
|
||||||
query: page.images.template('full_screen_image').first
|
|
||||||
back: white
|
|
|
@ -10,9 +10,9 @@ fields:
|
||||||
# required: true
|
# required: true
|
||||||
help:
|
help:
|
||||||
en: "Short description of the page displayed by search engines and social networks (recommended maximum length: 160 characters)."
|
en: "Short description of the page displayed by search engines and social networks (recommended maximum length: 160 characters)."
|
||||||
fr: "Courte description de la page affichée par les moteurs de recherche et les réseaux sociaux (taille maximale conseillée : 160 caractères)."
|
fr: "Courte description du site web affichée par les moteurs de recherche et les réseaux sociaux (taille maximale conseillée : 160 caractères)."
|
||||||
width: 3/4
|
width: 3/4
|
||||||
gap:
|
seo_gap:
|
||||||
type: gap
|
type: gap
|
||||||
width: 1/4
|
width: 1/4
|
||||||
meta_image:
|
meta_image:
|
||||||
|
@ -20,7 +20,7 @@ fields:
|
||||||
en: Meta image
|
en: Meta image
|
||||||
fr: Méta image
|
fr: Méta image
|
||||||
type: image-clip
|
type: image-clip
|
||||||
query: page.images
|
query: site.images
|
||||||
layout: cards
|
layout: cards
|
||||||
image:
|
image:
|
||||||
cover: true
|
cover: true
|
|
@ -3,4 +3,5 @@ title:
|
||||||
fr: Site web
|
fr: Site web
|
||||||
tabs:
|
tabs:
|
||||||
content: tabs/site_content
|
content: tabs/site_content
|
||||||
|
seo: tabs/site_seo
|
||||||
analytics: tabs/site_analytics
|
analytics: tabs/site_analytics
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
label:
|
|
||||||
en: Content
|
|
||||||
fr: Contenu
|
|
||||||
icon: text
|
|
||||||
sections:
|
|
||||||
exhibitions: sections/exhibitions_content_exhibitions
|
|
||||||
contact: sections/exhibitions_content_contact
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
label:
|
|
||||||
en: SEO
|
|
||||||
fr: Référencement
|
|
||||||
icon: search
|
|
||||||
sections:
|
|
||||||
seo_basic_meta: sections/exhibitions_seo_metadata
|
|
|
@ -1,6 +0,0 @@
|
||||||
label:
|
|
||||||
en: Content
|
|
||||||
fr: Contenu
|
|
||||||
icon: text
|
|
||||||
sections:
|
|
||||||
artworks: sections/gallery_content_images
|
|
|
@ -1,6 +1,8 @@
|
||||||
label:
|
label:
|
||||||
en: Website
|
en: Content
|
||||||
fr: Site web
|
fr: Contenu
|
||||||
icon: home
|
icon: text
|
||||||
sections:
|
sections:
|
||||||
pages: sections/site_content_pages
|
exhibitions: sections/site_content_exhibitions
|
||||||
|
artworks: sections/site_content_images
|
||||||
|
contact: sections/site_content_contact
|
||||||
|
|
|
@ -3,4 +3,4 @@ label:
|
||||||
fr: Référencement
|
fr: Référencement
|
||||||
icon: search
|
icon: search
|
||||||
sections:
|
sections:
|
||||||
seo_basic_meta: sections/generic_seo_metadata
|
seo_basic_meta: sections/site_seo_metadata
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return function ($page) {
|
return function ($site) {
|
||||||
|
|
||||||
// Get exhibitions field content (stored as yaml) and parse it to return an array
|
// Get exhibitions field content (stored as yaml) and parse it to return an array
|
||||||
$exhibitions = $page->exhibitions()->yaml();
|
$exhibitions = $site->exhibitions()->yaml();
|
||||||
|
|
||||||
// Add url based title to each exhibition
|
// Add url based title to each exhibition
|
||||||
foreach ($exhibitions as &$exhibition) {
|
foreach ($exhibitions as &$exhibition) {
|
||||||
|
@ -12,11 +12,11 @@ return function ($page) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get contact fields content
|
// Get contact fields content
|
||||||
$email = $page->email();
|
$email = $site->email();
|
||||||
$instagram = $page->instagram();
|
$instagram = $site->instagram();
|
||||||
|
|
||||||
// Get image files section content
|
// Get image files section content
|
||||||
$images = $page->files()->template("full_screen_image")->shuffle();
|
$images = $site->files()->template("full_screen_image")->shuffle();
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'exhibitions' => $exhibitions,
|
'exhibitions' => $exhibitions,
|
||||||
|
|
|
@ -6,21 +6,13 @@
|
||||||
<style itemscope itemtype="https://schema.org/WebSite" itemref="schema_name schema_description schema_image"></style>
|
<style itemscope itemtype="https://schema.org/WebSite" itemref="schema_name schema_description schema_image"></style>
|
||||||
|
|
||||||
{# Title #}
|
{# Title #}
|
||||||
{% if page.isHomePage %}
|
<title>{{ site.title }}</title>
|
||||||
<title>{{ site.title }}</title>
|
<meta id="schema_name" itemprop="name" content="{{ site.title }}">
|
||||||
<meta id="schema_name" itemprop="name" content="{{ site.title }}">
|
|
||||||
{% else %}
|
|
||||||
<title>{{ site.title }} | {{ page.title }}</title>
|
|
||||||
<meta id="schema_name" itemprop="name" content="{{ site.title }} | {{ page.title }}">
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# Description #}
|
{# Description #}
|
||||||
{% if page.meta_description is not empty %}
|
{% if site.meta_description is not empty %}
|
||||||
<meta name="description" content="{{ page.meta_description }}">
|
<meta name="description" content="{{ site.meta_description }}">
|
||||||
<meta id="schema_description" itemprop="description" content="{{ page.meta_description }}">
|
<meta id="schema_description" itemprop="description" content="{{ site.meta_description }}">
|
||||||
{% elseif site.homePage.meta_description is not empty %}
|
|
||||||
<meta name="description" content="{{ site.homePage.meta_description }}">
|
|
||||||
<meta id="schema_description" itemprop="description" content="{{ site.homePage.meta_description }}">
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# Canonical URL #}
|
{# Canonical URL #}
|
||||||
|
@ -33,53 +25,33 @@
|
||||||
<meta name="date" content="{{ page.modified('Y-m-d') }}">
|
<meta name="date" content="{{ page.modified('Y-m-d') }}">
|
||||||
|
|
||||||
{# Image #}
|
{# Image #}
|
||||||
{% if page.meta_image is not empty %}
|
{% if site.meta_image is not empty %}
|
||||||
<meta id="schema_image" itemprop="image" content="{{ page.meta_image.toImage.url }}">
|
<meta id="schema_image" itemprop="image" content="{{ site.meta_image.toImage.url }}">
|
||||||
{% elseif site.homePage.meta_image is not empty %}
|
|
||||||
<meta id="schema_image" itemprop="image" content="{{ site.homePage.meta_image.toImage.url }}">
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if page.template != 'error' %}
|
{% if page.template != 'error' %}
|
||||||
|
|
||||||
{# Open Graph #}
|
{# Open Graph #}
|
||||||
{% if page.isHomePage %}
|
<meta property="og:title" content="{{ site.title }}">
|
||||||
<meta property="og:title" content="{{ site.title }}">
|
{% if site.meta_description is not empty %}
|
||||||
{% else %}
|
<meta property="og:description" content="{{ site.meta_description }}">
|
||||||
<meta property="og:title" content="{{ site.title ~ ' | ' ~ page.title }}">
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if page.meta_description is not empty %}
|
{% if site.meta_image is not empty %}
|
||||||
<meta property="og:description" content="{{ page.meta_description }}">
|
<meta property="og:image" content="{{ site.meta_image.toImage.clip(1200, 675).url }}">
|
||||||
{% elseif site.homePage.meta_description is not empty %}
|
|
||||||
<meta property="og:description" content="{{ site.homePage.meta_description }}">
|
|
||||||
{% endif %}
|
|
||||||
{% if page.meta_image is not empty %}
|
|
||||||
<meta property="og:image" content="{{ page.meta_image.toImage.clip(1200, 675).url }}">
|
|
||||||
<meta property="og:image:width" content="1200">
|
|
||||||
<meta property="og:image:height" content="675">
|
|
||||||
{% elseif site.homePage.meta_image is not empty %}
|
|
||||||
<meta property="og:image" content="{{ site.homePage.meta_image.toImage.clip(1200, 675).url }}">
|
|
||||||
<meta property="og:image:width" content="1200">
|
<meta property="og:image:width" content="1200">
|
||||||
<meta property="og:image:height" content="675">
|
<meta property="og:image:height" content="675">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<meta property="og:url" content="{{ page.url }}">
|
<meta property="og:url" content="{{ page.url }}">
|
||||||
<meta property="og:type" content="{{ page.og_type }}">
|
<meta property="og:type" content="{{ site.og_type }}">
|
||||||
|
|
||||||
{# Twitter Card #}
|
{# Twitter Card #}
|
||||||
<meta name="twitter:card" content="{{ page.twitter_card_type.value }}">
|
<meta name="twitter:card" content="{{ site.twitter_card_type.value }}">
|
||||||
{% if page.isHomePage %}
|
<meta name="twitter:title" content="{{ site.title }}">
|
||||||
<meta name="twitter:title" content="{{ site.title }}">
|
{% if site.meta_description is not empty %}
|
||||||
{% else %}
|
<meta name="twitter:description" content="{{ site.meta_description }}">
|
||||||
<meta name="twitter:title" content="{{ site.title ~ ' | ' ~ page.title }}">
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if page.meta_description is not empty %}
|
{% if site.meta_image is not empty %}
|
||||||
<meta name="twitter:description" content="{{ page.meta_description }}">
|
<meta name="twitter:image" content="{{ site.meta_image.toImage.clip(1200, 675).url }}">
|
||||||
{% elseif site.homePage.meta_description is not empty %}
|
|
||||||
<meta name="twitter:description" content="{{ site.homePage.meta_description }}">
|
|
||||||
{% endif %}
|
|
||||||
{% if page.meta_image is not empty %}
|
|
||||||
<meta name="twitter:image" content="{{ page.meta_image.toImage.clip(1200, 675).url }}">
|
|
||||||
{% elseif site.homePage.meta_image is not empty %}
|
|
||||||
<meta name="twitter:image" content="{{ site.homePage.meta_image.toImage.clip(1200, 675).url }}">
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue