diff --git a/themes/tajian/controller/MyController.php b/themes/tajian/controller/MyController.php
index e1d6a0d..06a182c 100644
--- a/themes/tajian/controller/MyController.php
+++ b/themes/tajian/controller/MyController.php
@@ -72,18 +72,39 @@ Class MyController extends SiteController {
return $this->redirect($shareUrl);
}
+ $htmlReadme = ''; //Readme.md 内容,底部网站详细介绍
+ $menus_sorted = array(); //Readme_sort.txt 说明文件内容,一级目录菜单从上到下的排序
+
$scanner = new DirScanner();
$scanner->setWebRoot(FSC::$app['config']['content_directory']);
$dirTree = $scanner->scan(__DIR__ . '/../../../www/' . FSC::$app['config']['content_directory'], 4);
+
$readmeFile = $scanner->getDefaultReadme();
+ if (!empty($readmeFile)) {
+ if (!empty($readmeFile['sort'])) {
+ $menus_sorted = explode("\n", $readmeFile['sort']);
+ }
+
+ $Parsedown = new Parsedown();
+ $content = file_get_contents($readmeFile['realpath']);
+ $htmlReadme = $Parsedown->text($content);
+ $htmlReadme = $scanner->fixMDUrls($readmeFile['realpath'], $htmlReadme);
+ }
+
+ //获取tags分类
+ $tags = $this->getTags($dirTree);
+ //排序
+ if (!empty($menus_sorted) && !empty($tags)) {
+ $tags = $this->sortTags($menus_sorted, $tags);
+ }
+
$nickname = $this->getNickname($readmeFile);
$pageTitle = "修改昵称 | " . FSC::$app['config']['site_name'];
- $this->layout = 'index';
$viewName = 'setnickname';
$params = compact(
- 'pageTitle', 'nickname'
+ 'htmlReadme', 'tags', 'pageTitle', 'nickname'
);
return $this->render($viewName, $params, $pageTitle);
}
diff --git a/themes/tajian/views/layout/main.php b/themes/tajian/views/layout/main.php
index 453f10a..dd63d3a 100644
--- a/themes/tajian/views/layout/main.php
+++ b/themes/tajian/views/layout/main.php
@@ -52,7 +52,7 @@ if (!empty(FSC::$app['config']['multipleUserUriParse']) && !empty(FSC::$app['use
添加
-
+
我的
diff --git a/www/css/tajian.css b/www/css/tajian.css
index a1276dc..2082fae 100644
--- a/www/css/tajian.css
+++ b/www/css/tajian.css
@@ -263,7 +263,7 @@ body.layout_index{background-color:#e5f1f3}
.layout_index .top_nav{padding-left:20%;padding-right:20%}
.layout_index .mt65{margin-top:65px}
.mt10,.layout_index .mt10{margin-top:10px}
-.layout_index .ml20{margin-left:20px}
+.ml20,.layout_index .ml20{margin-left:20px}
.layout_index .pl20{padding-left:20px}
.layout_index .pt20{padding-top:20px}
.layout_index .lh18{line-height:1.8}