Skip to content

Commit f4e4385

Browse files
committed
Merge branch 'main' into production
2 parents 78c9513 + f959c2e commit f4e4385

File tree

6 files changed

+10
-32
lines changed

6 files changed

+10
-32
lines changed

_data/awesome.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
const EleventyFetch = require("@11ty/eleventy-fetch");
22

3-
const compareAwesomeScore = (a, b) => {
4-
return b.awesomeScore - a.awesomeScore;
5-
}
6-
7-
const sortByAwesomeScoreOrName = (a, b) => {
8-
const awesomeScoreDiff = compareAwesomeScore(a, b);
9-
if (awesomeScoreDiff < 0 || awesomeScoreDiff > 0) {
10-
return awesomeScoreDiff;
11-
} else {
12-
return a.name.localeCompare(b.name);
13-
}
14-
}
15-
163
module.exports = async function () {
174
const URL = "https://code.gouv.fr/data/awesome-codegouvfr.json";
185

@@ -21,5 +8,5 @@ module.exports = async function () {
218
type: "json"
229
});
2310

24-
return awesome.toSorted(sortByAwesomeScoreOrName);
25-
};
11+
return awesome;
12+
};

_includes/components/card-custom-home.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="fr-card__body">
44
<div class="fr-card__content">
55
{% set cardUrl = card.url | locale_url or card.externalUrl %}
6-
<h3 class="fr-card__title"><a href="{{ cardUrl }}">{{ card.title }}</a></h3>
6+
<h4 class="fr-card__title"><a href="{{ cardUrl }}">{{ card.title }}</a></h4>
77
<p class="fr-card__desc">{{ card.description }}</p>
88
{% if card.announcement %}
99
<div class="fr-card__start">
@@ -27,4 +27,4 @@
2727
</div>
2828
</div>
2929
{% endif %}
30-
</div>
30+
</div>

content/fr/awesome/index.njk

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ eleventyNavigation:
1616
<div class="fr-my-6w">
1717
<div class="fr-grid-row fr-grid-row--gutters">
1818
{% asyncAll project in awesome %}
19-
{% set projectBadgeLink %}
20-
<a class="fr-link link-no-style" href="https://github.com/codegouvfr/awesome-codegouvfr#awesome-codegouvfr-score" target="_blank"><img src="{{ project.awesomeShield }}" alt="Badge Awesome CodeGouvFr du projet {{ project.name }}"></a>
21-
{% endset %}
2219
<div class="fr-col-12 fr-col-md-3">
2320
{{ component("card", {
2421
url: false,
@@ -28,9 +25,7 @@ eleventyNavigation:
2825
image: {
2926
src: project.logo,
3027
alt: "Logo du projet " + project.name
31-
},
32-
detail: projectBadgeLink | safe,
33-
detailEnd: project.fundedBy | pluck("name") | join(", ")
28+
}
3429
}) }}
3530
</div>
3631
{% endall %}

content/fr/index.11tydata.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ module.exports = {
2727
{
2828
title: "Vous êtes une mission de service public et souhaitez référencer vos dépôts de code source ?",
2929
content: `
30-
<p>Pour ajouter une forge, un compte d'organisation GitHub ou un groupe GitLab, écrivez à <strong><a href="mailto:[email protected]">[email protected]</a></strong> ou envoyez un correctif sur <a href="https://git.sr.ht/~codegouvfr/codegouvfr-sources/tree/main/item/comptes-organismes-publics.yml" target="_blank">ce dépôt</a>.<p>
31-
<p><strong>Attention : </strong>Nous ne référençons pas les comptes personnels.</p>
30+
<p>Pour ajouter une forge, un compte d'organisation GitHub ou un groupe GitLab, écrivez à <a href="mailto:[email protected]">[email protected]</a> ou envoyez un correctif sur <a href="https://git.sr.ht/~codegouvfr/codegouvfr-sources/tree/main/item/comptes-organismes-publics.yml" target="_blank">ce dépôt</a>.<p>
31+
<p>Attention : Nous ne référençons pas les comptes personnels.</p>
3232
`
3333
},
3434
{
3535
title: "Vous êtes un BlueHat et souhaitez proposer un atelier ou un article ?",
3636
content: `
37-
<p>Écrivez à <strong><a href=\"mailto:[email protected]\">[email protected]</a></strong>.</p>`
37+
<p>Écrivez à <a href=\"mailto:[email protected]\">[email protected]</a>.</p>`
3838
}
3939
]
4040
};

content/internaldata/awesome.njk

Lines changed: 0 additions & 4 deletions
This file was deleted.

public/js/home.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
const awesomeUrl = `${window.location.origin}/fr/awesome`;
3232

3333
const getAwesome = async () => {
34-
const response = await fetch(`${dataBaseUrl}/awesome.json`);
34+
const response = await fetch(`https://code.gouv.fr/data/awesome-codegouvfr.json`);
3535
return await response.json();
3636
}
3737

@@ -42,4 +42,4 @@
4242
awesomeProjectImg.src = randomProject.logo;
4343
awesomeProjectImg.alt = logoAltTemplate`${randomProject.name}`;
4444
});
45-
})();
45+
})();

0 commit comments

Comments
 (0)