diff --git a/app/resources/surveys/SurveysController.jl b/app/resources/surveys/SurveysController.jl index ef4f102..6dae9d3 100644 --- a/app/resources/surveys/SurveysController.jl +++ b/app/resources/surveys/SurveysController.jl @@ -182,7 +182,15 @@ function submit(forminfo::Dict; backpage::Bool=false) end end -const DONATION_INDIVIDUALS = [ +const DONATION_ENTITIES = [ + ("https://my.fsf.org/donate", + "The Free Software Foundation", + "https://www.fsf.org/", + "principle organisational sponsor of the GNU project"), + ("https://liberapay.com/org-mode/", + "The Org Project", + "https://orgmode.org", + ["org-mode" => "https://orgmode.org"]), ("https://liberapay.com/hlissner/", "Henrik Lissner", "hlissner", ["Doom Emacs" => "doomemacs/doomemacs", "assorted packages"]), @@ -217,20 +225,7 @@ const DONATION_INDIVIDUALS = [ ["this survey", "a few other things"]) ] -function donationlinks() - donate_org = ("https://liberapay.com/org-mode/", - "The Org Project", - "https://orgmode.org", - ["org-mode" => "https://orgmode.org"]) - donate_fsf = ("https://my.fsf.org/donate", - "The Free Software Foundation", - "https://www.fsf.org/", - ["an assortment of projects"]) - donate_specs = vcat(donate_org, - shuffle(DONATION_INDIVIDUALS), - donate_fsf) - donate_spec_to_link.(donate_specs) -end +donationlinks() = donate_spec_to_link.(shuffle(DONATION_ENTITIES)) function donate_spec_to_link((link, name, site, projects)) string("
  • Donate to ", @@ -246,26 +241,30 @@ function donate_spec_to_link((link, name, site, projects)) style=\"color: var(--secondary)\" \ title=\"GitHub profile\">@$site" end, - " (responsible for ", - join(map(projects) do proj - if proj isa String - proj - elseif proj isa Pair{String,String} - string("", - proj[1], "") - else - "" - end - end, ", ", ", and "), + if projects isa String + " ($projects" + else + " (responsible for " * + join(map(projects) do proj + if proj isa String + proj + elseif proj isa Pair{String,String} + string("", + proj[1], "") + else + "" + end + end, ", ", ", and ") + end, ")
  • ") end diff --git a/app/resources/surveys/views/thanks.jl.html b/app/resources/surveys/views/thanks.jl.html index dc2f1e7..b2aa296 100644 --- a/app/resources/surveys/views/thanks.jl.html +++ b/app/resources/surveys/views/thanks.jl.html @@ -22,7 +22,8 @@ the work they do and helps people find and justify the time they spend improving the state of Emacs' ecosystem.

    Should this sound like something you would be interested in, here - is a small selection of donation links that may be of interest.

    + is a small (randomly ordered) selection of donation links that may be of + interest.