forked from codegouvfr/eleventy-dsfr
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const EleventyFetch = require("@11ty/eleventy-fetch"); | ||
|
||
module.exports = async function () { | ||
const URL = "https://code.gouv.fr/data/fr-ospos.json"; | ||
|
||
let ospos = await EleventyFetch(URL, { | ||
duration: "2w", | ||
type: "json" | ||
}); | ||
|
||
return ospos; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: "OSPOs du secteur public" | ||
description: La liste des Open Source Programme Offices du secteur public. | ||
layout: layouts/page.njk | ||
eleventyNavigation: | ||
key: "OSPOs du secteur public" | ||
parent: Ressources | ||
order: 4 | ||
--- | ||
|
||
{% from "components/component.njk" import component with context %} | ||
{{ component("callout", { | ||
title: "Qu'est-ce qu'un OSPO ?", | ||
description: 'Consultez la <a class="fr-link fr-text--lead" href="https://code.gouv.fr/fr/blog/definition-ospo/" target="_blank">proposition de définition d\'un OSPO</a> et <a class="fr-link fr-text--lead" href="mailto:[email protected]">sollicitez-nous pour être référencés</a>.' | safe | ||
}) }} | ||
<div class="fr-my-6w"> | ||
<div class="fr-grid-row fr-grid-row--gutters"> | ||
{% asyncAll ospo in ospos %} | ||
<div class="fr-col-12 fr-col-md-3"> | ||
{{ component("card", { | ||
url: false, | ||
externalUrl: ospo.url, | ||
title: ospo.name, | ||
description: ospo.description | ||
}) }} | ||
</div> | ||
{% endall %} | ||
</div> | ||
</div> |