You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2015/04/08 11:20:20 UTC
[04/19] incubator-brooklyn git commit: - Catalog rearrangement so it
work with jekyll serve without moving files - Include the Navigation menu in
the catalog
- Catalog rearrangement so it work with jekyll serve without moving files
- Include the Navigation menu in the catalog
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/671fda38
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/671fda38
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/671fda38
Branch: refs/heads/master
Commit: 671fda387c445726cb96d468d056c6923a6a3c10
Parents: 5ed89cd
Author: Valentin Aitken <bo...@gmail.com>
Authored: Fri Feb 20 20:09:05 2015 +0200
Committer: Valentin Aitken <bo...@gmail.com>
Committed: Fri Feb 20 20:09:05 2015 +0200
----------------------------------------------------------------------
docs/_build/config-website-root.yml | 3 -
docs/_config.yml | 3 +-
docs/_plugins/site_structure.rb | 16 +-
docs/style/css/catalog_items.css | 153 +
docs/style/js/catalog/common.js | 94 +
docs/style/js/catalog/items.js | 24674 +++++++++++++++++++++++
docs/website/learnmore/catalog/common.js | 94 -
docs/website/learnmore/catalog/index.html | 150 +
docs/website/learnmore/catalog/index.md | 131 -
docs/website/learnmore/catalog/items.css | 153 -
docs/website/learnmore/catalog/items.js | 24674 -----------------------
11 files changed, 25086 insertions(+), 25059 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/671fda38/docs/_build/config-website-root.yml
----------------------------------------------------------------------
diff --git a/docs/_build/config-website-root.yml b/docs/_build/config-website-root.yml
deleted file mode 100644
index e5e4b07..0000000
--- a/docs/_build/config-website-root.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-path:
- website: ""
- guide: "/v/latest"
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/671fda38/docs/_config.yml
----------------------------------------------------------------------
diff --git a/docs/_config.yml b/docs/_config.yml
index 10a5d5a..3bc42e9 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -26,7 +26,8 @@ url_root: http://0.0.0.0:4000
path:
style: /style
guide: /guide
- website: /website
+ #guide: "/v/latest"
+ website: ""
v: /v
# Use local copies of dependencies in dev build (switched to remote using URLs for prod build)
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/671fda38/docs/_plugins/site_structure.rb
----------------------------------------------------------------------
diff --git a/docs/_plugins/site_structure.rb b/docs/_plugins/site_structure.rb
index fbfeb27..5b0c488 100644
--- a/docs/_plugins/site_structure.rb
+++ b/docs/_plugins/site_structure.rb
@@ -116,7 +116,17 @@ module SiteStructure
# Pathname API ignores first arg below if second is absolute
# puts "converting #{path} wrt #{referrent ? referrent.path : ""}"
file = Pathname.new(File.dirname(referrent ? referrent.path : "")) + path
- file += "index.md" if file.to_s.end_with? "/"
+
+ if file.to_s.end_with? "/"
+ if File.exist? File.join(file, 'index.md')
+ file += 'index.md'
+ elsif File.exist? File.join(file, 'index.html')
+ file += 'index.html'
+ else
+ file += 'index.md'
+ end
+ end
+
file = file.cleanpath
# is there a better way to trim a leading / ?
file = file.relative_path_from(Pathname.new("/")) unless file.relative?
@@ -167,11 +177,11 @@ module SiteStructure
# process all pages
puts "site_structure now processing all pages" if @@verbose
site.pages.each { |p|
- Generator.gen_structure(site, { 'path' => p.path }, nil, [], [], structure_processed_pages) if (p.path.end_with? ".md") && (!p['menu_processed'])
+ Generator.gen_structure(site, { 'path' => p.path }, nil, [], [], structure_processed_pages) if (p.path.end_with?(".md") || p.path.end_with?(".html")) && (!p['menu_processed'])
}
site.data['structure_processed_pages'] = structure_processed_pages
# puts "ROOT menu is #{site.data['menu']}"
-# puts "PAGE menu is #{structure_processed_pages['website/documentation/index.md'].data['menu']}"
+# puts "PAGE menu is #{structure_processed_pages['website/documentation/index.'].data['menu']}"
# (but note, in the context hash map 'data' on pages is promoted, so you access it like {{ page.menu }})
end
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/671fda38/docs/style/css/catalog_items.css
----------------------------------------------------------------------
diff --git a/docs/style/css/catalog_items.css b/docs/style/css/catalog_items.css
new file mode 100644
index 0000000..a0bf0f0
--- /dev/null
+++ b/docs/style/css/catalog_items.css
@@ -0,0 +1,153 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+*/
+/* landing page */
+body {
+ margin: 0px;
+ padding: 10px 0px 20px 0px;
+ font-family: arial, helvetica, sans-serif;
+ background-color: #ffffff;
+ color: #393939;
+ font-size: 15px;
+}
+
+.nav-tabs {
+ clear: both;
+ font-weight: bold;
+ font-size: 12pt;
+}
+.nav-tabs a {
+ color: #4d9d3a;
+}
+.nav-tabs a:hover {
+ color: #4d9d3a;
+}
+
+.tab-content {
+ padding: 20px;
+ padding-bottom: 10px;
+ border: 1px solid #ddd;
+ border-top: none;
+}
+
+a:hover > .card {
+ top: -2px;
+ background-color: #f4f4f4;
+ box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.2);
+}
+.card {
+ position: relative;
+ padding: 12px;
+ background-color: #f8f8f8;
+ color: #333;
+ border: 1px solid #E1E1E8;
+ border-radius: 6px;
+ font-size: 11pt;
+}
+.card,
+.filter {
+ margin-bottom: 10px;
+}
+a .glyphicon {
+ display: block;
+ position: absolute;
+ right: 0;
+ top: 0;
+ padding: 8px;
+ font-size: 16pt;
+ color: #aaa;
+}
+a:hover .glyphicon {
+ color: #888;
+}
+a.plain {
+ text-decoration: none !important;
+}
+.name {
+ font-size: 12pt;
+ font-weight: bold;
+}
+.type {
+ font-family: monospace;
+ color: #888;
+ margin-top: 2px;
+}
+#summary .description {
+ margin: 15px 0 25px 0;
+}
+.card .description {
+ margin: 10px 40px 0 20px;
+}
+
+#summary {
+ clear: both;
+ margin: 10px 0 20px 0;
+}
+.summaryLabel {
+ font-size: 20px;
+ font-weight: bold;
+}
+.summaryType {
+ font-family: monospace;
+ font-size: 12pt;
+ color: #888;
+}
+.java {
+ font-family: monospace;
+}
+
+.card dl {
+ margin-bottom: 0;
+ margin-top: 5px;
+}
+dt {
+ clear: both;
+ float: left;
+ width: 8em;
+ text-align: right;
+ font-weight: normal;
+}
+dd {
+ margin-left: 9em;
+}
+
+#container {
+ width: 980px;
+ padding: 0;
+ margin: 0 auto;
+}
+
+#identity {
+ float: left;
+ margin: 0;
+ padding: 30px 0 15px 10px;
+}
+
+#identity a {
+ text-decoration: none;
+ display: block;
+ margin: 0;
+ color: #4d9d3a;
+ font-size: 2.5em;
+ padding: 0;
+ background: transparent url(images/brooklyn.gif) no-repeat 0 0;
+ width: 206px;
+ height: 44px;
+ text-indent: -1000px;
+ overflow: hidden;
+}
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/671fda38/docs/style/js/catalog/common.js
----------------------------------------------------------------------
diff --git a/docs/style/js/catalog/common.js b/docs/style/js/catalog/common.js
new file mode 100644
index 0000000..8e8a45f
--- /dev/null
+++ b/docs/style/js/catalog/common.js
@@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+var brooklyn = (function ($, _) {
+
+ return {
+ findItemOfType: function(items, type) {
+ return _.findWhere(items, { type: type });
+ },
+
+ entityCard: _.template(
+ "<a class='plain' data-type='<%= type %>' href='entities/<%= type %>.html'>" +
+ "<div class='card'>" +
+ "<span class='glyphicon glyphicon-chevron-right'/>" +
+ "<div class='name'><%=name%></div>" +
+ "<div class='type'><%=type%></div>" +
+ "<div class='description'><%=description%></div>" +
+ "</div>" +
+ "</a>"
+ ),
+ policyCard: _.template(
+ "<a class='plain' data-type='<%= type %>' href='policies/<%= type %>.html'>" +
+ "<div class='card'>" +
+ "<span class='glyphicon glyphicon-chevron-right'/>" +
+ "<div class='name'><%=name%></div>" +
+ "<div class='type'><%=type%></div>" +
+ "<div class='description'><%=description%></div>" +
+ "</div>" +
+ "</a>"
+ ),
+ enricherCard: _.template(
+ "<a class='plain' data-type='<%= type %>' href='enrichers/<%= type %>.html'>" +
+ "<div class='card'>" +
+ "<span class='glyphicon glyphicon-chevron-right'/>" +
+ "<div class='name'><%=name%></div>" +
+ "<div class='type'><%=type%></div>" +
+ "<div class='description'><%=description%></div>" +
+ "</div>" +
+ "</a>"
+ ),
+
+ typeSummary: _.template(
+ "<div class='summaryLabel'><%=name%></div>" +
+ "<div class='summaryType'><%=type%></div>" +
+ "<div class='description'><%=description%></div>"
+ ),
+
+ configKeyCard: _.template(
+ "<div class='card configKey'>" +
+ "<div class='name'><%=name%></div>" +
+ "<dl>" +
+ "<dt>description</dt><dd><%=(description||' ')%></dd>" +
+ "<dt>value type</dt><dd class='java'><%=(type||' ')%></dd>" +
+ "<dt>default value</dt><dd><%=(defaultValue||' ')%></dd>" +
+ "</dl>" +
+ "</div>"
+ ),
+ sensorCard: _.template(
+ "<div class='card sensor'>" +
+ "<div class='name'><%=name%></div>" +
+ "<dl>" +
+ "<dt>description</dt><dd><%=(description||' ')%></dd>" +
+ "<dt>value type</dt><dd class='java'><%=(type||' ')%></dd>" +
+ "</dl>" +
+ "</div>"
+ ),
+ effectorCard: _.template(
+ "<div class='card effector'>" +
+ "<div class='name'><%=name%></div>" +
+ "<dl>" +
+ "<dt>description</dt><dd><%=(description||' ')%></dd>" +
+ "<dt>return type</dt><dd class='java'><%=(returnType||' ')%></dd>" +
+ "</dl>" +
+ "</div>"
+ )
+ };
+
+}(jQuery, _));