Skip to content

Commit

Permalink
Add governance page #1239 (b570231)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabine committed Aug 23, 2023
1 parent 2ca1cf2 commit 6045ee4
Show file tree
Hide file tree
Showing 18 changed files with 1,015 additions and 5 deletions.
549 changes: 549 additions & 0 deletions data/governance.yml

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/global/url.ml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ let blog_post source v = "/blog/" ^ source ^ "/" ^ v
let news = "/news"
let news_post v = "/news/" ^ v
let jobs = "/jobs"
let governance = "/governance"
let governance_team id = "/governance/" ^ id
let carbon_footprint = "/policies/carbon-footprint"
let privacy_policy = "/policies/privacy-policy"
let governance = "/policies/governance"
let governance_policy = "/policies/governance"
let code_of_conduct = "/policies/code-of-conduct"
let playground = "/play"
let papers = "/papers"
Expand Down
7 changes: 7 additions & 0 deletions src/ocamlorg_data/data.ml
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,10 @@ module Code_example = struct

let get title = List.find (fun x -> String.equal x.title title) all
end

module Governance = struct
include Governance

let get_by_id id =
List.find_opt (fun x -> String.equal id x.id) (teams @ working_groups)
end
33 changes: 33 additions & 0 deletions src/ocamlorg_data/data.mli
Original file line number Diff line number Diff line change
Expand Up @@ -416,3 +416,36 @@ module Code_example : sig

val get : string -> t
end

module Governance : sig
module Member : sig
type t = { name : string; github : string; role : string }

val compare : t -> t -> int
end

type contact_kind = GitHub | Email | Discord | Chat
type contact = { name : string; link : string; kind : contact_kind }

type dev_meeting = {
date : string;
time : string;
link : string;
calendar : string option;
notes : string;
}

type team = {
id : string;
name : string;
description : string;
contacts : contact list;
dev_meeting : dev_meeting option;
members : Member.t list;
subteams : team list;
}

val teams : team list
val working_groups : team list
val get_by_id : string -> team option
end
9 changes: 9 additions & 0 deletions src/ocamlorg_data/dune
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
(run %{dep:../../tool/ood-gen/bin/gen.exe} book))))

(rule
(deps ../../tool/ood-gen/bin/gen.exe)
(target governance.ml)
(action
(with-stdout-to
%{target}
(run %{dep:../../tool/ood-gen/bin/gen.exe} governance))))

