Browse Source

Add setting to hide the navbar for those embedding Gitblit

tags/v1.4.0
James Moger 10 years ago
parent
commit
5ec75252b4

+ 2
- 0
releases.moxie View File

@@ -79,6 +79,7 @@ r20: {
- Added Redmine Fetch hook script (issue-359)
- Added Subgit hook contributed by TMate Software
- Added function to retain a user account but prohibit authentication. This is an alternative to deleting a user account.
- Added setting to hide the top-level navigation header to facilitate embedding Gitblit in something else.
dependencyChanges:
- updated to Jetty 8.1.13
- updated to JGit 3.2.0
@@ -105,6 +106,7 @@ r20: {
- { name: 'web.canonicalUrl', defaultValue: ' ' }
- { name: 'web.commitMessageRenderer', defaultValue: 'plain' }
- { name: 'web.documents', defaultValue: 'readme home index changelog contributing submitting_patches copying license notice authors' }
- { name: 'web.hideHeader', defaultValue: 'false' }
- { name: 'web.showBranchGraph', defaultValue: 'true' }
- { name: 'web.summaryShowReadme', defaultValue: 'false' }
- { name: 'server.redirectToHttpsPort', defaultValue: 'false' }

+ 8
- 0
src/main/distrib/data/gitblit.properties View File

@@ -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*.

+ 3
- 0
src/main/java/com/gitblit/wicket/pages/BasePage.java View File

@@ -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() {

+ 7
- 0
src/main/resources/hideheader.css View File

@@ -0,0 +1,7 @@
body {
padding-top:0px;
}

.navbar-fixed-top {
display:none;
}

Loading…
Cancel
Save