Skip to content

Commit 6019628

Browse files
committed
adding skel for gitlist
1 parent f0334f9 commit 6019628

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+14242
-0
lines changed

console/component/Copy.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
4+
namespace MVC\Component;
5+
6+
7+
class Copy
8+
{
9+
10+
// removes files and non-empty directories
11+
public static function rrmdir($dir)
12+
{
13+
if (is_dir($dir)) {
14+
$files = scandir($dir);
15+
foreach ($files as $file)
16+
if ($file != "." && $file != "..") self::rrmdir("$dir/$file");
17+
rmdir($dir);
18+
} else if (file_exists($dir)) unlink($dir);
19+
}
20+
21+
// copies files and non-empty directories
22+
public static function rcopy($src, $dst)
23+
{
24+
//if (file_exists($dst)) self::rrmdir($dst);
25+
if (is_dir($src)) {
26+
mkdir($dst);
27+
$files = scandir($src);
28+
foreach ($files as $file)
29+
if ($file != "." && $file != "..") self::rcopy("$src/$file", "$dst/$file");
30+
} else if (file_exists($src)) copy($src, $dst);
31+
}
32+
33+
34+
}

console/skel/gitlist/index.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
ini_set('error_reporting', ~E_ALL);
4+
ini_set('display_errors', 0);
5+
6+
/**
7+
* GitList: an elegant and modern git repository viewer
8+
* http://gitlist.org
9+
*/
10+
11+
if (!ini_get('date.timezone')) {
12+
date_default_timezone_set('UTC');
13+
}
14+
15+
if (php_sapi_name() == 'cli-server' && file_exists(substr($_SERVER['REQUEST_URI'], 1))) {
16+
return false;
17+
}
18+
19+
if (!is_writable(__DIR__ . DIRECTORY_SEPARATOR . 'cache')) {
20+
die(sprintf('The "%s" folder must be writable for GitList to run.', __DIR__ . DIRECTORY_SEPARATOR . 'cache'));
21+
}
22+
23+
require 'vendor/autoload.php';
24+
25+
$config = GitList\Config::fromFile(__DIR__.'/config.ini');
26+
27+
if ($config->get('date', 'timezone')) {
28+
date_default_timezone_set($config->get('date', 'timezone'));
29+
}
30+
31+
$app = require 'boot.php';
32+
$app->run();
33+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bootstrap:
2+
lessc --compress less/bootstrap.less > css/style.css
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
em {font-style:normal;}
2+
3+
#git-graph-container{ clear: both}
4+
#rev-container, #rel-container {float:left;}
5+
#git-graph-container li {list-style-type:none;height:28px;line-height:27px;overflow:hidden;}
6+
#git-graph-container li .node-relation {font-family:'Bitstream Vera Sans Mono', 'Courier', monospace;}
7+
#git-graph-container li .author {color:#666666;}
8+
#git-graph-container li .time {color:#999999;font-size:80%}
9+
#git-graph-container li a {color:#000000;}
10+
#git-graph-container li a em {color:#BB0000;border-bottom:1px dotted #BBBBBB;text-decoration:none;font-style:normal;}
11+
12+
#rev-list {margin:0;padding:0 5px 0 0;}
13+
#graph-raw-list {margin:0;}

0 commit comments

Comments
 (0)