diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000000..16f087121d --- /dev/null +++ b/TODO.md @@ -0,0 +1,5 @@ +# To Do + +- Icons +- Text +- GitHub Icon on contacts \ No newline at end of file diff --git a/asset/icons/discord.svg b/asset/icons/discord.svg new file mode 100644 index 0000000000..38837b79d4 --- /dev/null +++ b/asset/icons/discord.svg @@ -0,0 +1,3 @@ + + + diff --git a/asset/icons/email.svg b/asset/icons/email.svg new file mode 100644 index 0000000000..450036d264 --- /dev/null +++ b/asset/icons/email.svg @@ -0,0 +1,3 @@ + + + diff --git a/asset/icons/github-gray.svg b/asset/icons/github-gray.svg new file mode 100644 index 0000000000..8a19e2a730 --- /dev/null +++ b/asset/icons/github-gray.svg @@ -0,0 +1,3 @@ + + + diff --git a/asset/icons/github.svg b/asset/icons/github.svg new file mode 100644 index 0000000000..eab79dabbf --- /dev/null +++ b/asset/icons/github.svg @@ -0,0 +1,3 @@ + + + diff --git a/asset/icons/slack.svg b/asset/icons/slack.svg new file mode 100644 index 0000000000..5ad4c8fcce --- /dev/null +++ b/asset/icons/slack.svg @@ -0,0 +1,3 @@ + + + diff --git a/asset/img/.DS_Store b/asset/img/.DS_Store new file mode 100644 index 0000000000..5008ddfcf5 Binary files /dev/null and b/asset/img/.DS_Store differ diff --git a/data/governance/compiler.yml b/data/governance/compiler.yml new file mode 100644 index 0000000000..ba5579f69f --- /dev/null +++ b/data/governance/compiler.yml @@ -0,0 +1,107 @@ +id: compiler +name: Compiler +description: The OCaml Compiler team, responsible for the development and maintenance of the language, the standard library and the compiler tools. + +contacts: + - name: Email + link: https://inbox.ocaml.org/caml-list/ + icon: /icons/email.svg + - name: Discord + link: https://discord.com/channels/436568060288172042/904141760052228116 + icon: /icons/discord.svg + - name: GitHub + link: https://github.com/ocaml/ocaml/issues + icon: /icons/github.svg + +team: + - name: Xavier Leroy + github: xavierleroy + role: Creator & Lead Maintainer + - name: Gabriel Scherer + github: gasche + role: Maintainer + - name: Alain Frisch + github: alainfrisch + role: Maintainer + - name: David Allsopp + github: dra27 + role: Maintainer + - name: Sébastien Hinderer + github: shindere + role: Maintainer + - name: Florian Angeletti + github: Octachron + role: Maintainer + - name: Thomas Refis + github: trefis + role: Maintainer + - name: Nicolás Ojeda Bär + github: nojb + role: Maintainer + - name: Damien Doligez + github: damiendoligez + role: Maintainer + - name: Stephen Dolan + github: stedolan + role: Maintainer + - name: Tom Kelly + github: ctk21 + role: Maintainer + - name: KC Sivaramakrishnan + github: kayceesrk + role: Maintainer + - name: Leo White + github: lpw25 + role: Maintainer + - name: Jacques Garrigue + github: garrigue + role: Maintainer + - name: François Pottier + github: fpottier + role: Maintainer + - name: Sadiq Jaffer + github: sadiqj + role: Maintainer + - name: Jeremy Yallop + github: yallop + role: Maintainer + - name: Guillaume Munch-Maccagnoni + github: gadmm + role: Maintainer + - name: Frédéric Bour + github: let-def + role: Maintainer + +alumni: + - name: Pierre Weis + github: pierreweis + - name: Didier Remy + github: diremy + +contributors: + - name: Nicolas Pouillard + github: np + - name: Mark Shinwell + github: mshinwell + - name: Enguerrand + github: Engil + - name: Pierre Chambart + github: chambart + - name: Xavier Clerc + github: xclerc + - name: Luc Maranget + github: maranget + - name: Jérémie Dimino + github: ghost + - name: Fabrice Le Fessant + github: lefessan + - name: John Whitington + github: johnwhitington + - name: Daniel Bünzli + github: dbuenzli + - name: Hugo Heuzard + github: hhugo + - name: Sudha Parimala + github: Sudha247 + - name: Gabriel Radanne + github: Drup diff --git a/data/governance/infrastructure.yml b/data/governance/infrastructure.yml new file mode 100644 index 0000000000..8aaf9467bc --- /dev/null +++ b/data/governance/infrastructure.yml @@ -0,0 +1,46 @@ +id: infrastructure +name: Infrastructure +description: The infrastructure team is responsible to maintain and evolve the infrastructure powering the official OCaml projects, including the servers for OCaml.org and the opam-repository CI. + +contacts: + - name: Email + link: infrastructure@lists.ocaml.org + icon: /icons/email.svg + - name: GitHub + link: https://github.com/ocaml/infrastructure/issues + icon: /icons/github.svg + +team: + - name: Tim McGilchrist + github: tmcgilchrist + role: Team Lead + - name: Mark Elvers + github: mtelvers + role: Maintainer + - name: Navin Keswani + github: novemberkilo + role: Maintainer + - name: Patrick Ferris + github: patricoferris + role: Maintainer + - name: Antonin Décimo + github: MisterDA + role: Maintainer + - name: Thomas Leonard + github: talex5 + role: Maintainer + - name: Étienne Marais + github: maiste + role: Maintainer + +alumni: + - name: Anil Madhavapeddy + github: avsm + - name: Craig Ferguson + github: CraigFe + +contributors: + - name: Lucas Pluvinage + github: TheLortex + - name: Jon Ludlam + github: jonludlam diff --git a/data/governance/moderation.yml b/data/governance/moderation.yml new file mode 100644 index 0000000000..f773c4d84d --- /dev/null +++ b/data/governance/moderation.yml @@ -0,0 +1,26 @@ +id: moderation +name: Moderation +description: The moderation team is responsible for the moderation of the official OCaml forums and social platforms, such Discuss, Discord, or the mailing lists. + +contacts: + - name: Email + link: moderation@lists.ocaml.org + icon: /icons/email.svg + +team: + - name: Thomas Leonard + github: talex5 + role: Discuss Moderator + - name: Yotam Barnoy + github: Bluddy + role: Discord Moderator + - name: Gabriel Radanne + github: Drup + role: Discord Moderator + - name: Florian Angeletti + github: octachron + role: Discord Moderator + +alumni: [] + +contributors: [] diff --git a/data/governance/packaging.yml b/data/governance/packaging.yml new file mode 100644 index 0000000000..a1889f72ec --- /dev/null +++ b/data/governance/packaging.yml @@ -0,0 +1,20 @@ +id: packaging +name: Packaging +description: The Packaging team is responsible to ensure the quality of the OCaml packages ecosystem, and in particular, to review submitions to the Opam repository. + +contacts: + - name: Email + link: packaging@lists.ocaml.org + icon: /icons/email.svg + +team: + - name: Kate + github: kit-ty-kate + role: Lead opam-repository maintainer + - name: Marcello Seri + github: mseri + role: opam-repository maintainer + +alumni: [] + +contributors: [] diff --git a/data/governance/platform.yml b/data/governance/platform.yml new file mode 100644 index 0000000000..984dc44f30 --- /dev/null +++ b/data/governance/platform.yml @@ -0,0 +1,84 @@ +id: platform +name: Platform +description: The Platform team is responsible for the development and maintenance of the OCaml Platform, the official OCaml developer toolchain. + +contacts: + - name: Email + link: platform@lists.ocaml.org + icon: /icons/email.svg + +team: + - name: Etienne Millon + github: emillon + role: Lead Dune Maintainer, Lead Utop maintainer + - name: Rudi Rgrinberg + github: rgrinberg + role: Lead Dune Maintainer + - name: Guillaume Petiot + github: gpetiot + role: Lead OCamlFormat maintainer + - name: Marek Kubica + github: Leonidas-from-XIV + role: Dune-release maintainer + - name: Nathan Rebours + github: NathanReb + role: Dune-release maintainer + - name: Ulysse Gérard + github: voodoos + role: Lead Merlin maintainer, Dune maintainer + - name: David Allsopp + github: dra27 + role: Lead Opam maintainer + - name: Jules Aguillon + github: Julow + role: Odoc maintainer + - name: Paul-Elliot Anglès d'Auriac + github: panglesd + role: Odoc maintainer + - name: Sonja Heinze + github: pitag-ha + role: Dune-release maintainer + - name: Ulugbek Abdullaev + github: ulugbekna + role: OCaml LSP maintainer + - name: Corentin Leruth + github: tatchi + role: OCaml LSP maintainer + - name: Jon Ludlam + github: jonludlam + role: Lead Odoc maintainer + - name: Thomas Refis + github: trefis + role: Merlin maintainer + - name: Raja Boujbel + github: rjbou + role: Opam mainainter + - name: Louis Gesbert + github: AltGr + role: Opam maintainer + - name: François Bobot + github: bobot + role: Dune Maintainer + - name: Andrey Mokhov + github: snowleopard + role: Dune maintainer + - name: Cameron Wong + github: cwong-ocaml + role: Dune maintainer + - name: Nicolás Ojeda Bär + github: nojb + role: Dune maintainer + - name: Emilio Jesús Gallego Arias + github: ejgallego + role: Dune maintainer + - name: Christine Rose + github: christinerose + role: Technical Writer + +alumni: + - name: Jérémie Dimino + github: ghost + +contributors: + - name: Shon Feder + github: shonfeder diff --git a/data/governance/web.yml b/data/governance/web.yml new file mode 100644 index 0000000000..ef6cdeb375 --- /dev/null +++ b/data/governance/web.yml @@ -0,0 +1,53 @@ +id: web +name: Web +description: The Web team is responsible for the development and maintenance of the officla OCaml websites, in particular OCaml.org and its subdomains. + +contacts: + - name: Email + link: web@lists.ocaml.org + icon: /icons/email.svg + +team: + - name: Anil Madhavapeddy + github: avsm + role: Advisor + - name: Thibaut Mattio + github: tmattio + role: Team Lead + - name: Christine Rose + github: christinerose + role: Technical Writer + +alumni: + - name: Ashish Agarwal + github: agarwal + - name: Kanishka Azimi + github: ghost + - name: Richard Davison + github: rdavison + - name: Patrick Ferris + github: patricoferris + - name: Isabella Leandersson + github: ILeandersson + - name: Christophe Troestler + github: Chris00 + +contributors: + - name: Asaad Mahmood + github: asaadmahmood + - name: Mirza Babar Baig Bukhari + github: MirzaBabarBaig + - name: JiaeK + github: JiaeK + - name: Shreya Kumari Gupta + github: shreyaswikriti + - name: Joy Odinaka + github: dinakajoy + - name: John Whitington + github: johnwhitington + - name: Jon Ludlam + github: jonludlam + - name: Jules Aguillon + github: Julow + - name: Lucas Pluvinage + github: TheLortex diff --git a/data/governance/wg-benchmarking.yml b/data/governance/wg-benchmarking.yml new file mode 100644 index 0000000000..292ac12d93 --- /dev/null +++ b/data/governance/wg-benchmarking.yml @@ -0,0 +1,20 @@ +id: wg-benchmarking +name: Benchmarking Working Group +description: Working on a set of benchmarking tool and a core infrastructure to support the benchmarks of OCaml projects. + +contacts: + - name: Email + link: wg-benchmarking@lists.ocaml.org + icon: /icons/email.svg + +team: + - name: Shakthi Kannan + github: shakthimaan + role: Team Lead + - name: Puneeth Chaganti + github: punchagan + role: Maintainer + - name: Arthur Wendling + github: art-w + role: Maintainer + diff --git a/data/governance/wg-editors.yml b/data/governance/wg-editors.yml new file mode 100644 index 0000000000..ef79e7f022 --- /dev/null +++ b/data/governance/wg-editors.yml @@ -0,0 +1,19 @@ +id: wg-editors +name: Editors Working Group +description: Building editor integrations for OCaml. + +contacts: + - name: Email + link: wg-editors@lists.ocaml.org + icon: /icons/email.svg + +team: + - name: Rudi Grinberg + github: rgrinberg + role: Lead OCaml VSCode Maintainer + - name: Ulugbek Abdullaev + github: ulugbekna + role: OCaml VSCode Maintainer + - name: Max Lantas + github: mnxn + role: OCaml VSCode Maintainer diff --git a/data/governance/wg-metaprogramming.yml b/data/governance/wg-metaprogramming.yml new file mode 100644 index 0000000000..1337584580 --- /dev/null +++ b/data/governance/wg-metaprogramming.yml @@ -0,0 +1,19 @@ +id: wg-metaprogramming +name: Meta-programming Working Group +description: Work on tools and libraries to do meta-programming with OCaml. + +contacts: + - name: Email + link: wg-metaprogramming@lists.ocaml.org + icon: /icons/email.svg + +team: + - name: Sonja Heinze + github: pitag-ha + role: Lead ppxlib maintainer + - name: Carl Eastlund + github: ceastlund + role: ppxlib maintainer + - name: Paul-Elliot Anglès d'Auriac + github: panglesd + role: ppxlib maintainer diff --git a/data/governance/wg-multicore.yml b/data/governance/wg-multicore.yml new file mode 100644 index 0000000000..ecb1f5d6b4 --- /dev/null +++ b/data/governance/wg-multicore.yml @@ -0,0 +1,28 @@ +id: wg-multicore +name: Multicore Working Group +description: Help porting the OCaml ecosystem to Multicore (OCaml 5.0). + +contacts: + - name: Email + link: wg-multicore@lists.ocaml.org + icon: /icons/email.svg + +team: + - name: Sudha Parimala + github: Sudha247 + role: Maintainer + - name: Bikal Gurung + github: bikallem + role: Maintainer + - name: Lucas Pluvinage + github: TheLortex + role: Maintainer + - name: Carine Morel + github: lyrm + role: Maintainer + - name: Christiano Haesbaert + github: haesbaert + role: Maintainer + - name: Thomas Leonard + github: talex5 + role: Maintainer diff --git a/data/governance/wg-windows.yml b/data/governance/wg-windows.yml new file mode 100644 index 0000000000..acdfe94b2b --- /dev/null +++ b/data/governance/wg-windows.yml @@ -0,0 +1,19 @@ +id: wg-windows +name: Windows Working Group +description: Work toward a Windows-compatible OCaml ecosystem. + +contacts: + - name: Email + link: wg-windows@lists.ocaml.org + icon: /icons/email.svg + +team: + - name: David Allsopp + github: dra27 + role: Team Lead + - name: Jonah Beckford + github: jonahbeckford + role: Maintainer + - name: Nicolás Ojeda Bär + github: nojb + role: Maintainer diff --git a/data/pages/governance.md b/data/pages/governance.md index 233bf1e4be..da1ba9e600 100644 --- a/data/pages/governance.md +++ b/data/pages/governance.md @@ -1,5 +1,5 @@ --- -title: OCaml.org Governance +title: OCaml.org description: The structure of the OCaml.org project, the roles involved and the responsibilities. meta_title: Governance of the OCaml.org domain meta_description: Read about the structure of the OCaml.org project, the roles involved and the responsibilities. @@ -7,7 +7,7 @@ meta_description: Read about the structure of the OCaml.org project, the roles i ## Overview and Scope -As the OCaml community continues to grow, more collaborative work +As the OCaml community continues to grow, more collaborative work undertaken to support and extend the needs of the language and its users. This document focuses specifically on the OCaml.org *domain name* and the Projects that make use of that domain name. @@ -143,10 +143,10 @@ assessed. Wherever practicable, Users should be encouraged to provide feedback and participate in the Projects as much as possible. Users who engage a lot with a -Project will likely go on to become Contributors. +Project will likely go on to become Contributors. It should be noted that these Roles are not mutually exclusive, for example -Maintainers and Contributors are necessarily also Users. +Maintainers and Contributors are necessarily also Users. ## Projects @@ -165,12 +165,12 @@ lists.ocaml.org (see below). it is compatible with the governance and guiding principles of OCaml.org. -### Initiating a Project +### Initiating a Project Any proposal for new work should be raised and discussed on the Infrastructure mailing list. If there is consensus among Maintainers that the work fits within an existing Project, then the Maintainers of that Project can take it -forward. +forward. If a new subdomain is required, then a brief proposal should be made on the Infrastructure list that covers: @@ -198,7 +198,7 @@ to take on the role In all cases, prior notice must be sent to the Infrastructure list including a reasonable time frame and reasons for closure. Closure simply implies revocation or redirection of the subdomain and/or -shutting down or reclaiming any resources provided (e.g., VMs). +shutting down or reclaiming any resources provided (e.g., VMs). ## Processes @@ -225,7 +225,7 @@ licensing agreement so that Contributors understand how to engage with the Maintainers. Typically, this will cover where communication occurs and the process for submitting patches. Contributions from the community are encouraged and can take many -forms including, bug fixes, new features, content, or documentation. +forms including, bug fixes, new features, content, or documentation. All Projects under OCaml.org are expected to be open source, and the licensing arrangements should reflect this. @@ -238,7 +238,7 @@ Maintainers on the Infrastructure mailing list. Maintainers are expected to make decisions regarding their Projects. The intent is for any Maintainers to resolve disagreements, through -a consensus process within each Project. +a consensus process within each Project. On the rare occasions, where Maintainers of a Project cannot agree on a way forward, the following approach is suggested: @@ -251,7 +251,7 @@ will act as arbitrator. During the above, it is expected that all people will be reasonable and be respectful of each other's efforts and viewpoints. In general, we expect to -generate consensus among the community to resolve conflicts. +generate consensus among the community to resolve conflicts. ## Existing Projects @@ -271,7 +271,7 @@ or see the [related issue](https://github.com/ocaml/ocaml.org/issues/700). ***Version 1.0.1 — March 2022*** \ No newline at end of file +--> diff --git a/src/ocamlorg_data/dune b/src/ocamlorg_data/dune index b16761dd29..8a23d0232a 100644 --- a/src/ocamlorg_data/dune +++ b/src/ocamlorg_data/dune @@ -18,6 +18,14 @@ %{targets} (run %{deps} book)))) +(rule + (deps ../../tool/ood-gen/bin/gen.exe) + (targets governance.ml) + (action + (with-stdout-to + %{targets} + (run %{deps} governance)))) + (rule (deps ../../tool/ood-gen/bin/gen.exe) (targets job.ml) diff --git a/src/ocamlorg_data/ood.ml b/src/ocamlorg_data/ood.ml index d7bdcac747..49f87e4adc 100644 --- a/src/ocamlorg_data/ood.ml +++ b/src/ocamlorg_data/ood.ml @@ -39,6 +39,12 @@ module Book = struct let get_by_slug slug = List.find_opt (fun x -> String.equal slug x.slug) all end +module Governance = struct + include Governance + + let find_by_id id = List.find_opt (fun t -> t.id = id) all +end + module Job = struct include Job end diff --git a/src/ocamlorg_data/ood.mli b/src/ocamlorg_data/ood.mli index 3474bfc681..753b989acf 100644 --- a/src/ocamlorg_data/ood.mli +++ b/src/ocamlorg_data/ood.mli @@ -62,6 +62,25 @@ module Book : sig val get_by_slug : string -> t option end +module Governance : sig + type member = { name : string; github : string; role : string } + type contributor = { name : string; github : string } + type contact = { name : string; link : string; icon : string } + + type t = { + id : string; + name : string; + description : string; + contacts : contact list; + team : member list; + alumni : contributor list; + contributors : contributor list; + } + + val all : t list + val find_by_id : string -> t option +end + module Job : sig type t = { title : string; diff --git a/src/ocamlorg_frontend/css/partials/governance.css b/src/ocamlorg_frontend/css/partials/governance.css new file mode 100644 index 0000000000..f92abedc85 --- /dev/null +++ b/src/ocamlorg_frontend/css/partials/governance.css @@ -0,0 +1,11 @@ +.governance-card { + @apply flex-col; +} + +.governance-card__title { + @apply text-2xl mb-5 font-semibold flex items-center; +} + +.governance-card__svg { + @apply h-8 w-8 ml-2; +} diff --git a/src/ocamlorg_frontend/css/styles.css b/src/ocamlorg_frontend/css/styles.css index 5ed71e4301..78f5852543 100644 --- a/src/ocamlorg_frontend/css/styles.css +++ b/src/ocamlorg_frontend/css/styles.css @@ -2,6 +2,7 @@ @import "tailwindcss/components"; @import "tailwindcss/utilities"; +@import "./partials/typography.css"; @import "./partials/buttons.css"; @import "./partials/cards.css"; @import "./partials/forms.css"; @@ -9,7 +10,8 @@ @import "./partials/header.css"; @import "./partials/shadows.css"; @import "./partials/tags.css"; -@import "./partials/typography.css"; +@import "./partials/governance.css"; + @import "./other/syntax.css"; @@ -41,6 +43,12 @@ body { -webkit-text-fill-color: transparent; } +h2.gradient { + background: -webkit-linear-gradient(left, #EFA4F2,#0076ff, #62A8FF); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} + .swiper { max-width: 100vw; } @@ -178,3 +186,13 @@ summary::marker { .output-container { height: calc(100% - 60px); } +.our-team { + background: linear-gradient(270deg, #0B1528 0%, rgba(11, 21, 40, 0.958333) 53.65%, #0B1528 100%); +} +.our-team button { + border: 1px solid #fff; + color: #fff; + opacity: 0.6; +} + + diff --git a/src/ocamlorg_frontend/dune b/src/ocamlorg_frontend/dune index bb2419613f..f90554dce3 100644 --- a/src/ocamlorg_frontend/dune +++ b/src/ocamlorg_frontend/dune @@ -154,6 +154,16 @@ (deps playground.eml) (action (run %{bin:dream_eml} %{deps} --workspace %{workspace_root}))) + (rule + (targets governance.ml) + (deps governance.eml) + (action + (run %{bin:dream_eml} %{deps} --workspace %{workspace_root}))) + (rule + (targets governance_team.ml) + (deps governance_team.eml) + (action + (run %{bin:dream_eml} %{deps} --workspace %{workspace_root}))) (rule (targets page.ml) (deps page.eml) diff --git a/src/ocamlorg_frontend/ocamlorg_frontend.ml b/src/ocamlorg_frontend/ocamlorg_frontend.ml index 44be2bcc04..73269c406f 100644 --- a/src/ocamlorg_frontend/ocamlorg_frontend.ml +++ b/src/ocamlorg_frontend/ocamlorg_frontend.ml @@ -50,4 +50,6 @@ let page ~title ~description ~meta_title ~meta_description ~content = Page.render ~title ~description ~meta_title ~meta_description ~content let playground () = Playground.render () +let governance ~teams = Governance.render ~teams +let governance_team team = Governance_team.render team let not_found () = Not_found.render () diff --git a/src/ocamlorg_frontend/pages/governance.eml b/src/ocamlorg_frontend/pages/governance.eml new file mode 100644 index 0000000000..15fa7ecaac --- /dev/null +++ b/src/ocamlorg_frontend/pages/governance.eml @@ -0,0 +1,106 @@ +let render ~teams ~working_groups = +Layout.render +~title:"Governance" +~description:"OCaml is a mature, statically-typed, functional programming language. Learn more about its rich history +and what makes it unique." @@ +
+
+
+
+
+

