You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ri...@apache.org on 2014/12/22 14:47:45 UTC

[2/8] incubator-brooklyn git commit: combining style sheets and layouts, esp for user guide

combining style sheets and layouts, esp for user guide

user guide now has the same top+bottom branding as rest of site


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/09c98bd4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/09c98bd4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/09c98bd4

Branch: refs/heads/master
Commit: 09c98bd4c31d1025e3b9e6d1507c4287535d454e
Parents: 4dc23aa
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Thu Dec 18 15:00:08 2014 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Thu Dec 18 15:00:08 2014 +0000

----------------------------------------------------------------------
 docs/_includes/base-head.html   |  3 ++
 docs/_includes/topmenu.html     | 42 +++++++++++++++++++++++++
 docs/_layouts/base.html         | 16 ++++++++++
 docs/_layouts/guide-base.html   |  7 ++---
 docs/_layouts/guide-normal.html | 18 +++++------
 docs/_layouts/website-base.html | 58 +---------------------------------
 docs/style/css/base.css         | 61 ++++++++++++++++++++++++++++++++++++
 docs/style/css/guide-toc.css    |  2 +-
 docs/style/css/guide.css        | 55 ++++++--------------------------
 9 files changed, 145 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/09c98bd4/docs/_includes/base-head.html
----------------------------------------------------------------------
diff --git a/docs/_includes/base-head.html b/docs/_includes/base-head.html
index 2d5a0b4..9afadea 100644
--- a/docs/_includes/base-head.html
+++ b/docs/_includes/base-head.html
@@ -6,4 +6,7 @@
 
 <link href="{% dependency_url bootstrap.css %}" rel="stylesheet">
 <link href="{{site.path.style}}/deps/bootstrap-theme.css" rel="stylesheet">
+
+<link rel="stylesheet" href="{{ site.path.style }}/css/code.css" type="text/css" media="screen" />
+
 <link href="{{site.path.style}}/css/base.css" rel="stylesheet">

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/09c98bd4/docs/_includes/topmenu.html
----------------------------------------------------------------------
diff --git a/docs/_includes/topmenu.html b/docs/_includes/topmenu.html
new file mode 100644
index 0000000..9d33243
--- /dev/null
+++ b/docs/_includes/topmenu.html
@@ -0,0 +1,42 @@
+<nav class="navbar navbar-default navbar-fixed-top" id="header" role="navigation">
+    <div class="container">
+        <div class="container-fluid">
+            <!-- Brand and toggle get grouped for better mobile display -->
+            <div class="navbar-header">
+                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+                    <span class="sr-only">Toggle navigation</span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                </button>
+                {% if page.navgroup != 'home' %}<a class="navbar-brand" href="{{site.path.website}}/"><img src="{{site.path.style}}/img/apache-brooklyn-logo-244px-wide.png" alt="brooklyn"></a>{% endif %}
+            </div>
+
+            <!-- Collect the nav links, forms, and other content for toggling -->
+            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+                <ul class="nav navbar-nav navbar-right">
+                    {% for navgroup in site.data.navgroups %}
+                    {% if navgroup.page.menu2 %}
+                    <li class="dropdown{% if page.navgroup == navgroup.id %} active{% endif %}">
+                        <a href="{{navgroup.page.url}}">{{navgroup.title}}</a>
+                        <ul class="dropdown-menu" role="menu">
+                            <li>
+                                <a href="{{navgroup.page.url}}">{{navgroup.title_in_menu}}</a>
+                            </li>
+                            <li class="divider"></li>
+                            {% for child in navgroup.page.menu2 %}
+                            <li>
+                                <a href="{{child.reference.url}}">{{child.reference.title}}</a>
+                            </li>
+                            {% endfor %}
+                        </ul>
+                    </li><!-- {{ navgroup.id }} -->
+                    {% else %}
+                    <li class="{% if page.navgroup == navgroup.id %}active{% endif %}"><a href="{{navgroup.page.url}}">{{navgroup.title}}</a></li><!-- {{ navgroup.id }} -->
+                    {% endif %}
+                    {% endfor %}
+                </ul>
+            </div><!-- /.navbar-collapse -->
+        </div><!-- /.container-fluid -->
+    </div>
+</nav>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/09c98bd4/docs/_layouts/base.html
----------------------------------------------------------------------
diff --git a/docs/_layouts/base.html b/docs/_layouts/base.html
index 8b77367..4299467 100644
--- a/docs/_layouts/base.html
+++ b/docs/_layouts/base.html
@@ -22,4 +22,20 @@ under the License.
 
 {{ content }}
 
