whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curc...@apache.org
Subject [whimsy] branch master updated: Add breadcrumbs to house style
Date Sun, 18 Jun 2017 15:02:05 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


The following commit(s) were added to refs/heads/master by this push:
     new c54908d  Add breadcrumbs to house style
c54908d is described below

commit c54908d4e844bf74eb2cf2d814f8e12a5ef16a69
Author: Shane Curcuru <asf@shanecurcuru.org>
AuthorDate: Sun Jun 18 11:02:00 2017 -0400

    Add breadcrumbs to house style
---
 lib/whimsy/asf/themes.rb | 25 +++++++++++++++++++++++--
 www/test/test.cgi        |  6 ++++++
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/lib/whimsy/asf/themes.rb b/lib/whimsy/asf/themes.rb
index 50a76cd..643f1a8 100644
--- a/lib/whimsy/asf/themes.rb
+++ b/lib/whimsy/asf/themes.rb
@@ -188,8 +188,14 @@ class Wunderbar::HtmlMarkup
     end
   end
 
-  # Emit complete bootstrap theme, with related links, and helpblock of intro text
-  def _whimsy_body(title: 'MOAR WHIMSY!', subtitle: 'About This Script', relatedtitle: 'Related
Whimsy Links', related: {}, helpblock: nil)
+  # Emit complete bootstrap theme, with related links, and helpblock of intro text, optional
breadcrumbs
+  def _whimsy_body(title: 'MOAR WHIMSY!', 
+      subtitle: 'About This Script', 
+      relatedtitle: 'Related Whimsy Links', 
+      related: nil, 
+      helpblock: nil,
+      breadcrumbs: nil
+    )
     _whimsy_nav
     _div.content.container_fluid do
       _div.row do
@@ -234,6 +240,21 @@ class Wunderbar::HtmlMarkup
       end      
       _div.row do
         _div.col_sm_12 do
+          if breadcrumbs
+            _ol.breadcrumb do
+              _li do
+                _a href: 'https://whimsy.apache.org/' do
+                  _span.glyphicon.glyphicon_home
+                end
+              end
+              breadcrumbs.each do |name, link|
+                _li.active do
+                  _a name.to_s, href: link
+                end
+              end
+            end
+          end
+          # Primary content from caller emitted below
           yield
         end
       end
diff --git a/www/test/test.cgi b/www/test/test.cgi
index dd6b462..88882d0 100755
--- a/www/test/test.cgi
+++ b/www/test/test.cgi
@@ -18,6 +18,8 @@ _html do
   _body? do
     _whimsy_body(
       title: PAGETITLE,
+      subtitle: 'About This Example Script',
+      relatedtitle: 'More Useful Links',
       related: {
         "https://whimsy.apache.org/committers/tools" => "Whimsy Tool Listing",
         "https://incubator.apache.org/images/incubator_feather_egg_logo_sm.png" => "Incubator
Logo, to show that graphics can appear",
@@ -31,6 +33,10 @@ _html do
           Any related whimsy or other (projects.a.o, etc.) links should be in the related:
listing on the top right to help users find other useful things.
           This provides a consistent user experience.
         }
+      },
+      breadcrumbs: {
+        dataflow: '/test/dataflow.cgi',
+        testscript: '/test/test.cgi'
       }
     ) do
       # IF YOUR SCRIPT EMITS A LARGE TABLE

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

Mime
View raw message