Remove exhibition links

This commit is contained in:
Paul Nicoué 2025-05-01 16:09:33 +02:00
parent 84de819756
commit aa60c4d52b
5 changed files with 5 additions and 100 deletions

View file

@ -1,22 +0,0 @@
label:
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

View file

@ -3,6 +3,5 @@ label:
fr: Contenu
icon: text
sections:
exhibitions: sections/site_content_exhibitions
artworks: sections/site_content_images
contact: sections/site_content_contact

View file

@ -2,28 +2,18 @@
return function ($site) {
// Get exhibitions field content (stored as yaml) and parse it to return an array
$exhibitions = $site->exhibitions()->yaml();
// Add url based title to each exhibition
foreach ($exhibitions as &$exhibition) {
$exhibition['title'] = str_replace(['http://', 'https://', 'www.', '.html'], '', $exhibition['url']);
$exhibition['title'] = rtrim($exhibition['title'], '/');
}
// Get image files section content
$images = $site->files()->template("full_screen_image")->shuffle();
// Get contact fields content
$email = $site->email();
$instagram = $site->instagram();
$portfolio = $site->portfolio()->toFile();
// Get image files section content
$images = $site->files()->template("full_screen_image")->shuffle();
return [
'exhibitions' => $exhibitions,
'images' => $images,
'email' => $email,
'instagram' => $instagram,
'portfolio' => $portfolio,
'images' => $images
'portfolio' => $portfolio
];
};

View file

@ -5,18 +5,6 @@
<section class="home-section">
<nav class="navigation" aria-label="Menu">
{% if exhibitions is not empty %}
<ul class="navigation__menu">
{% for exhibition in exhibitions %}
<li class="navigation__item">
<a class="navigation__link" href="{{ exhibition.url }}" target="_blank">{{ exhibition.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</nav>
<div class="social">
<a class="social__link" href="{{ instagram }}" target="_blank" title="Go to {{ site.title }}'s Instagram profile">
<svg class="instagram-icon" aria-hidden="true" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">