whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curc...@apache.org
Subject [whimsy] 01/02: Add _whimsy_panel to simplify some scripts
Date Thu, 25 May 2017 13:49:07 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit a0727579cd6a027943ee7f8fd64b57e4265b23aa
Author: Shane Curcuru <asf@shanecurcuru.org>
AuthorDate: Thu May 25 09:47:30 2017 -0400

    Add _whimsy_panel to simplify some scripts
---
 lib/whimsy/asf/themes.rb | 15 +++++++++++++++
 www/test/dataflow.cgi    | 31 ++++++++++++++-----------------
 2 files changed, 29 insertions(+), 17 deletions(-)

diff --git a/lib/whimsy/asf/themes.rb b/lib/whimsy/asf/themes.rb
index 63190a8..ef6769b 100644
--- a/lib/whimsy/asf/themes.rb
+++ b/lib/whimsy/asf/themes.rb
@@ -76,4 +76,19 @@ class Wunderbar::HtmlMarkup
       end
     end
   end
+  
+  # Emit a panel with title and body content
+  def _whimsy_panel(title, style: 'panel-default', header: 'h3')
+    _div.panel class: style do
+      _div.panel_heading do 
+        _.tag! header, class: 'panel-title' do
+          _ title
+        end
+      end
+      _div.panel_body do
+        yield
+      end
+    end
+  end
+  
 end
\ No newline at end of file
diff --git a/www/test/dataflow.cgi b/www/test/dataflow.cgi
index b5ecaee..b64b523 100755
--- a/www/test/dataflow.cgi
+++ b/www/test/dataflow.cgi
@@ -17,24 +17,21 @@ _html do
     _whimsy_content do
       _div.row do
         _div.col_sm_11 do
-          _div.panel.panel_primary do
-            _div.panel_heading {_h3.panel_title 'What Data Comes From Where'}
-            _div.panel_body do
-              _p %{ Whimsy tools consume and produce a variety of data files 
-                about PMCs and the ASF as a whole.  This non-comprehensive 
-                page explains which tools generate what intermediate data, 
-                and where the canonical underlying data sources are (many
-                of which are privately stored). .json files generated in 
-                /public are consumed by many other websites.
+          _whimsy_panel 'What Data Comes From Where' do
+            _p %{ Whimsy tools consume and produce a variety of data files 
+              about PMCs and the ASF as a whole.  This non-comprehensive 
+              page explains which tools generate what intermediate data, 
+              and where the canonical underlying data sources are (many
+              of which are privately stored). .json files generated in 
+              /public are consumed by many other websites.
+            }
+            _p do 
+              _ %{ Whimsy has a number of cron jobs - typically hourly - 
+                that periodically regenerate the /public directory, but 
+                only when the underlying data source has changed.
+                See the 
               }
-              _p do 
-                _ %{ Whimsy has a number of cron jobs - typically hourly - 
-                  that periodically regenerate the /public directory, but 
-                  only when the underlying data source has changed.
-                  See the 
-                }
-                _a 'server docs for more info.', href: 'https://github.com/apache/whimsy/blob/master/DEPLOYMENT.md'
-              end
+              _a 'server docs for more info.', href: 'https://github.com/apache/whimsy/blob/master/DEPLOYMENT.md'
             end
           end
         end

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

Mime
View raw message