+
+<script src="{% dependency_url jquery.js %}"></script>
+<script src="{% dependency_url bootstrap.js %}"></script>
+
+<script language="JavaScript" type="application/javascript">
+    $(window).resize(function () { 
+        $('body').css('padding-top', parseInt($('#header').css("height"))+10);
+        $('body').css('padding-bottom', parseInt($('#footer').css("height"))+10);
+    });
+    
+    $(window).load(function () { 
+        $('body').css('padding-top', parseInt($('#header').css("height"))+10);        
+        $('body').css('padding-bottom', parseInt($('#footer').css("height"))+10);
+    });</script>
+</body>
+
 </html>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/09c98bd4/docs/_layouts/guide-base.html
----------------------------------------------------------------------
diff --git a/docs/_layouts/guide-base.html b/docs/_layouts/guide-base.html
index ab41e68..eecb5ea 100644
--- a/docs/_layouts/guide-base.html
+++ b/docs/_layouts/guide-base.html
@@ -20,13 +20,11 @@ layout: base
 ---
 
 <head>
-  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-  <title>{{ page.title }}</title>
 
-  <link rel="stylesheet" href="{{ site.path.style }}/css/website.css" type="text/css" media="screen" />
+  {% include base-head.html %}
+
   <link rel="stylesheet" href="{{ site.path.style }}/css/guide.css" type="text/css" media="screen" />
   <link rel="stylesheet" href="{{ site.path.style }}/css/guide-toc.css" type="text/css" media="screen" />
-  <link rel="stylesheet" href="{{ site.path.style }}/css/code.css" type="text/css" media="screen" />
 
     <script type="text/javascript" src="https://www.google.com/jsapi"></script>
   
@@ -46,6 +44,7 @@ layout: base
     background-image: url("{{ site.path.style }}/img/clipboard-green-normal.png");
     background-size: 18px 21px;
     width: 18px; height: 21px;
+    overflow: auto;
 }
 .clipboard_button:hover, .clipboard_button.zeroclipboard-is-hover { background-image: url("{{ site.path.style }}/img/clipboard-green-hover.png"); }
 .clipboard_button:active, .clipboard_button.zeroclipboard-is-active { background-image: url("{{ site.path.style }}/img/clipboard-green-click.png"); }'

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/09c98bd4/docs/_layouts/guide-normal.html
----------------------------------------------------------------------
diff --git a/docs/_layouts/guide-normal.html b/docs/_layouts/guide-normal.html
index 10356cb..04840e3 100644
--- a/docs/_layouts/guide-normal.html
+++ b/docs/_layouts/guide-normal.html
@@ -19,10 +19,13 @@
 layout: guide-base
 ---
 
+{% include topmenu.html %}
+
 <div id="container">
 
     <div id="header">
-    
+
+<!--    
         <div id="identity">
             <a href="{{ site.path.website }}/">Brooklyn</a>
         </div>
@@ -34,13 +37,14 @@ layout: guide-base
             <li><a href="https://twitter.com/#!/search?q=brooklyncentral">Twitter</a></li>
             <li><a href="{{site.path.guide}}/meta/contact.html">Contact</a></li>
         </ul>
+-->
 
         <div id="menubar">  
 
 {% include topbar.html %}                    
 
             <form method="get" id="simple_google" class="searchform" action="http://www.google.com/search" method="get">
-                <input type="text" class="searchinput" name="brooklyn-search" placeholder="Search: type &amp; hit enter" />
+                <input type="text" class="searchinput" name="brooklyn-search" placeholder=" Search: type &amp; hit enter" />
                 <input type="hidden" name="q" value="" />
             </form>
             
@@ -69,13 +73,7 @@ layout: guide-base
       </div>
 
     </div><!--contentcontainer-->
