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: Fixup listing sorts/links/names and remove unneeded assets/
Date Sun, 11 Jun 2017 00:14:45 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 21954e3  Fixup listing sorts/links/names and remove unneeded assets/
21954e3 is described below

commit 21954e347f7c0a22c08393d5b85270c9d47bd217
Author: Shane Curcuru <asf@shanecurcuru.org>
AuthorDate: Sat Jun 10 20:14:40 2017 -0400

    Fixup listing sorts/links/names and remove unneeded assets/
---
 www/brand/assets/bootstrap-min.css |  6 -----
 www/brand/assets/bootstrap-min.js  |  7 ------
 www/brand/assets/jquery-min.js     |  4 ----
 www/brand/list.cgi                 | 46 +++++++++++++++++++++++---------------
 4 files changed, 28 insertions(+), 35 deletions(-)

diff --git a/www/brand/assets/bootstrap-min.css b/www/brand/assets/bootstrap-min.css
deleted file mode 100644
index 4cf729e..0000000
--- a/www/brand/assets/bootstrap-min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * Bootstrap v3.3.6 (http://getbootstrap.com)
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr
[...]
-/*# sourceMappingURL=bootstrap.min.css.map */
\ No newline at end of file
diff --git a/www/brand/assets/bootstrap-min.js b/www/brand/assets/bootstrap-min.js
deleted file mode 100644
index e79c065..0000000
--- a/www/brand/assets/bootstrap-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*!
- * Bootstrap v3.3.6 (http://getbootstrap.com)
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under the MIT license
- */
-if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use
strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw
new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than
version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"
[...]
-d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var
d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return
a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var
b=a(this);c.call(b,b.data()) [...]
\ No newline at end of file
diff --git a/www/brand/assets/jquery-min.js b/www/brand/assets/jquery-min.js
deleted file mode 100644
index e6a051d..0000000
--- a/www/brand/assets/jquery-min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
-!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw
new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof
window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.2",m=function(a,b){return
new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b
[...]
-return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void
0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof
b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void
0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}fu
[...]
-}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var
a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var
b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(
[...]
diff --git a/www/brand/list.cgi b/www/brand/list.cgi
index c0f69e6..706887a 100755
--- a/www/brand/list.cgi
+++ b/www/brand/list.cgi
@@ -21,6 +21,11 @@ CLASSGOODS = 'ClassGoods'
 REGISTERED = 'Registered'
 USA = 'United States of America'
 
+UNREG_ID = 'unreg_'
+MAP_PMC_REG = {
+  'lucene' => 'lucene-core'
+}
+
 # Transform docket spreadsheet into structured JSON
 def csv2json
   brand_dir = ASF::SVN['private/foundation/Brand']
@@ -95,11 +100,11 @@ def _marks(marks)
   end
 end
 
-def _project(pmc, proj, marks)
+def _project(pmc, pnam, purl, marks)
   _div.panel.panel_primary id: pmc do
     _div.panel_heading do 
       _h3!.panel_title do 
-        _a! proj['name'], href: proj['homepage']
+        _a! pnam, href: purl
         _{"&reg; software"}
       end
     end
@@ -111,9 +116,9 @@ def _project(pmc, proj, marks)
         end
       end
       if allr
-        _{"The ASF owns the following registered trademarks for our #{proj['name']}&reg;
software:"}
+        _{"The ASF owns the following registered trademarks for our #{pnam}&reg; software:"}
       else
-        _{"The ASF owns the following registered or applied for trademarks for our #{proj['name']}&reg;
software:"}
+        _{"The ASF owns the following registered or applied for trademarks for our #{pnam}&reg;
software:"}
       end
     end
     _marks marks
@@ -145,13 +150,17 @@ _html do
       },
       helpblock: -> {
         _p "This is an automated listing of the trademarks claimed by the ASF on behalf of
our many project communities."
-        _ul do
-          _li do
-            _a 'Registered trademarks', href: '#registered'
-          end
-          _li do
-            _a 'Other trademarks', href: '#unreg_a'
+        _p do
+          _ 'See the list of '
+          _a 'Registered trademarks', href: '#registered'
+          _ ' or see other trademarks by letter: '
           end
+          _ul.list_inline do
+            ("A".."Z").each do |ltr|
+              _li do
+                _a ltr, href: "##{UNREG_ID}#{ltr.downcase}"
+              end
+            end
         end
       }
     ) do
@@ -159,21 +168,22 @@ _html do
       docket = JSON.parse(File.read("#{brand_dir}/docket.json"))
       projects = JSON.parse(Net::HTTP.get(URI('https://projects.apache.org/json/foundation/projects.json')))
       _h3 'The ASF holds the following registered trademarks:', id: 'registered'
-      docket.each do |pmc, marks|
+      docket.each do |proj, marks|
+        # Map project name to name in projects.json for unusual cases
+        MAP_PMC_REG.key?(proj) ? pmc = MAP_PMC_REG[proj] :  pmc = proj
         if pmc == 'apache' then
           _apache(marks)
-        elsif projects[pmc] then
-          # TODO fix display of LUCENE and other products that don't match projects key
-          _project pmc, projects[pmc], marks
+        elsif projects.key?(pmc) then
+          _project pmc, projects[pmc]['name'], projects[pmc]['homepage'], marks
         else
           # TODO map all pmc names to projects or podlings
-          _project 'Apache ' + pmc.capitalize, 'https://' + pmc + '.apache.org', marks
+          _project pmc.downcase, 'Apache ' + pmc.capitalize, 'https://' + pmc + '.apache.org',
marks
         end
       end
       _h3 'The ASF holds the following unregistered trademarks:'
-      allproj = projects.group_by { |k| k[0].slice(0) } # TODO group by software product
name
-      allproj.each do |ltr, parr|
-        parent = "unreg_#{ltr}_"
+      allproj = projects.group_by { |k, v| /Apache\s+(.)/.match(v['name'])[1] }
+      allproj.sort.each do |ltr, parr|
+        parent = "#{UNREG_ID}#{ltr.downcase}"
         _div.panel_group id: parent, role: "tablist", aria_multiselectable: "true" do
           parr.each_with_index do |x, num|
             unless docket[x[0]] then

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

Mime
View raw message