Edit website structure

This commit is contained in:
Paul Nicoué 2022-07-21 17:20:07 +02:00
parent 2b79d762b3
commit 5921d2fafe
19 changed files with 104 additions and 110 deletions

File diff suppressed because one or more lines are too long

View file

@ -80,23 +80,23 @@ body {
// HEADER
// ----------------------------------------------------------------------------
// Header bar
// Sidebar
.header-bar {
.sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
padding: var(--header-bar-vertical-padding) var(--header-bar-horizontal-padding);
padding: var(--sidebar-vertical-padding) var(--sidebar-horizontal-padding);
overflow-y: auto;
background-color: transparent;
transition: background-color 400ms ease-in-out;
.header-bar__nav {
.sidebar__nav {
.header-bar__nav-item {
.sidebar__nav-item {
+ .header-bar__nav-item {
+ .sidebar__nav-item {
margin: 0.75rem 0 0 0;
}
}
@ -107,7 +107,7 @@ body {
}
}
.header-bar__social {
.sidebar__social {
display: flex;
align-items: center;
margin: 1rem 0 0 0;
@ -135,14 +135,14 @@ body {
&:hover {
background-color: var(--transparent-white);
.header-bar__nav {
.sidebar__nav {
a {
color: var(--black);
}
}
.header-bar__social {
.sidebar__social {
svg {
fill: var(--black);
@ -157,12 +157,12 @@ body {
// Home section
.home-section {
.exhibitions-section {
width: 100vw;
height: 100vh;
}
.home-section__iframe {
.exhibitions-section__iframe {
width: 100%;
height: 100%;
}

View file

@ -26,8 +26,8 @@
// Dimensions
--icon-size: 2rem;
--header-bar-vertical-padding: 1rem;
--header-bar-horizontal-padding: 1rem;
--sidebar-vertical-padding: 1rem;
--sidebar-horizontal-padding: 1rem;
// Colors

View file

@ -1,7 +1,7 @@
title:
en: Home
fr: Accueil
icon: home
icon: list-bullet
status:
draft: true
listed: true
@ -17,5 +17,5 @@ options:
delete: false
duplicate: false
tabs:
content: tabs/home_content
seo: tabs/home_seo
content: tabs/exhibitions_content
seo: tabs/exhibitions_seo

View file

@ -1,7 +1,7 @@
title:
en: Gallery
fr: Galerie
icon: file-image
icon: images
status:
draft: true
listed: true

View file

@ -3,17 +3,6 @@ headline:
fr: Expositions
type: fields
fields:
featured_exhibition:
label:
en: Featured exhibition
fr: Exposition mise en avant
type: select
options: query
query:
fetch: page.exhibitions.toStructure
text: '{{ structureItem.url }}'
value: '{{ structureItem.url }}'
width: 1/2
exhibitions:
label:
en: Exhibitions

View file

@ -3,13 +3,14 @@ headline:
fr: Pages
type: pages
templates:
- home
- about
- exhibitions
- gallery
sortBy: title desc
create: false
layout: cardlets
layout: cards
size: small
image:
ratio: 1/1
cover: true
query: page.images.template('image').first
back: white

View file

@ -0,0 +1,9 @@
label:
en: Content
fr: Contenu
icon: text
sections:
exhibitions: sections/exhibitions_content_exhibitions
contact: sections/exhibitions_content_contact

View file

@ -3,4 +3,4 @@ label:
fr: Référencement
icon: search
sections:
seo_basic_meta: sections/home_seo_metadata
seo_basic_meta: sections/exhibitions_seo_metadata

View file

@ -1,7 +0,0 @@
label:
en: Content
fr: Contenu
icon: text
sections:
exhibitions: sections/home_content_exhibitions

View file

@ -4,4 +4,3 @@ label:
icon: home
sections:
pages: sections/site_content_pages
contact: sections/site_content_contact

View file

@ -2,6 +2,7 @@
return [
// Kirby configuration settings
'home' => 'gallery',
'panel' => [
'language' => 'fr',
'css' => 'assets/build/panel.css'

View file

@ -10,7 +10,13 @@ return function ($page) {
$exhibition['title'] = str_replace(['http://', 'https://', 'www.'], '', $exhibition['url']);
}
// Get contact fields content
$email = $page->email();
$instagram = $page->instagram();
return [
'exhibitions' => $exhibitions
'exhibitions' => $exhibitions,
'email' => $email,
'instagram' => $instagram
];
};

View file

@ -38,54 +38,13 @@
{% block header %}
<header>
<div class="header-bar">
<nav class="header-bar__nav" aria-label="Menu">
{% if exhibitions is not empty %}
<ul class="header-bar__nav-menu">
{% for exhibition in exhibitions %}
<li class="header-bar__nav-item">
{% if exhibition.external_link == false %}
<a href="{{ exhibition.url }}" target="iframe">{{ exhibition.title }}</a>
{% elseif exhibition.external_link == true %}
<a href="{{ exhibition.url }}" target="_blank">{{ exhibition.title }}</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</nav>
<div class="header-bar__social">
<a class="header-bar__gallery-button" href="#" target="_self" aria-label="Show {{ site.title }}'s image gallery">
<svg aria-hidden="true" viewBox="0 0 48 48" fill="currentColor">
<path d="M17.25 29.15H36.8l-6.35-8.55-5.15 6.75L21.9 23ZM10 38V4h34v34Zm3-3h28V7H13Zm-9 9V10h3v31h31v3Zm9-9V7v28Z"/>
</svg>
</a>
<a class="header-bar__email-button" href="mailto:{{ site.email }}" target="_blank" aria-label="Write an email to {{ site.title }}">
<svg aria-hidden="true" viewBox="0 0 48 48" fill="currentColor">
<path d="M4 40V8h40v32Zm20-15.1L7 13.75V37h34V13.75Zm0-3L40.8 11H7.25ZM7 13.75V11v2.75Z"/>
</svg>
</a>
</div>
</div>
<div></div>
</header>
{% endblock %}
{% block main %}
{% endblock %}
{% block footer %}
<footer>
<div class="footer-bar">
</div>
</footer>
{% endblock %}
</body>
</html>

View file

@ -0,0 +1,47 @@
{% extends "base.twig" %}
{% block header %}
<header>
<div class="sidebar">
<nav class="sidebar__nav" aria-label="Menu">
{% if exhibitions is not empty %}
<ul class="sidebar__nav-menu">
{% for exhibition in exhibitions %}
<li class="sidebar__nav-item">
{% if exhibition.external_link == false %}
<a href="{{ exhibition.url }}" target="iframe">{{ exhibition.title }}</a>
{% elseif exhibition.external_link == true %}
<a href="{{ exhibition.url }}" target="_blank">{{ exhibition.title }}</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</nav>
<div class="sidebar__social">
<a class="sidebar__gallery-button" href="#" target="_self" aria-label="Show {{ site.title }}'s image gallery">
<svg aria-hidden="true" viewBox="0 0 48 48" fill="currentColor">
<path d="M17.25 29.15H36.8l-6.35-8.55-5.15 6.75L21.9 23ZM10 38V4h34v34Zm3-3h28V7H13Zm-9 9V10h3v31h31v3Zm9-9V7v28Z"/>
</svg>
</a>
<a class="sidebar__email-button" href="mailto:{{ email }}" target="_blank" aria-label="Write an email to {{ site.title }}">
<svg aria-hidden="true" viewBox="0 0 48 48" fill="currentColor">
<path d="M4 40V8h40v32Zm20-15.1L7 13.75V37h34V13.75Zm0-3L40.8 11H7.25ZM7 13.75V11v2.75Z"/>
</svg>
</a>
</div>
</div>
</header>
{% endblock %}
{% block main %}
<main>
<section class="home-section">
<iframe class="home-section__iframe" src="{{ page.featured_exhibition }}" name="iframe"></iframe>
</section>
</main>
{% endblock %}

View file

@ -0,0 +1 @@
{% extends "base.twig" %}

View file

@ -1,11 +0,0 @@
{% extends "base.twig" %}
{% block main %}
<main>
<section class="home-section">
<iframe class="home-section__iframe" src="{{ page.featured_exhibition }}" name="iframe"></iframe>
</section>
</main>
{% endblock %}