-        
-    <div id="footer">
-        <p id="copyright">
-            <b>brooklyn is distributed under the Apache License v2.0.</b><br/>
-            brooklyn is a registered trademark of Cloudsoft Corporation.<br/>
-            &copy; 2013 Cloudsoft Corporation.
-        </p>
-    </div><!--footer -->
 
 </div><!--container-->
+
+{% include footer.html %}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/09c98bd4/docs/_layouts/website-base.html
----------------------------------------------------------------------
diff --git a/docs/_layouts/website-base.html b/docs/_layouts/website-base.html
index c63aaf7..8f8c24a 100644
--- a/docs/_layouts/website-base.html
+++ b/docs/_layouts/website-base.html
@@ -28,62 +28,6 @@ layout: base
 
 <body>
 
-<nav class="navbar navbar-default navbar-fixed-top" id="header" role="navigation">
-    <div class="container">
-        <div class="container-fluid">
-            <!-- Brand and toggle get grouped for better mobile display -->
-            <div class="navbar-header">
-                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
-                    <span class="sr-only">Toggle navigation</span>
-                    <span class="icon-bar"></span>
-                    <span class="icon-bar"></span>
-                    <span class="icon-bar"></span>
-                </button>
-                {% if page.navgroup != 'home' %}<a class="navbar-brand" href="{{site.path.website}}/"><img src="{{site.path.style}}/img/apache-brooklyn-logo-244px-wide.png" alt="brooklyn"></a>{% endif %}
-            </div>
-
-            <!-- Collect the nav links, forms, and other content for toggling -->
-            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
-                <ul class="nav navbar-nav navbar-right">
-                    {% for navgroup in site.data.navgroups %}
-                    {% if navgroup.page.menu2 %}
-                    <li class="dropdown{% if page.navgroup == navgroup.id %} active{% endif %}">
-                        <a href="{{navgroup.page.url}}">{{navgroup.title}}</a>
-                        <ul class="dropdown-menu" role="menu">
-                            <li>
-                                <a href="{{navgroup.page.url}}">{{navgroup.title_in_menu}}</a>
-                            </li>
-                            <li class="divider"></li>
-                            {% for child in navgroup.page.menu2 %}
-                            <li>
-                                <a href="{{child.reference.url}}">{{child.reference.title}}</a>
-                            </li>
-                            {% endfor %}
-                        </ul>
-                    </li><!-- {{ navgroup.id }} -->
-                    {% else %}
-                    <li class="{% if page.navgroup == navgroup.id %}active{% endif %}"><a href="{{navgroup.page.url}}">{{navgroup.title}}</a></li><!-- {{ navgroup.id }} -->
-                    {% endif %}
-                    {% endfor %}
-                </ul>
-            </div><!-- /.navbar-collapse -->
-        </div><!-- /.container-fluid -->
-    </div>
-</nav>
+{% include topmenu.html %}
 
 {{ content }}
-
-<script src="{% dependency_url jquery.js %}"></script>
-<script src="{% dependency_url bootstrap.js %}"></script>
-
-<script language="JavaScript" type="application/javascript">
-    $(window).resize(function () { 
-        $('body').css('padding-top', parseInt($('#header').css("height"))+10);
-        $('body').css('padding-bottom', parseInt($('#footer').css("height"))+10);
-    });
-    
-    $(window).load(function () { 
-        $('body').css('padding-top', parseInt($('#header').css("height"))+10);        
-        $('body').css('padding-bottom', parseInt($('#footer').css("height"))+10);
-    });</script>
-</body>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/09c98bd4/docs/style/css/base.css
----------------------------------------------------------------------
diff --git a/docs/style/css/base.css b/docs/style/css/base.css
index 46fd90d..30bfafd 100644
--- a/docs/style/css/base.css
+++ b/docs/style/css/base.css
@@ -1,4 +1,23 @@
 
