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:
parent
ba5ef099f8
commit
8dd215bece
@ -17,6 +17,8 @@
|
|||||||
class cgit(
|
class cgit(
|
||||||
$vhost_name = $::fqdn,
|
$vhost_name = $::fqdn,
|
||||||
$serveradmin = "webmaster@${::fqdn}",
|
$serveradmin = "webmaster@${::fqdn}",
|
||||||
|
$cgitdir = '/var/www/cgit',
|
||||||
|
$staticfiles = '/var/www/cgit/static',
|
||||||
$ssl_cert_file = '',
|
$ssl_cert_file = '',
|
||||||
$ssl_key_file = '',
|
$ssl_key_file = '',
|
||||||
$ssl_chain_file = '',
|
$ssl_chain_file = '',
|
||||||
@ -81,6 +83,7 @@ class cgit(
|
|||||||
priority => '50',
|
priority => '50',
|
||||||
template => 'cgit/git.vhost.erb',
|
template => 'cgit/git.vhost.erb',
|
||||||
ssl => true,
|
ssl => true,
|
||||||
|
require => [ File[$staticfiles], Package['cgit'] ],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/httpd/conf.d/ssl.conf':
|
file { '/etc/httpd/conf.d/ssl.conf':
|
||||||
@ -92,6 +95,21 @@ class cgit(
|
|||||||
require => Package['mod_ssl'],
|
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':
|
file { '/etc/xinetd.d/git':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
Alias /cgit-data /usr/share/cgit
|
Alias /cgit-data /usr/share/cgit
|
||||||
ScriptAlias /cgit /var/www/cgi-bin/cgit
|
ScriptAlias /cgit /var/www/cgi-bin/cgit
|
||||||
|
Alias /static <%= scope.lookupvar("cgit::staticfiles") %>
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteRule ^/$ /cgit [R]
|
RewriteRule ^/$ /cgit [R]
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ cache-size=0
|
|||||||
clone-prefix=git://git.openstack.org https://git.openstack.org
|
clone-prefix=git://git.openstack.org https://git.openstack.org
|
||||||
|
|
||||||
# Specify the css url
|
# Specify the css url
|
||||||
css=/cgit-data/cgit.css
|
css=/static/openstack.css
|
||||||
|
|
||||||
# Hide owner for each repository on the index page
|
# Hide owner for each repository on the index page
|
||||||
enable-index-owner=0
|
enable-index-owner=0
|
||||||
@ -18,10 +18,10 @@ enable-index-owner=0
|
|||||||
enable-index-links=1
|
enable-index-links=1
|
||||||
|
|
||||||
# Add a cgit favicon
|
# Add a cgit favicon
|
||||||
#favicon=/favicon.ico
|
favicon=/static/favicon.ico
|
||||||
|
|
||||||
# Use a custom logo
|
# Use a custom logo
|
||||||
logo=/cgit-data/cgit.png
|
logo=/static/openstack.png
|
||||||
|
|
||||||
# Enable statistics per week, month and quarter
|
# Enable statistics per week, month and quarter
|
||||||
max-stats=quarter
|
max-stats=quarter
|
||||||
|
68
modules/openstack_project/files/git/openstack.css
Normal file
68
modules/openstack_project/files/git/openstack.css
Normal 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;
|
||||||
|
}
|
@ -88,4 +88,29 @@ class openstack_project::git (
|
|||||||
class { 'selinux':
|
class { 'selinux':
|
||||||
mode => 'enforcing'
|
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'],
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user