Governance

+
The projects running under OCaml and the awesome teams + behind it +
+
+
+
+
+
+ +
+
+
+

Our Teams

+
+ Odio amet cursus eu cursus nunc bibendum mauris. Nunc tempor fermentum phasellus mi nulla id fermentum + integer + id. Nec quisque consequat et, risus ultrices orci ut massa. +
+
+ <% teams |> List.iter (fun (team : Ood.Governance.t) -> %> +
+
+ <%s team.name %> + + + +
+
<%s team.description %>
+
<%i List.length team.team %> team members
+ + See members + + + + +
+ <% );%> +
+
+
+
+ + + + + + + + + + + + + + +
+
+
+

Working groups

+
+ Odio amet cursus eu cursus nunc bibendum mauris. Nunc tempor fermentum phasellus mi nulla id fermentum + integer + id. Nec quisque consequat et, risus ultrices orci ut massa.
+
+ <% working_groups |> List.iter (fun (wg : Ood.Governance.t) -> %> +
+
+ <%s wg.name %> + + + +
+
<%s wg.description %>
+
<%i List.length wg.team %> members
+ + See members + + + + +
+ <% ); %> +
+
+
+
\ No newline at end of file diff --git a/src/ocamlorg_frontend/pages/governance_team.eml b/src/ocamlorg_frontend/pages/governance_team.eml new file mode 100644 index 0000000000..c7e3ce2de9 --- /dev/null +++ b/src/ocamlorg_frontend/pages/governance_team.eml @@ -0,0 +1,146 @@ +let render (team : Ood.Governance.t) = +Layout.render +~title:(Printf.sprintf "%s · OCaml Governance" team.name) +~description:team.description @@ +
+
+
+
+
+
+ + + + + Back to Governance +
+

