Compare commits
No commits in common. "d3b32228db38728baa46dd00cde82c065a7f3c24" and "50e184be3c6d5757b83d683464a7d766461d261b" have entirely different histories.
d3b32228db
...
50e184be3c
7 changed files with 16 additions and 55 deletions
|
|
@ -15,19 +15,20 @@ const postsLoop = allPosts.slice(0, count).map((post) => {
|
|||
{
|
||||
postsLoop.map((post) => {
|
||||
return (
|
||||
<a
|
||||
href={post.link}
|
||||
class="relative block border border-transparent border-dashed p-7 group rounded-2xl no-underline text-inherit"
|
||||
<div
|
||||
class="relative border border-transparent border-dashed cursor-pointer p-7 group rounded-2xl"
|
||||
onclick={`location.href = '${post.link}'`}
|
||||
>
|
||||
<div class="absolute inset-0 z-20 w-full h-full duration-300 ease-out bg-white border border-dashed dark:bg-neutral-950 rounded-2xl border-neutral-300 dark:border-neutral-600 group-hover:-translate-x-1 group-hover:-translate-y-1" />
|
||||
<div class="absolute inset-0 z-10 w-full h-full duration-300 ease-out border border-dashed rounded-2xl border-neutral-300 dark:border-neutral-600 group-hover:translate-x-1 group-hover:translate-y-1" />
|
||||
<div class="relative z-30 duration-300 ease-out group-hover:-translate-x-1 group-hover:-translate-y-1">
|
||||
<h2 class="flex items-center mb-3">
|
||||
<span
|
||||
<a
|
||||
href={post.link}
|
||||
class="text-xl font-bold leading-tight tracking-tight sm:text-2xl dark:text-neutral-100"
|
||||
>
|
||||
{post.title}
|
||||
</span>
|
||||
</a>
|
||||
<svg
|
||||
class="group-hover:translate-x-0 flex-shrink-0 translate-y-0.5 -translate-x-1 w-2.5 h-2.5 stroke-current ml-1 transition-all ease-in-out duration-200 transform"
|
||||
viewBox="0 0 13 15"
|
||||
|
|
@ -75,7 +76,7 @@ const postsLoop = allPosts.slice(0, count).map((post) => {
|
|||
Posted on {post.dateFormatted}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ const photoBlogPostsCollection = defineCollection({
|
|||
tags: z.array(z.string()).optional(),
|
||||
featured: z.boolean().default(false),
|
||||
draft: z.boolean().default(false),
|
||||
lang: z.enum(['fr', 'en', 'ar']).default('fr'),
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
---
|
||||
title: "إنيغما"
|
||||
description: |
|
||||
إنيغما كانت مسابقة بحث عن الكنز بين المدارس نظّمها المركز العالي للدراسات CESIM يوم السبت، تحت عنوان «البحث عن كنز ابن بطوطة المنسي». 4 فرق طنجاوية دُعيت لتمثيل مؤسساتها.
|
||||
|
||||
تغطية.
|
||||
date: 2015-04-25
|
||||
coverImage: "../../assets/images/photos/blog/enigma/01-Enigma-v1.jpg"
|
||||
tags: []
|
||||
featured: true
|
||||
draft: false
|
||||
lang: ar
|
||||
---
|
||||
|
||||
إنيغما كانت مسابقة بحث عن الكنز بين المدارس نظّمها [CESIM](https://ecolesuperieure.ma/ecole/cesim/) يوم السبت، تحت عنوان «البحث عن كنز ابن بطوطة المنسي». 4 فرق طنجاوية دُعيت لتمثيل مؤسساتها.
|
||||
|
||||
تغطية.
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
---
|
||||
title: "Enigma"
|
||||
description: |
|
||||
Enigma was an inter-school treasure hunt organized this saturday by the CESIM, on the theme "In search of forgotten treasure of Ibn Battuta". 4 Tangier teams were invited to represent their respective institutions.
|
||||
|
||||
Recap.
|
||||
date: 2015-04-25
|
||||
coverImage: "../../assets/images/photos/blog/enigma/01-Enigma-v1.jpg"
|
||||
tags: []
|
||||
featured: true
|
||||
draft: false
|
||||
lang: en
|
||||
---
|
||||
|
||||
Enigma was an inter-school treasure hunt organized this saturday by the [CESIM](https://ecolesuperieure.ma/ecole/cesim/), on the theme "In search of forgotten treasure of Ibn Battuta". 4 Tangier teams were invited to represent their respective institutions.
|
||||
|
||||
Recap.
|
||||
|
|
@ -1,9 +1,6 @@
|
|||
---
|
||||
title: "Enigma"
|
||||
description: |
|
||||
Enigma était une chasse au trésor inter-écoles organisée ce samedi par le CESIM, sur le thème « À la recherche du trésor oublié d'Ibn Battuta ». 4 équipes tangéroises étaient invitées à représenter leurs établissements respectifs.
|
||||
|
||||
Récap.
|
||||
description: "Série artistique en noir et blanc"
|
||||
date: 2015-04-25
|
||||
coverImage: "../../assets/images/photos/blog/enigma/01-Enigma-v1.jpg"
|
||||
tags: []
|
||||
|
|
@ -11,6 +8,8 @@ featured: true
|
|||
draft: false
|
||||
---
|
||||
|
||||
Enigma était une chasse au trésor inter-écoles organisée ce samedi par le [CESIM](https://ecolesuperieure.ma/ecole/cesim/), sur le thème « À la recherche du trésor oublié d'Ibn Battuta ». 4 équipes tangéroises étaient invitées à représenter leurs établissements respectifs.
|
||||
# Enigma
|
||||
|
||||
Récap.
|
||||
Série artistique en noir et blanc
|
||||
|
||||
**40 photos**
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import Lightbox from '../../../components/photo/Lightbox.astro';
|
|||
import { getCollection } from 'astro:content';
|
||||
|
||||
// Importer toutes les images du dossier photos
|
||||
const allImages = import.meta.glob<{ default: ImageMetadata }>('/src/assets/images/photos/blog/**/*.{jpg,jpeg,png,webp}');
|
||||
const allImages = import.meta.glob<{ default: ImageMetadata }>('/src/assets/images/photos/**/*.{jpg,jpeg,png,webp}');
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const allPhotoBlogPosts = await getCollection('photoBlogPosts');
|
||||
|
|
@ -23,11 +23,8 @@ const { Content } = await post.render();
|
|||
// coverImage est déjà un ImageMetadata grâce au schema image() dans config.ts
|
||||
const coverImage = post.data.coverImage;
|
||||
|
||||
// Slug de base sans suffixe de langue (enigma.en → enigma)
|
||||
const baseSlug = post.slug.replace(/\.(en|ar)$/, '');
|
||||
|
||||
// Charger toutes les images du dossier correspondant au slug
|
||||
const albumPath = `/src/assets/images/photos/blog/${baseSlug}/`;
|
||||
const albumPath = `/src/assets/images/photos/blog/${post.slug}/`;
|
||||
const albumImages = Object.keys(allImages)
|
||||
.filter(path => path.startsWith(albumPath))
|
||||
.sort();
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@ import CategoryNav from '../../../components/photo/CategoryNav.astro';
|
|||
import { getCollection } from 'astro:content';
|
||||
import { Picture } from 'astro:assets';
|
||||
|
||||
// Récupération des posts photo (langue par défaut : FR)
|
||||
const allPhotoBlogPosts = (await getCollection('photoBlogPosts'))
|
||||
.filter(post => (post.data.lang ?? 'fr') === 'fr');
|
||||
// Récupération des posts photo
|
||||
const allPhotoBlogPosts = await getCollection('photoBlogPosts');
|
||||
|
||||
// Tri par date (plus récent en premier)
|
||||
const sortedPosts = allPhotoBlogPosts.sort((a, b) =>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue