whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: add images to pmc roster pages
Date Sun, 04 Jun 2017 22:12:39 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  4a96ed1   add images to pmc roster pages
4a96ed1 is described below

commit 4a96ed1d11d3c30777341e7880b2fc07f2937003
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sun Jun 4 18:12:08 2017 -0400

    add images to pmc roster pages
---
 www/roster/models/committee.rb        | 4 ++++
 www/roster/public/stylesheets/app.css | 2 ++
 www/roster/views/pmc/main.js.rb       | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb
index 63318ca..59958ff 100644
--- a/www/roster/models/committee.rb
+++ b/www/roster/models/committee.rb
@@ -16,6 +16,9 @@ class Committee
     comdev = ASF::SVN['asf/comdev/projects.apache.org/site/json/foundation']
     info = JSON.parse(File.read("#{comdev}/projects.json"))[id]
 
+    image_dir = ASF::SVN.find('asf/infrastructure/site/trunk/content/img')
+    image = Dir["#{image_dir}/#{id}.*"].map {|path| File.basename(path)}.last
+
     moderators = nil
 
     if pmc.roster.include? env.user or ASF::Person.find(env.user).asf_member?
@@ -49,6 +52,7 @@ class Committee
       mail: Hash[lists.sort],
       moderators: moderators,
       project_info: info,
+      image: image,
     }
 
     response
diff --git a/www/roster/public/stylesheets/app.css b/www/roster/public/stylesheets/app.css
index a66b304..591f967 100644
--- a/www/roster/public/stylesheets/app.css
+++ b/www/roster/public/stylesheets/app.css
@@ -1,6 +1,8 @@
 body {margin: 10px 33px}
 h1 .note, h2 .note {font-size: small}
 h1 small {font-weight: normal; font-size: medium}
+h1 img {float:right; height: 2em}
+.alert {clear: both}
 h2 {margin-bottom: 0}
 h4 {margin-left: 1em}
 div.value ul {margin: 0; padding: 0; list-style: none}
diff --git a/www/roster/views/pmc/main.js.rb b/www/roster/views/pmc/main.js.rb
index 4f578a0..30b6cd7 100644
--- a/www/roster/views/pmc/main.js.rb
+++ b/www/roster/views/pmc/main.js.rb
@@ -23,6 +23,9 @@ class PMC < React
     _h1 do
       _a @committee.display_name, href: @committee.site
       _small " established #{@committee.established}" if @committee.established
+      if @committee.image
+        _img src: "https://apache.org/img/#{@committee.image}"
+      end
     end
 
     _p @committee.description

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message