[jenkinscat-docs] master: Added common renderer for the navigation bar. (6a3cfb9)
immanetize at fedoraproject.org
immanetize at fedoraproject.org
Fri Feb 6 07:40:30 UTC 2015
Repository : http://git.fedorahosted.org/cgit/jenkinscat-docs.git
On branch : master
>---------------------------------------------------------------
commit 6a3cfb9f56ac16cd39882869f8bcc965c1e9414d
Author: Pavel Tisnovsky <ptisnovs at redhat.com>
Date: Mon Dec 15 10:41:09 2014 +0100
Added common renderer for the navigation bar.
>---------------------------------------------------------------
ChangeLog | 5 ++
src/jenkinscat/renderers/navigation_bar.clj | 71 +++++++++++++++++++++++++++
2 files changed, 76 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 21170fb..b7a6a28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-15 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/jenkinscat/renderers/navigation_bar.clj:
+ Added common renderer for the navigation bar.
+
2014-12-12 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/jenkinscat/renderers/error_page.clj:
diff --git a/src/jenkinscat/renderers/navigation_bar.clj b/src/jenkinscat/renderers/navigation_bar.clj
new file mode 100644
index 0000000..9ee1638
--- /dev/null
+++ b/src/jenkinscat/renderers/navigation_bar.clj
@@ -0,0 +1,71 @@
+;;;
+;;; Jenkinscat HTTP server that handles all requests send from clients/browsers.
+;;;
+;;; Copyright (c) 2014 Pavel Tisnovsky, Red Hat
+;;; All rights reserved.
+;;;
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions are met:
+;;; * Redistributions of source code must retain the above copyright
+;;; notice, this list of conditions and the following disclaimer.
+;;; * Redistributions in binary form must reproduce the above copyright
+;;; notice, this list of conditions and the following disclaimer in the
+;;; documentation and/or other materials provided with the distribution.
+;;; * Neither the name of the Red Hat nor the
+;;; names of its contributors may be used to endorse or promote products
+;;; derived from this software without specific prior written permission.
+;;;
+;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+;;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;;; DISCLAIMED. IN NO EVENT SHALL Pavel Tisnovsky BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+;;; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+;;; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+;;; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+;;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+;;;
+
+
+
+(ns jenkinscat.renderers.navigation-bar)
+
+(require '[hiccup.core :as hiccup])
+(require '[hiccup.page :as page])
+(require '[hiccup.form :as form])
+
+(defn navigation-bar
+ [title]
+ [:nav {:class "navbar navbar-inverse navbar-fixed-top" :role "navigation"}
+ [:div {:class "container-fluid"}
+ [:div {:class "navbar-header"}
+ [:button {:type "button" :class "navbar-toggle" :data-toggle "collapse"}
+ [:span {:class "sr-only"} "Toggle navigation"]
+ [:span {:class "icon-bar"}]
+ [:span {:class "icon-bar"}]
+ [:span {:class "icon-bar"}]
+ ]
+ [:img {:class "navbar-brand-" :style "float:left" :src "jenkinscat.png"}]
+ [:a {:href "/" :class "navbar-brand"} " Jenkinscat"]
+ ] ; ./navbar-header
+ [:div {:class "col-md-4"}
+ [:form {:class "navbar-form navbar-left"}
+ [:div {:class "form-group"}
+ "<input disabled='disabled' autofocus='autofocus' size='40' type='text' class='form-control' ng-model='search' placeholder='' id='searchinput'>"
+ ]
+ ]
+ ] ; col ends
+ [:div {:class "col-md"}
+ [:a {:href "/job-configurations" :class "navbar-brand"} "Job configurations"]
+ ] ; col ends
+ [:div {:class "col-md"}
+ [:a {:href "/statistics" :class "navbar-brand"} "Statistics"]
+ ] ; col ends
+ [:div {:class "col-md"}
+ [:a {:href "/add-book-step-1" :class "navbar-brand"} "Add book"]
+ ] ; col ends
+ ] ; /.container-fluid
+ ]
+)
+
More information about the docs-commits
mailing list