Improve our_work and be able to set the synopsis

This commit is contained in:
Calascibetta Romain 2023-03-04 17:52:46 +01:00
parent 24590b299d
commit 272be07f0f
No known key found for this signature in database
GPG key ID: 8CC4DC3365A666B0
7 changed files with 82 additions and 52 deletions

12
pages/funding.md Normal file
View file

@ -0,0 +1,12 @@
## Funding
At Robur our focus is on the software we develop. We are passionate about our work and believe in the importance of creating and maintaining secure digital infrastructure.
We get our funding through three avenues: grants for particular open-source projects, contracts for specific work including development and auditing, and public donations that help allow us to continue the work that isn't otherwise funded.
We spend most of our funding on salaries, ensuring Robur keeps developing the software we think is important. We do not spend money on fancy parties or first class business trips. Our general breakdown of spending per year is:
- 83% on salaries
- 7% on necessary travel
- 10% on inecitable adminitrative costs
If you are considering donating to us, hiring us, or giving us a grant you can be assured your money will be well spent on the actual end result of delivering the robust and secure digital infrastructure we strive for.

View file

@ -1,6 +1,8 @@
--- ---
title: Our Work title: Our Work
description: The Robur Cooperative description: The Robur Cooperative
synopsis: |
We are a nonprofit open source software cooperative whose mission is to develop robust and secure digital infrastructure. We strive to enable more people to reliably run their own infrastructure by producing correct, surprise-free software to be deployed in real environments. Our software aims to meet the needs of anyone working in an environment where security and dependability is vital.
--- ---
{% include "templates/our_work.html" %} {% include "templates/our_work.html" %}

View file

