Skip to content

Commit 3aafb45

Browse files
committed
docs: show team on about page
1 parent 8ce4b35 commit 3aafb45

File tree

2 files changed

+56
-41
lines changed

2 files changed

+56
-41
lines changed

src/about.html

+36-41
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,48 @@
1717
<!-- Outer row -->
1818
<div class="row">
1919
<div class="col s12 m8 offset-m1 xl7 offset-xl1 center-on-small-only">
20+
21+
22+
<!-- About the Team-->
23+
<div id="team" class="section scrollspy">
24+
<h2 class="header">The Team</h2>
25+
<p class="caption">
26+
Due to inactivity of the original developers, MaterializeCSS has been forked into MaterializeWeb by a community of enthusiasts, which continues to be fully maintained by open source
27+
principes since 2021. Without the many contributors who participated in this fork, this project would probably not have received any updates anymore.
28+
</p>
29+
<div class="orga-members" style="display: flex; gap: 1rem; flex-wrap: wrap;"></div>
30+
<div class="center">
31+
<div class="image-container">
32+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
33+
<!-- prettier-ignore-start -->
34+
<!-- markdownlint-disable -->
35+
<!-- markdownlint-restore -->
36+
<!-- prettier-ignore-end -->
37+
<!-- ALL-CONTRIBUTORS-LIST:END -->
38+
</div>
39+
</div>
40+
<!--
41+
<h3>The original team</h3>
42+
<p class="caption">
43+
<a href="https://www.materializecss.com" target="_blank">MaterializeCSS</a>
44+
was originally launched in 2014 by a team of students from Carnegie Mellon University. After 4 years of development, the latest official release was released in
45+
September 2018 and received more than 38K stars on GitHub.
46+
</p>
47+
<div class="center">
48+
<div class="image-container">
49+
<img src="images/materialize_team.jpeg" style="width: 100%" />
50+
</div>
51+
</div>
52+
-->
53+
</div>
54+
2055
<!-- Material Design -->
2156
<div id="materialdesign" class="section scrollspy">
2257
<h2 class="header">Material Design</h2>
2358
<p class="caption">
2459
Created and designed by Google, Material Design is a design language that combines the classic principles of successful design along with innovation and technology.
2560
Google's goal is to develop a system of design that allows for a unified user experience across all their products on any platform.
2661
</p>
27-
<div class="video-container">
28-
<iframe width="853" height="480" src="https://www.youtube.com/embed/Q8TXgCzxEnw?rel=0" frameborder="0" allowfullscreen></iframe>
29-
</div>
3062
<div class="section">
3163
<h3 class="header light">Principles</h3>
3264
<div class="row">
@@ -39,7 +71,6 @@ <h4 class="center">Material is the metaphor</h4>
3971
physical world.
4072
</p>
4173
</div>
42-
4374
<div class="col s12 l4">
4475
<img class="promo" src="images/bold.png" />
4576
<h4 class="center">Bold, graphic, intentional</h4>
@@ -48,7 +79,6 @@ <h4 class="center">Bold, graphic, intentional</h4>
4879
focus. Emphasis on different actions and components create a visual guide for users.
4980
</p>
5081
</div>
51-
5282
<div class="col s12 l4">
5383
<img class="promo" src="images/motion.png" />
5484
<h4 class="center">Motion provides meaning</h4>
@@ -62,50 +92,15 @@ <h4 class="center">Motion provides meaning</h4>
6292
</div>
6393
</div>
6494

65-
<!-- About the Team-->
66-
<div id="team" class="section scrollspy">
67-
<h2 class="header">Meet the Team</h2>
68-
69-
<h5>The community</h5>
70-
71-
<p class="caption">
72-
Due to inactivity of the original developers, MaterializeCSS has been forked by a community of enthusiasts, which continues to be fully maintained by open source
73-
principes since 2021. Without the many contributors who participated in this fork, this project would probably not have received any updates anymore.
74-
</p>
75-
76-
<div class="center">
77-
<div class="image-container">
78-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
79-
<!-- prettier-ignore-start -->
80-
<!-- markdownlint-disable -->
81-
<!-- markdownlint-restore -->
82-
<!-- prettier-ignore-end -->
83-
<!-- ALL-CONTRIBUTORS-LIST:END -->
84-
</div>
85-
</div>
86-
87-
<h5>The original team</h5>
88-
<p class="caption">
89-
<a href="https://www.materializecss.com" target="_blank">MaterializeCSS</a>
90-
was originally launched in 2014 by a team of students from Carnegie Mellon University. After 4 years of development, the latest official release was released in
91-
September 2018 and received more than 38K stars on GitHub.
92-
</p>
93-
94-
<div class="center">
95-
<div class="image-container">
96-
<img src="images/materialize_team.jpeg" style="width: 100%" />
97-
</div>
98-
</div>
99-
</div>
10095
</div>
10196

10297
<!-- Table of Contents -->
10398
<div class="col hide-on-small-only m3 xl3">
10499
<div class="toc-wrapper">
105100
<div style="height: 1px">
106101
<ul class="section table-of-contents">
107-
<li><a href="#materialdesign">Material Design</a></li>
108102
<li><a href="#team">Meet the Team</a></li>
103+
<li><a href="#materialdesign">Material Design</a></li>
109104
</ul>
110105
</div>
111106
</div>

src/main.ts

+20
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,29 @@ function escapeHtml(unsafe) {
5757
return unsafe.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
5858
}
5959

60+
function renderOrganizationMembers() {
61+
fetch("https://api.github.com/orgs/materializecss/members")
62+
.then((resp) => resp.json())
63+
.then((items) => {
64+
console.log(items);
65+
const elements = items.map(item => {
66+
const div = document.createElement('div');
67+
div.setAttribute('style', 'text-align: center; width: 150px;')
68+
div.innerHTML = `<img src="${item.avatar_url}" alt="" style="width: 100px;" class="circle responsive-img"/>
69+
<p>${item.login}</p>`;
70+
return div;
71+
});
72+
document.querySelector('.orga-members').replaceChildren(...elements);
73+
});
74+
}
75+
6076
document.addEventListener("DOMContentLoaded", () => {
6177
const themes = new Themes(document);
6278

79+
if (location.pathname.endsWith('about.html')) {
80+
renderOrganizationMembers();
81+
}
82+
6383
// CSS > Colors
6484
document.querySelectorAll(".dynamic-color .col > div").forEach((el) => {
6585
const color = getComputedStyle(el).backgroundColor;

0 commit comments

Comments
 (0)