+/* BASIC STYLES
+   ----------------------------------------------------------------------- */
+body {margin: 0px; padding: 10px 0px 20px 0px; font-family: arial, helvetica, sans-serif; background-color: #ffffff; color: #393939; }
+h1, h2, h3, h4, h5, h6 {}
+input, select, textarea {}
+p, li, label, td, th,input, select, textarea {}
+h1 {margin: 0 0 20px 0; padding: 0; font-size: 32px; font-weight: normal; color: #4d9d3a; border-bottom: 1px solid #e9e9e9;}
+h2 {margin: 1.25em 0 20px 0; font-size: 20px; font-weight: normal; color: #4f8243}
+h3 {margin: 1.1em 0 20px 0; font-size: 17px; font-weight: bold; color: #111111;}
+h4 {margin: 1.1em 0 20px 0; font-size: 15px; font-weight: bold;}
+textarea {width: 500px; padding: 2px 5px;}
+p, input, label, li {}
+p { margin: 0.75em 0; line-height: 1.4em;}
+form {padding: 0; margin: 0;}
+img {border: 0;}
+a {color: #4f9d3c;}
+a:hover {text-decoration: none;}
+
+
 /* WEBSITE MENUS
    ----------------------------------------------------------------------- */
 
@@ -41,6 +60,48 @@ html {
 }
 
 
+/* CODE RENDERING
+   ----------------------------------------------------------------------- */
+pre {
+    font-family: Consolas, Lucida Console, Monaco, monospace;
+    background-color:#e8eded;
+    padding: 0.4em 0.8em;
+    white-space: pre;
+    word-wrap: normal;
+    overflow-y: scroll;
+    overflow-x: scroll;
+    /* override border and line-height on 'pre' from bootstrap */
+    border: none;
+    border-radius: 2px;
+    line-height: 1;
+}
+code {
+    font-family: Consolas, Lucida Console, Monaco, monospace;
+    font-size: 85%;
+    /* override color and bg-color on 'code' from bootstrap, and a touch more padding on top since font-size is smaller */
+    color: black;
+    background-color:#e8eded;
+    padding: 4px 4px 2px 4px;
+    border-radius: 3px;
+}
+pre code {
+    /* override settings on 'pre code' from bootstrap */
+    font-size: 85%; 
+    line-height: 1;
+    white-space: pre;
+    word-wrap: normal;
+    overflow-x: scroll;
+    /** and no padding since pre already has some */ 
+    padding: 0px; 
+}
+.highlight { background-color:#e8eded; } /* clipboard icon should have the same background color as the code */
+
+.nowrap {
+  white-space: pre;
+  word-wrap: normal;
+  overflow-x: scroll;
+}
+
 /* LANDING PAGE
    ----------------------------------------------------------------------- */
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/09c98bd4/docs/style/css/guide-toc.css
----------------------------------------------------------------------
diff --git a/docs/style/css/guide-toc.css b/docs/style/css/guide-toc.css
index 6ae9aaf..be38a11 100644
--- a/docs/style/css/guide-toc.css
+++ b/docs/style/css/guide-toc.css
@@ -56,7 +56,7 @@
     position: relative;
     height: 0px;
 /*  right: -180px; to make appear at right */
-    left: -180px;
+    left: -158px;
     width: 180px;
     top: -17px;
 }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/09c98bd4/docs/style/css/guide.css
----------------------------------------------------------------------
diff --git a/docs/style/css/guide.css b/docs/style/css/guide.css
index 0a89027..6cfa2d0 100644
--- a/docs/style/css/guide.css
+++ b/docs/style/css/guide.css
@@ -20,23 +20,6 @@
 Brooklyn minisite
 */
 
-/* BASIC STYLES */
-body {margin: 0px; padding: 10px 0px 20px 0px; font-family: arial, helvetica, sans-serif; background-color: #ffffff; color: #393939; font-size: 15px;}
-h1, h2, h3, h4, h5, h6 {}
-input, select, textarea {}
-p, li, label, td, th,input, select, textarea {}
-h1 {margin: 0 0 20px 0; padding: 0; font-size: 32px; font-weight: normal; color: #4d9d3a; border-bottom: 1px solid #e9e9e9;}
-h2 {margin: 1.25em 0 20px 0; font-size: 20px; font-weight: normal; color: #4f8243}
-h3 {margin: 1.1em 0 20px 0; font-size: 17px; font-weight: bold; color: #111111;}
-h4 {margin: 1.1em 0 20px 0; font-size: 15px; font-weight: bold;}
-textarea {width: 500px; padding: 2px 5px;}
-p, input, label, li {}
-p { margin: 0.75em 0; line-height: 1.4em;}
-form {padding: 0; margin: 0;}
-img {border: 0;}
-a {color: #4f9d3c;}
-a:hover {text-decoration: none;}
-
 /*ACCESSIBILITY*/
 #shortcuts {display: block; position: absolute; top: -100px; z-index: 0} 
 #shortcuts a {padding: 0 0.5em; left: 0; z-index: 0}
@@ -53,7 +36,15 @@ a:hover {text-decoration: none;}
 #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(../img/brooklyn.gif) no-repeat 0 0; width: 206px; height: 44px; text-indent: -1000px; overflow: hidden;}
 .searchform {float: right; width: 160px; margin: 0; padding: 5px 5px 0 0; overflow: hidden; text-align: right;}
-.searchinput {width: 147px; background: #ffffff; border: 1px solid #b1b7c2; -moz-border-radius: 5px; border-radius: 5px; color: #c8ccd5; padding: 3px;}
+.searchinput {
+  width: 147px; 
+  padding: 3px;
+  color: #c8ccd5; 
+  background: #ffffff; 
+  border: 1px solid #b1b7c2; 
+  -moz-border-radius: 5px; border-radius: 5px; 
+  font: -webkit-small-control;
+}
 .searchinput:focus {color: #333333;}
 
 /*MENUS*/
@@ -61,7 +52,7 @@ a:hover {text-decoration: none;}
 #header #quicklinks li {margin: 0; padding: 0 5px 0 7px; text-transform: uppercase; font-size: 10px; float: left; background: #ffffff url(../img/divider-quicklinks.gif) no-repeat left center;}
 #header #quicklinks li:first-child {background-image: none;}
 #header #quicklinks a {text-decoration: none; color: #4f8243;}
-#menubar  {clear: both; width: 978px; height: 34px; background-color: #e8eded; border: 1px solid #d5dade;  -moz-border-radius: 8px; border-radius: 8px;}
+#menubar  {clear: both; width: 978px; height: 36px; background-color: #e8eded; border: 1px solid #d5dade;  -moz-border-radius: 8px; border-radius: 8px;}
 #mainmenu {list-style: none; margin: 0; padding: 4px 0 0 2px; width: 765px; display: block; float: left; font-size: 15px;}
 #mainmenu li {float: left; position: relative; margin: 0; padding: 0; }
 #mainmenu>li {border: 1px solid transparent; border-top-left-radius: 5px; -moz-border-radius-topleft: 5px; border-top-right-radius: 5px; -moz-border-radius-topright: 5px; border-bottom: 0;}
@@ -126,29 +117,3 @@ div.warning{
 #sidebar li {margin: 0 0 5px; padding: 0;}
 #sidebar li a {text-decoration: none;}
 #sidebar li a:hover {text-decoration: underline;}
-
-/* FOOTER */
-#footer {color: #9aa2a6; margin: 0; height: auto; margin: 0 10px; overflow: hidden; border-top: 1px solid #cbcbcb; font-size: 10px;}
-#footer p {padding: 0; line-height: 12px; font-size: 10px;}
-#footer p#copyright {float: right; text-align: right; color: #6c6c6c;}
-#footer p#linklove {float: left; text-align: left; color: #b6b6b6;}
-#footer p#linklove a {color: #b6b6b6; text-decoration: none;}
-#footer p#linklove a:hover {text-decoration: underline;}
-
-
-/* CODE RENDERING
-   ----------------------------------------------------------------------- */
-pre {
-    font-family: Consolas, Lucida Console, Monaco, monospace;
-    background-color:#e8eded;
-    padding: 1em;
-    font-size: 85%;
-    overflow-y: auto; /* horizontal scroll bar if line length is too long */
-}
-code {
-    font-family: Consolas, Lucida Console, Monaco, monospace;
-    font-size: 85%;
-    line-height: 85%;
-}
-pre code { font-size: 85%; }
-.highlight { background-color:#e8eded; } /* clipboard icon should have the same background color as the code */