@ -60,24 +60,28 @@ end
module Our_work = struct module Our_work = struct
type t = type t =
{ title : string option { title : string
; description : string option ; description : string
; synopsis : string
; technologies : string ; technologies : string
; services : string } ; services : string }
let make ~technologies ~services page = let make ~technologies ~services (title, description, synopsis )=
{ title= Metadata.Page.title page { title
; description = Metadata.Page.description page ; description
; synopsis
; technologies ; technologies
; services } ; services }
let inject (type a) (module D : Key_value.DESCRIBABLE with type t = a) t = let inject (type a) (module D : Key_value.DESCRIBABLE with type t = a) t =
D.[ "active", object_ $ [ "page", string "our_work" ] D.[ "active", object_ $ [ "page", string "our_work" ]
; "page", object_ $ [ "title", string (Option.value ~default:"" t.title) ; "page", object_ $ [ "title", string t.title
; "description", string (Option.value ~default:"" t.description) ] ; "description", string t.description ]
; "synopsis", string t.synopsis
; "title", string t.title
; "description", string t.description
; "technologies", object_ $ [ "body", string t.technologies ] ; "technologies", object_ $ [ "body", string t.technologies ]
; "services", object_ $ [ "body", string t.services ] ] ; "services", object_ $ [ "body", string t.services ] ]
@ (Metadata.Page.inject (module D) (Metadata.Page.make t.title t.description))
end end
module Person = struct module Person = struct
@ -115,15 +119,17 @@ module About_us = struct
; current_members : (Person.t * string) list ; current_members : (Person.t * string) list
; former_members : (Person.t * string) list ; former_members : (Person.t * string) list
; retreats : string ; retreats : string
; network : string } ; network : string
; funding : string }
let make ~retreats ~network ~current_members ~former_members page = let make ~retreats ~network ~funding ~current_members ~former_members page =
{ title= Metadata.Page.title page { title= Metadata.Page.title page
; description= Metadata.Page.description page ; description= Metadata.Page.description page
; current_members ; current_members
; former_members ; former_members
; retreats ; retreats
; network } ; network
; funding }
let inject (type a) (module D : Key_value.DESCRIBABLE with type t = a) t = let inject (type a) (module D : Key_value.DESCRIBABLE with type t = a) t =
D.[ "active", object_ $ [ "page", string "about_us" ] D.[ "active", object_ $ [ "page", string "about_us" ]
@ -131,6 +137,7 @@ module About_us = struct
; "description", string (Option.value ~default:"" t.description) ] ; "description", string (Option.value ~default:"" t.description) ]
; "retreats", object_ $ [ "body", string t.retreats ] ; "retreats", object_ $ [ "body", string t.retreats ]
; "network", object_ $ [ "body", string t.network ] ; "network", object_ $ [ "body", string t.network ]
; "funding", object_ $ [ "body", string t.funding ]
; "team", object_ $ [ "body", string "FIXME" ; "team", object_ $ [ "body", string "FIXME"
; "current_members", list (List.map (fun (p, desc) -> ; "current_members", list (List.map (fun (p, desc) ->
object_ (("description", string desc) :: Person.inject (module D) p)) t.current_members) object_ (("description", string desc) :: Person.inject (module D) p)) t.current_members)

View file

@ -19,7 +19,7 @@ module Our_work : sig
type t type t
val make : technologies:string -> services:string -> val make : technologies:string -> services:string ->
Metadata.Page.t -> t (string * string * string) -> t
include Metadata.INJECTABLE with type t := t include Metadata.INJECTABLE with type t := t
end end
@ -38,6 +38,7 @@ module About_us : sig
val make : val make :
retreats:string retreats:string
-> network:string -> network:string
-> funding:string
-> current_members:(Person.t * string) list -> current_members:(Person.t * string) list
-> former_members:(Person.t * string) list -> former_members:(Person.t * string) list
-> Metadata.Page.t -> t -> Metadata.Page.t -> t

View file

@ -51,6 +51,23 @@ let generate_index target =
Model.Index.make ~cooperative ~what_we_do page, content in Model.Index.make ~cooperative ~what_we_do page, content in
with_layout (module Model.Index) read_model (index_html target) with_layout (module Model.Index) read_model (index_html target)
module Page' = struct
type t =
{ title : string
; description : string
; synopsis : string }
let from_string (module V : Metadata.VALIDABLE) = function
| None -> Validate.error $ Error.Required_metadata [ "Page'" ]
| Some str ->
let open Validate.Monad in
V.from_string str >>= V.object_and @@ fun assoc ->
let* title = V.(required_assoc string) "title" assoc in
let* description = V.(required_assoc string) "description" assoc in
let* synopsis = V.(required_assoc string) "synopsis" assoc in
return { title; description; synopsis; }
end
let generate_about_us target = let generate_about_us target =
let open Build in let open Build in
let read_members dir = let read_members dir =
@ -67,9 +84,10 @@ let generate_about_us target =
&&& former_members &&& former_members
&&& (Build.read_file "pages/retreats.md" >>> Markup.to_html) &&& (Build.read_file "pages/retreats.md" >>> Markup.to_html)
&&& (Build.read_file "pages/network.md" >>> Markup.to_html) &&& (Build.read_file "pages/network.md" >>> Markup.to_html)
&&& (Build.read_file "pages/funding.md" >>> Markup.to_html)
&&& (Metaformat.read_file_with_metadata (module Metadata.Page) "pages/about_us.md") &&& (Metaformat.read_file_with_metadata (module Metadata.Page) "pages/about_us.md")
>>^ fun ((((current_members, former_members), retreats), network), (page, content)) -> >>^ fun (((((current_members, former_members), retreats), network), funding), (page, content)) ->
Model.About_us.make ~retreats ~network ~current_members ~former_members page, content in Model.About_us.make ~retreats ~network ~funding ~current_members ~former_members page, content in
with_layout (module Model.About_us) read_model (about_us_html target) with_layout (module Model.About_us) read_model (about_us_html target)
let generate_our_work target = let generate_our_work target =
@ -77,7 +95,8 @@ let generate_our_work target =
let read_model = let read_model =
(Build.read_file "pages/technologies.md" >>> Markup.to_html) (Build.read_file "pages/technologies.md" >>> Markup.to_html)
&&& (Build.read_file "pages/services.md" >>> Markup.to_html) &&& (Build.read_file "pages/services.md" >>> Markup.to_html)
&&& (Metaformat.read_file_with_metadata (module Metadata.Page) "pages/our_work.md") &&& (Metaformat.read_file_with_metadata (module Page') "pages/our_work.md")
>>^ fun ((technologies, services), (page, content)) -> >>^ fun ((technologies, services), (page, content)) ->
Model.Our_work.make ~technologies ~services page, content in Model.Our_work.make ~technologies ~services
Page'.(page.title, page.description, page.synopsis), content in
with_layout (module Model.Our_work) read_model (our_work_html target) with_layout (module Model.Our_work) read_model (our_work_html target)

View file

@ -90,20 +90,9 @@
<div class="section-3"> <div class="section-3">
<div class="container-fluid"> <div class="container-fluid">
<div class="container"> <div class="container">
<div class="col-md-12"> {%- autoescape false -%}
<h2>Funding</h2> {{ funding.body }}
<p class="manchet">At Robur our focus is on the software we develop. We are passionate about our work and believe in the importance of creating and maintaining secure digital infrastructure.</p> {% endautoescape -%}
</div>
<div class="col-md-12 columns-2">
<p>We get our funding through three avenues: grants for particular open-source projects, contracts for specific work including development and auditing, and public donations that help allow us to continue the work that isn't otherwise funded.</p>
<p>We spend most of our funding on salaries, ensuring Robur keeps developing the software we think is important. We do not spend money on fancy parties or first class business trips. Our general breakdown of spending per year is:</p>
<ul>
<li>83% on salaries</li>
<li>7% on necessary travel</li>
<li>10% on inecitable administrative costs</li>
</ul>
<p>If you are considering donating to us, hiring us, or giving us a grant you can be assured your money will be well spent on the actual end result of delivering the robust and secure digital infrastructure we strive for.</p>
</div>
<div class="col-md-12 button-pair"> <div class="col-md-12 button-pair">
<button class="contact-btn"><a href="#contact">Contact us</a></button> <button class="contact-btn"><a href="#contact">Contact us</a></button>
<button class="donate-btn"><a href="donate.php">Donate now</a></button> <button class="donate-btn"><a href="donate.php">Donate now</a></button>

View file

@ -5,7 +5,7 @@
<div class="col-md-12"> <div class="col-md-12">
<h2>Our approach</h2> <h2>Our approach</h2>
<span class="manchet"> <span class="manchet">
<p>We are a nonprofit open source software cooperative whose mission is to develop robust and secure digital infrastructure. We strive to enable more people to reliably run their own infrastructure by producing correct, surprise-free software to be deployed in real environments. Our software aims to meet the needs of anyone working in an environment where security and dependability is vital.</p> <p>{{ synopsis }}</p>
</span> </span>
</div> </div>