Browse Source

rootDir improved, add icon for machete

master
filesite 3 years ago
parent
commit
9382505f99
  1. 2
      lib/DirScanner.php
  2. 2
      test/DirScannerTest.php
  3. 6
      themes/README.md
  4. 1
      www/content/README.md
  5. BIN
      www/content/machete_icon.png

2
lib/DirScanner.php

@ -461,7 +461,7 @@ Class DirScanner { @@ -461,7 +461,7 @@ Class DirScanner {
if (is_dir($dir)) {
if (!preg_match('/\/$/', $dir)) {$dir .= '/';}
if (empty($this->rootDir)) {
$this->rootDir = $dir;
$this->rootDir = realpath($dir);
}
$this->scanningDirLevel = $this->getScanningLevel($this->rootDir, $dir);
$nextLevels = $levels - $this->scanningDirLevel;

2
test/DirScannerTest.php

@ -68,6 +68,7 @@ $scanner = new DirScannerTest(); @@ -68,6 +68,7 @@ $scanner = new DirScannerTest();
//$dirTree = $scanner->scan(__DIR__);
$scanner->setWebRoot('/content/');
$dirTree = $scanner->scan(__DIR__ . '/content/', 4);
//$dirTree = $scanner->scan(__DIR__ . '/../www/content/', 4);
echo "Time cost: {$scanner->scanTimeCost} ms\n";
echo "\n";
@ -77,6 +78,7 @@ echo "\n"; @@ -77,6 +78,7 @@ echo "\n";
$readmeFile = $scanner->getDefaultReadme('favs/');
//$readmeFile = $scanner->getDefaultReadme();
if (!empty($readmeFile)) {
$readme_id = $readmeFile['id'];
$readme_titles = $scanner->getMDTitles($readme_id);

6
themes/README.md

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
此目录结构为:
```
{皮肤目录名}/controller/{控制器名}/
{皮肤目录名}/views/layout/
{皮肤目录名}/views/{视图目录名}/
```
@ -12,6 +13,7 @@ @@ -12,6 +13,7 @@
皮肤名:**night**,默认首页SiteController使用的视图名:**site**,
其目录结构为:
```
night/views/layout/
night/views/site/
night/controller/SiteController.php
night/views/layout/main.php
night/views/site/index.php
```

1
www/content/README.md

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
# filesite.io - 无数据库、基于文件和目录的Markdown文档、网址导航、图书、图片、视频网站PHP开源系统
![Filesite.io - Machete](./machete_icon.png)
## 简介

BIN
www/content/machete_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Loading…
Cancel
Save