summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-03-05 13:19:40 -0500
committerJames Moger <james.moger@gitblit.com>2014-03-05 13:19:40 -0500
commit5ec75252b44e58cf300f1d21667603ae8fb76dff (patch)
treee5b8672d9bfd3312fe540a6c02bde03c4ad01488 /src
parent7ca05374db6f6af9de06665c9d2d08acfe85aa4f (diff)
downloadgitblit-5ec75252b44e58cf300f1d21667603ae8fb76dff.tar.gz
gitblit-5ec75252b44e58cf300f1d21667603ae8fb76dff.zip
Add setting to hide the navbar for those embedding Gitblit
Diffstat (limited to 'src')
-rw-r--r--src/main/distrib/data/gitblit.properties8
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BasePage.java3
-rw-r--r--src/main/resources/hideheader.css7
3 files changed, 18 insertions, 0 deletions
diff --git a/src/main/distrib/data/gitblit.properties b/src/main/distrib/data/gitblit.properties
index 73c6ebd5..190bfdf0 100644
--- a/src/main/distrib/data/gitblit.properties
+++ b/src/main/distrib/data/gitblit.properties
@@ -778,6 +778,14 @@ web.headerBorderFocusColor =
# SINCE 0.5.0
web.allowAdministration = true
+# Setting to disable rendering the top-level navigation header which includes
+# the login form, top-level links like dashboard, repositories, search, etc.
+# This setting is only useful if you plan to embed Gitblit within another page
+# or system.
+#
+# SINCE 1.4.0
+web.hideHeader = false
+
# Allows rpc clients to list repositories and possibly manage or administer the
# Gitblit server, if the authenticated account has administrator permissions.
# See *web.enableRpcManagement* and *web.enableRpcAdministration*.
diff --git a/src/main/java/com/gitblit/wicket/pages/BasePage.java b/src/main/java/com/gitblit/wicket/pages/BasePage.java
index 3e3de535..7d3d3a24 100644
--- a/src/main/java/com/gitblit/wicket/pages/BasePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/BasePage.java
@@ -93,6 +93,9 @@ public abstract class BasePage extends SessionPage {
if (app().settings().getBoolean(Keys.web.useResponsiveLayout, true)) {
add(CSSPackageResource.getHeaderContribution("bootstrap/css/bootstrap-responsive.css"));
}
+ if (app().settings().getBoolean(Keys.web.hideHeader, false)) {
+ add(CSSPackageResource.getHeaderContribution("hideheader.css"));
+ }
}
protected String getCanonicalUrl() {
diff --git a/src/main/resources/hideheader.css b/src/main/resources/hideheader.css
new file mode 100644
index 00000000..7a368d91
--- /dev/null
+++ b/src/main/resources/hideheader.css
@@ -0,0 +1,7 @@
+body {
+ padding-top:0px;
+}
+
+.navbar-fixed-top {
+ display:none;
+} \ No newline at end of file