<%s team.name %> Governance

+
+ <%s team.description%> +
+
+ <% team.contacts |> List.iter (fun (contact : Ood.Governance.contact) -> %> + + + + <% ); %> +
+
+
+
+
+
+
+
+
+

Team Members

+
+ Odio amet cursus eu cursus nunc bibendum mauris. Nunc tempor fermentum phasellus mi nulla id fermentum + integer + id. Nec quisque consequat et, risus ultrices orci ut massa. +
+
+ <% team.team |> List.iter (fun (member : Ood.Governance.member) -> %> +
+ +
+
<%s member.name %>
+
<%s member.role %>
+
+ + <%s member.github %> +
+
+
+ <% ); %> +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +<% (match team.alumni with | [] -> () | alumni -> %> +
+
+
+

Our Alumni

+
+ Odio amet cursus eu cursus nunc bibendum mauris. Nunc tempor fermentum phasellus mi nulla id fermentum + integer + id. Nec quisque consequat et, risus ultrices orci ut massa.
+
+ <% alumni |> List.iter (fun (contributor : Ood.Governance.contributor) -> %> +
+ +
+
<%s contributor.name %>
+
+ + <%s contributor.github %> +
+
+
+ <% ); %> +
+
+
+
+<% ); %> + +<% (match team.contributors with | [] -> () | contributors -> %> +
+
+
+

Frequent Contributors

+
+ Odio amet cursus eu cursus nunc bibendum mauris. Nunc tempor fermentum phasellus mi nulla id fermentum + integer + id. Nec quisque consequat et, risus ultrices orci ut massa.
+
+ <% contributors |> List.iter (fun (contributor : Ood.Governance.contributor) -> %> +
+ +
+
<%s contributor.name %>
+
+ + <%s contributor.github %> +
+
+
+ <% ); %> +
+
+
+
+<% ); %> diff --git a/src/ocamlorg_frontend/url.ml b/src/ocamlorg_frontend/url.ml index 8ced653504..a49771ccec 100644 --- a/src/ocamlorg_frontend/url.ml +++ b/src/ocamlorg_frontend/url.ml @@ -42,6 +42,7 @@ let carbon_footprint = "/carbon-footprint" let privacy_policy = "/privacy-policy" let governance = "/governance" let playground = "/play" +let governance_team v = "/governance/" ^ v let papers = "/papers" let learn = "/docs" let platform = "/docs/platform" diff --git a/src/ocamlorg_web/lib/handler.ml b/src/ocamlorg_web/lib/handler.ml index 7d9dfd1ec4..3aa11c6db4 100644 --- a/src/ocamlorg_web/lib/handler.ml +++ b/src/ocamlorg_web/lib/handler.ml @@ -217,9 +217,28 @@ let page (page : Ood.Page.t) (_req : Dream.request) = let carbon_footprint = page Ood.Page.carbon_footprint let privacy_policy = page Ood.Page.privacy_policy -let governance = page Ood.Page.governance let playground _req = Dream.html (Ocamlorg_frontend.playground ()) +let governance _req = + let working_groups = + List.filter + (fun (t : Ood.Governance.t) -> String.starts_with ~prefix:"wg-" t.id) + Ood.Governance.all + in + let teams = + List.filter + (fun (t : Ood.Governance.t) -> + not (String.starts_with ~prefix:"wg-" t.id)) + Ood.Governance.all + in + Dream.html (Ocamlorg_frontend.governance ~teams ~working_groups) + +let governance_team req = + let id = Dream.param req "id" in + match Ood.Governance.find_by_id id with + | Some team -> Dream.html (Ocamlorg_frontend.governance_team team) + | None -> not_found req + let papers req = let search_paper pattern t = let open Ood.Paper in diff --git a/src/ocamlorg_web/lib/router.ml b/src/ocamlorg_web/lib/router.ml index ac7e6fab95..82ef4b61ad 100644 --- a/src/ocamlorg_web/lib/router.ml +++ b/src/ocamlorg_web/lib/router.ml @@ -46,6 +46,7 @@ let page_routes = Dream.get Url.carbon_footprint Handler.carbon_footprint; Dream.get Url.privacy_policy Handler.privacy_policy; Dream.get Url.governance Handler.governance; + Dream.get (Url.governance_team ":id") Handler.governance_team; Dream.get Url.papers Handler.papers; Dream.get Url.best_practices Handler.best_practices; Dream.get Url.problems Handler.problems; diff --git a/tool/ood-gen/bin/gen.ml b/tool/ood-gen/bin/gen.ml index 25bab0e430..02754ad0e1 100644 --- a/tool/ood-gen/bin/gen.ml +++ b/tool/ood-gen/bin/gen.ml @@ -4,6 +4,7 @@ let term_templates = [ ("academic_institution", Ood_gen.Academic_institution.template); ("book", Ood_gen.Book.template); + ("governance", Ood_gen.Governance.template); ("job", Ood_gen.Job.template); ("meetup", Ood_gen.Meetup.template); ("news", Ood_gen.News.template); diff --git a/tool/ood-gen/lib/governance.ml b/tool/ood-gen/lib/governance.ml new file mode 100644 index 0000000000..3673cf9485 --- /dev/null +++ b/tool/ood-gen/lib/governance.ml @@ -0,0 +1,115 @@ +type member = { name : string; github : string; role : string } +[@@deriving yaml] + +type contributor = { name : string; github : string } [@@deriving yaml] +type contact = { name : string; link : string; icon : string } [@@deriving yaml] + +type team = { + id : string; + name : string; + description : string; + contacts : contact list; + team : member list; + alumni : contributor list option; + contributors : contributor list option; +} +[@@deriving yaml] + +type wg = { + id : string; + name : string; + description : string; + contacts : contact list; + team : member list; +} +[@@deriving yaml] + +let all_teams () = + Utils.map_files + (fun content -> + content |> Yaml.of_string_exn |> team_of_yaml |> function + | Ok x -> x + | Error (`Msg err) -> raise (Failure err)) + "governance/" + +let pp_contact ppf (v : contact) = + Fmt.pf ppf + {| + { name = %a + ; link = %a + ; icon = %a + }|} + Pp.string v.name Pp.string v.link Pp.string v.icon + +let pp_member ppf (v : member) = + Fmt.pf ppf + {| + { name = %a + ; github = %a + ; role = %a + }|} + Pp.string v.name Pp.string v.github Pp.string v.role + +let pp_contributor ppf (v : contributor) = + Fmt.pf ppf + {| + { name = %a + ; github = %a + }|} + Pp.string v.name Pp.string v.github + +let pp_team ppf (v : team) = + Fmt.pf ppf + {| + { id = %a + ; name = %a + ; description = %a + ; contacts = %a + ; team = %a + ; alumni = %a + ; contributors = %a + }|} + Pp.string v.id Pp.string v.name Pp.string v.description (Pp.list pp_contact) + v.contacts (Pp.list pp_member) v.team (Pp.list pp_contributor) + (Option.value ~default:[] v.alumni) + (Pp.list pp_contributor) + (Option.value ~default:[] v.contributors) + +let pp_team_list = Pp.list pp_team + +let pp_wg ppf (v : wg) = + Fmt.pf ppf + {| + { id = %a + ; name = %a + ; description = %a + ; contacts = %a + ; team = %a + }|} + Pp.string v.id Pp.string v.name Pp.string v.description (Pp.list pp_contact) + v.contacts (Pp.list pp_member) v.team + +let pp_wg_list = Pp.list pp_wg + +let template () = + Format.asprintf + {| +type member = { name : string; github : string; role : string } + +type contributor = { name : string; github : string } + +type contact = { name : string; link : string; icon : string } + +type t = { + id : string; + name : string; + description : string; + contacts : contact list; + team : member list; + alumni : contributor list; + contributors : contributor list; +} + +let all = %a +|} + pp_team_list (all_teams ()) diff --git a/tool/ood-gen/lib/utils.ml b/tool/ood-gen/lib/utils.ml index fad6223d06..b769683384 100644 --- a/tool/ood-gen/lib/utils.ml +++ b/tool/ood-gen/lib/utils.ml @@ -42,6 +42,8 @@ let map_files f dir = |> List.map (fun (file, x) -> try f x with exn -> + let err = Printexc.to_string exn in + print_endline err; prerr_endline ("Error in " ^ file); raise exn) @@ -50,6 +52,8 @@ let map_files_with_names f dir = |> List.map (fun (file, x) -> try f (file, x) with exn -> + let err = Printexc.to_string exn in + print_endline err; prerr_endline ("Error in " ^ file); raise exn)