-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
264 lines (242 loc) · 10.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Accueil - OSS by MAIF</title>
<meta name="description" content="OSS By Maif">
<meta property="og:image" content="https://maif.github.io/img/header-home.svg" />
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://masonry.desandro.com/masonry.pkgd.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="img/favicon.ico" />
</head>
<body class="home">
<nav class="navbar navbar-expand-sm fixed-top navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand flex-grow-1" href="https://maif.github.io/" id="slogan" style="opacity: 0;"><img
alt="logo MAIF" src="https://static.maif.fr/resources/img/logo-maif.svg" />
<span>#OSSbyMAIF</span></a>
<button class="navbar-toggler me-2" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse order-2 order-sm-0" id="navbarSupportedContent">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link active" href="https://maif.github.io/"><i class="fas fa-home"></i></a>
</li>
<li class="nav-item">
<a class="nav-link" aria-current="page" href="projets.html">PROJETS</a>
</li>
<li class="nav-item">
<a class="nav-link" aria-current="page" href="contributeurs.html">CONTRIBUTEURS</a>
</li>
</ul>
</div>
<!--<select
id="language"
class="form-select"
aria-label="Default select example"
>
<option value="English">English</option>
<option value="Francais" selected>Français</option>
</select>-->
</div>
</nav>
<div class="bg-blue">
<section class="container">
<div class="d-flex justify-content-center align-items-center p-4">
<img class="w-10" alt="logo MAIF" src="https://static.maif.fr/resources/img/logo-maif.svg" />
<div class="text-white ms-4">
<h1>#OSSbyMAIF</h1>
<h2>
Designing & building <strong>commons</strong><br />since
<strong>1934</strong>
</h2>
</div>
</div>
</section>
</div>
<div class="">
<div class="container p-4">
<div class="row projets">
<div class="col-12 mb-4">
<h2>Projets mis à jour récemment</h2>
</div>
<div class="row justify-content-center" id="load_projets">
<img class="img-fluid col-2" src="img/loading.gif" alt="loader">
</div>
<div class="row" id="projets"></div>
<div class="col-12 p-4 d-flex justify-content-end"><a href="projets.html"
class="text-decoration-none txt-dark"><button class="btn btn-secondary">Voir tous les projets</button></a>
</div>
</div>
</div>
</div>
<div class="bg-light">
<div class="container p-4">
<div class="row">
<div class="col-12 ">
<h2>Dernières releases</h2>
</div>
<div class="row justify-content-center" id="load_wall">
<img class="img-fluid col-2" src="img/loading.gif" alt="loader">
</div>
</div>
</div>
<div class="container grid p-4" id="actus"></div>
<div class="container p-4 d-flex justify-content-center" id="more"><button class="btn btn-secondary">Voir
plus</button></div>
</div>
<div class="container-fluid intro">
<div class="row">
<div class="col-3 d-none d-sm-flex justify-content-center">
<img alt="personnage filaire" src="img/filaire-4.svg">
</div>
<div class="col-12 col-sm-9 p-4 anim_text">
<p>
Parce qu’elles permettent la diffusion et le partage des
connaissances et qu’elles facilitent la coopération avec ses
partenaires, la MAIF privilégie les technologies de l'open source.
Elle a même fait de ce principe un pilier de sa charte numérique. En
retour, notre mutuelle d'assurance propose en libre accès le code
source d'outils informatiques qu’elle a conçus. En décembre 2018, le
Conseil national du logiciel libre lui a décerné le prix du «
Meilleur projet open source de l’année » pour cette initiative.
</p>
<p>
<a href="https://entreprise.maif.fr/engagements/economie-responsable/numerique-au-service-de-lhumain"
class="external-link" target="_blank">→ Open source : l'engagement MAIF</a>
</p>
</div>
</div>
</div>
<footer>
<div class="container">
<div class="row">
<div class="col">
<div class="footer-content">
<a href="mailto:[email protected]"><span class="fa fa-envelope me-2"></span>[email protected]</a>
<span>|</span>
<a href="https://github.com/MAIF"><span class="fab fa-github me-2"></span>github.com/MAIF</a>
<span>|</span>
<a href="https://medium.com/oss-by-maif"><span class="fab fa-medium me-2"></span>medium.com/oss-by-maif</a>
<span>|</span>
made with <span class="fa fa-heart"></span>
<span>|</span>
<a href="https://maif.fr"><img alt="logo MAIF" src="https://static.maif.fr/resources/img/logo-maif.svg"
width="40" /></a>
</div>
</div>
</div>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script>
let actus = document.getElementById("actus");
let cardsDisplay = 0;
const createCards = (infos, target) => {
let card = document.createElement("div");
let newDate = "";
card.className = "grid-item";
switch (target) {
case "Release":
newDate = infos.date.split("T")[0];
card.innerHTML = `<div class="card m-2 shadow" data-type="release"><div class="card-body"><h5 class="card-title">${infos.name}</h5><div class="card-text text-left mt-4"><h4>${infos.project}</h4>${infos.highlights}</div></div><div class="card-footer d-flex justify-content-between align-items-center"><a href="${infos.url}" class="stretched-link"><img class="img-fluid" src="./img/${infosRepos[infos.project].img}" style="width:30px; filter: grayscale(100%);" alt="logo ${infos.project}"></a> <span class="footer_date">${newDate}</span></div></div>`;
break;
}
actus.appendChild(card);
};
fetch("social-data/releases.json").then((response) => response.json())
.then(releases => {
releases.sort((a, b) => {
return new Date(b?.date) - new Date(a?.date);
})
releases.forEach(release => {
createCards(release, "Release")
})
document.getElementById("load_wall").style.display = "none"
displayMore('init')
})
function launchMsnry() {
var elem = document.querySelector(".grid");
elem.style.display = "block";
var msnry = new Masonry(elem, {
// options
itemSelector: ".grid-item",
columnWidth: 400,
});
}
function displayMore(setup) {
let cardsDisplayIncrement = setup == "init" ? 3 : 3
for (let index = cardsDisplay; index < cardsDisplay + cardsDisplayIncrement; index++) {
if (actus.childNodes[index]) {
const el = actus.childNodes[index].childNodes[0];
el.style.display = "block"
el.classList.add("animCard")
}
}
launchMsnry();
cardsDisplay += cardsDisplayIncrement
if (cardsDisplay>=actus.childNodes.length ) {
btnMore.classList.remove("d-flex")
btnMore.classList.add("d-none")
}
}
</script>
<script src="js/sticky.js"></script>
<script src="js/infos.js"></script>
<script>
let projets = document.getElementById("projets");
const createProject = (projet) => {
let newDate = projet.date_pushed.split("T")[0];
const date1 = new Date(newDate);
const date2 = new Date();
const joursDepuisLastPush = (date2.getTime() - date1.getTime()) / (1000 * 3600 * 24);
newDate = Math.round(joursDepuisLastPush)
let containerProjet = document.createElement("div");
containerProjet.className = "col-12 col-sm-6 col-md-4";
containerProjet.innerHTML = `<div class="card m-2 shadow">
<div class="card-body">
<img class="logo " style="filter: grayscale(100%);" src="./img/${infosRepos[projet.title].img}" alt="logo ${projet.title}">
<h5 class="mt-2 product_title text-center">${projet.title}</h5>
</div>
<div class="card-footer">
<a href="${infosRepos[projet.title].url_project}" class="stretched-link text-decoration-none txt-dark">
<i class="fab fa-github fa-lg me-2" aria-hidden="true"></i>
${newDate === 0 ? "Mis à jour aujourd'hui" : ("Mis à jour il y a " + newDate + " jour" + (newDate > 1 ? "s" : ""))}
</a>
</div>
</div>`;
document.getElementById("load_projets").style.display = "none"
projets.appendChild(containerProjet);
}
fetch("social-data/contributors.json")
.then((response) => response.json())
.then((contribs) => {
let recents = [];
Object.values(contribs.projects).forEach(val => {
if (val.name in infosRepos) {
recents.push({ date_pushed: val.pushed_at, title: val.name });
}
});
recents.sort((a, b) => new Date(b.date_pushed) - new Date(a.date_pushed));
const threeRecents = recents.slice(0, 3);
threeRecents.forEach(project => createProject(project))
}
);
</script>
<script>
const btnMore = document.getElementById("more")
btnMore.addEventListener("click", displayMore)
</script>
</body>
</html>