(rule
(deps ../../tool/ood-gen/bin/gen.exe)
(target changelog.ml)
(action
(with-stdout-to
Expand Down
10 changes: 10 additions & 0 deletions src/ocamlorg_frontend/components/icons.eml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ let changelog class_ =
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
</svg>

let chat class_ =
<svg xmlns="http://www.w3.org/2000/svg" class="<%s class_ %>" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 01-.825-.242m9.345-8.334a2.126 2.126 0 00-.476-.095 48.64 48.64 0 00-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0011.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155" />
</svg>

let chevron_down class_ =
<svg xmlns="http://www.w3.org/2000/svg" class="<%s class_ %>" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
Expand Down Expand Up @@ -117,6 +122,11 @@ let edit class_ =
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z" />
</svg>

let email class_ =
<svg xmlns="http://www.w3.org/2000/svg" class="<%s class_ %>" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" />
</svg>

let error class_ =
<svg xmlns="http://www.w3.org/2000/svg" class="<%s class_ %>" fill="currentColor" viewBox="0 0 24 24" width="24px" aria-hidden="true">
<path d="M0 0h24v24H0V0z" fill="none"/>
Expand Down
15 changes: 15 additions & 0 deletions src/ocamlorg_frontend/css/partials/governance.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.governance-contrast-section {
background: linear-gradient(270deg, #0B1528 0%, rgba(11, 21, 40, 0.958333) 53.65%, #0B1528 100%);
}

.governance-contrast-section button {
border: 1px solid #fff;
color: #fff;
opacity: 0.6;
}

.governance-contrast-section .gradient {
background: -webkit-linear-gradient(left, #EFA4F2,#0076ff, #62A8FF);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
1 change: 1 addition & 0 deletions src/ocamlorg_frontend/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@import "./partials/shadows.css";
@import "./partials/tags.css";
@import "./partials/typography.css";
@import "./partials/governance.css";

@import "./other/syntax.css";

Expand Down
13 changes: 12 additions & 1 deletion src/ocamlorg_frontend/dune
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,18 @@
(action
(run %{bin:dream_eml} %{dep:release.eml} --workspace %{workspace_root})))
(rule
(target releases.ml)
(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 releases.ml)
(deps releases.eml)
(action
(run %{bin:dream_eml} %{dep:releases.eml} --workspace %{workspace_root})))
(rule
Expand Down
2 changes: 2 additions & 0 deletions src/ocamlorg_frontend/ocamlorg_frontend.ml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ let success_story = Success_story.render
let tutorial = Tutorial.render
let workshop = Workshop.render
let outreachy = Outreachy.render
let governance ~teams = Governance.render ~teams
let governance_team team = Governance_team.render team
94 changes: 94 additions & 0 deletions src/ocamlorg_frontend/pages/governance.eml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
module MemberSet = Set.Make (Data.Governance.Member)

let count_members (team : Data.Governance.team) =
MemberSet.cardinal (MemberSet.of_list (team.members @ List.concat (List.map (fun (team : Data.Governance.team) -> team.members) team.subteams)))

let render_team_card (team : Data.Governance.team) member_label btn_class =
<div class="flex-col">
<div class="text-2xl mb-5 font-semibold flex items-center">
<span><%s team.name %></span>
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 ml-2" fill="none" viewBox="0 0 24 24"
stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round"
d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
</svg>
</div>
<div class="opacity-70 mb-4 text-lg"><%s team.description %></div>
<div class="font-semibold mb-6"><%i count_members team %> <%s member_label %></div>
<a href="<%s Url.governance_team team.id %>" class="btn <%s btn_class %>">
<span>Details</span>
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
</svg>
</a>
</div>

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." @@
<div class="intro-section-simple">
<div class="container-fluid">
<div class="mx-auto px-4 sm:px-6">
<div class="">
<div class="sm:text-center lg:col-span-8 lg:text-center">
<h1 class="font-bold pb-6 text-[56px]">Governance</h1>
<div class="text-2xl text-body-400 pb-10">The projects running under OCaml and the awesome people
behind it
</div>
<a href="<%s Url.governance_policy %>"><button class="btn btn-lg mb-4 lg:mb-0">Read the Governance Policy</button></a>
</div>
</div>
</div>
</div>
</div>

<div class="governance-contrast-section">
<div class="py-10 lg:py-28">
<div class="container-fluid text-white">
<h2 class="font-bold gradient mb-6 text-[40px]">Teams</h2>
<div class="text-lg">
See who the maintainers of the various OCaml projects are. We present a comprehensive list structured by project / purpose.
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-20 mt-16">
<% teams |> List.iter (fun (team : Data.Governance.team) -> %>
<%s! render_team_card team "maintainers" "btn-tertiary" %>
<% );%>
</div>
</div>
</div>
</div>
<svg width="100%" height="auto" viewBox="0 0 1600 128" fill="none" class='bg-white' xmlns="http://www.w3.org/2000/svg">
<rect width="1600" height="121" transform="translate(0 0.000244141)" fill="white" />
<circle cx="268.5" cy="68.5002" r="27.5" fill="#EE6A1A" fill-opacity="0.48" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M0 106L133 87.1667C267 68.3333 533 30.6667 800 30.6667C1067 30.6667 1333 68.3333 1467 87.1667L1600 106V0H1467C1333 0 1067 0 800 0C533 0 267 0 133 0H0V106Z"
fill="url(#paint0_linear_2087_13206)" />
<circle cx="200" cy="80" r="48" fill="#CC4D00" />
<defs>
<linearGradient id="paint0_linear_2087_13206" x1="1600" y1="44.6059" x2="-2.29315e-07" y2="44.6059"
gradientUnits="userSpaceOnUse">
<stop stop-color="#0B1528" />
<stop offset="0.536458" stop-color="#0B1528" stop-opacity="0.958333" />
<stop offset="1" stop-color="#0B1528" />
</linearGradient>
</defs>
</svg>

<div class="bg-white">
<div class="py-10 lg:py-28">
<div class="container-fluid">
<h2 class="font-bold text-body-600 mb-6 text-[40px]">Working groups</h2>
<div class="text-body-400 text-lg prose">
Working groups are community initiatives that gather around certain topics or a shared purpose.
The <a href="<%s Url.governance_policy %>">OCaml Governance Policy</a> does not apply to them. Participation is welcome and encouraged.</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-20 mt-16">
<% working_groups |> List.iter (fun (wg : Data.Governance.team) -> %>
<%s! render_team_card wg "organiser(s)" "btn-secondary" %>
<% ); %>
</div>
</div>
</div>
</div>
Loading

0 comments on commit 6045ee4

Please sign in to comment.