Add static web directory for cgit & initial files

Create and define a static directory for cgit to use.

Add initial favicon and logo files and include in cgitrc.

Also include custom CSS and background image.

Change-Id: If1e20d8e62557cc90aafbf92f4291b964400e029
This commit is contained in:
Elizabeth Krumbach Joseph 2013-08-14 17:33:00 -07:00
parent ba5ef099f8
commit 8dd215bece
5 changed files with 115 additions and 3 deletions

View File

@ -17,6 +17,8 @@
class cgit(
$vhost_name = $::fqdn,
$serveradmin = "webmaster@${::fqdn}",
$cgitdir = '/var/www/cgit',
$staticfiles = '/var/www/cgit/static',
$ssl_cert_file = '',
$ssl_key_file = '',
$ssl_chain_file = '',
@ -81,6 +83,7 @@ class cgit(
priority => '50',
template => 'cgit/git.vhost.erb',
ssl => true,
require => [ File[$staticfiles], Package['cgit'] ],
}
file { '/etc/httpd/conf.d/ssl.conf':
@ -92,6 +95,21 @@ class cgit(
require => Package['mod_ssl'],
}
file { $cgitdir:
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
}
file { $staticfiles:
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
require => File[$cgitdir],
}
file { '/etc/xinetd.d/git':
ensure => present,
owner => 'root',

View File

@ -18,6 +18,7 @@
Alias /cgit-data /usr/share/cgit
ScriptAlias /cgit /var/www/cgi-bin/cgit
Alias /static <%= scope.lookupvar("cgit::staticfiles") %>
RewriteEngine On
RewriteRule ^/$ /cgit [R]

View File

@ -9,7 +9,7 @@ cache-size=0
clone-prefix=git://git.openstack.org https://git.openstack.org
# Specify the css url
css=/cgit-data/cgit.css
css=/static/openstack.css
# Hide owner for each repository on the index page
enable-index-owner=0
@ -18,10 +18,10 @@ enable-index-owner=0
enable-index-links=1
# Add a cgit favicon
#favicon=/favicon.ico
favicon=/static/favicon.ico
# Use a custom logo
logo=/cgit-data/cgit.png
logo=/static/openstack.png
# Enable statistics per week, month and quarter
max-stats=quarter

View File

@ -0,0 +1,68 @@
@import url('/cgit-data/cgit.css');
body {
background: url("/static/openstack-page-bkg.jpg") no-repeat scroll 0 0 white !important;
}
div#cgit {
background: transparent;
}
div#cgit table#header td.main {
font-size: 200%;
letter-spacing: -1px;
color: #CF2F19;
}
div#cgit table.list {
border-collapse: separate;
border-spacing: 0;
}
div#cgit table.list th {
border: 1px solid #ffffff;
padding: 2px 6px 1px;
background-color: #eef3f5;
font-style: italic;
white-space: nowrap;
font-weight: normal;
}
div#cgit table.list th a {
color: #264d69;
}
div#cgit table.list td.reposection {
color: #264d69;
}
div#cgit table.list tr:nth-child(odd) {
background: white;
}
div#cgit table.list tr:nth-child(even) {
background: #f5f5ff;
}
div#cgit table.list td {
padding-left: 5px;
padding-right: 5px;
border-right: 1px solid #eef3f5;
border-bottom: 1px solid #eef3f5;
}
div#cgit table.list td a {
color: #264d69;
}
div#cgit table.list td a:hover {
color: black;
}
div#cgit table.list tr.nohover {
background: #eef3f5;
}
div#cgit table.list tr.nohover:hover {
background: #eef3f5;
}

View File

@ -88,4 +88,29 @@ class openstack_project::git (
class { 'selinux':
mode => 'enforcing'
}
file { '/var/www/cgit/static/openstack.png':
ensure => present,
source => 'puppet:///modules/openstack_project/openstack.png',
require => File['/var/www/cgit/static'],
}
file { '/var/www/cgit/static/favicon.ico':
ensure => present,
source => 'puppet:///modules/openstack_project/status/favicon.ico',
require => File['/var/www/cgit/static'],
}
file { '/var/www/cgit/static/openstack-page-bkg.jpg':
ensure => present,
source => 'puppet:///modules/openstack_project/openstack-page-bkg.jpg',
require => File['/var/www/cgit/static'],
}
file { '/var/www/cgit/static/openstack.css':
ensure => present,
source => 'puppet:///modules/openstack_project/git/openstack.css',
require => File['/var/www/cgit/static'],
}
}