Browse Source

add other data for nickname set page

master
filesite 7 months ago
parent
commit
821311259a
  1. 25
      themes/tajian/controller/MyController.php
  2. 2
      themes/tajian/views/layout/main.php
  3. 2
      www/css/tajian.css

25
themes/tajian/controller/MyController.php

@ -72,18 +72,39 @@ Class MyController extends SiteController {
return $this->redirect($shareUrl); return $this->redirect($shareUrl);
} }
$htmlReadme = ''; //Readme.md 内容,底部网站详细介绍
$menus_sorted = array(); //Readme_sort.txt 说明文件内容,一级目录菜单从上到下的排序
$scanner = new DirScanner(); $scanner = new DirScanner();
$scanner->setWebRoot(FSC::$app['config']['content_directory']); $scanner->setWebRoot(FSC::$app['config']['content_directory']);
$dirTree = $scanner->scan(__DIR__ . '/../../../www/' . FSC::$app['config']['content_directory'], 4); $dirTree = $scanner->scan(__DIR__ . '/../../../www/' . FSC::$app['config']['content_directory'], 4);
$readmeFile = $scanner->getDefaultReadme(); $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); $nickname = $this->getNickname($readmeFile);
$pageTitle = "修改昵称 | " . FSC::$app['config']['site_name']; $pageTitle = "修改昵称 | " . FSC::$app['config']['site_name'];
$this->layout = 'index';
$viewName = 'setnickname'; $viewName = 'setnickname';
$params = compact( $params = compact(
'pageTitle', 'nickname' 'htmlReadme', 'tags', 'pageTitle', 'nickname'
); );
return $this->render($viewName, $params, $pageTitle); return $this->render($viewName, $params, $pageTitle);
} }

2
themes/tajian/views/layout/main.php

@ -52,7 +52,7 @@ if (!empty(FSC::$app['config']['multipleUserUriParse']) && !empty(FSC::$app['use
<img src="/img/addvideos.svg" alt="添加图标" /> <img src="/img/addvideos.svg" alt="添加图标" />
<span>添加</span> <span>添加</span>
</a> </a>
<a class="<?php echo FSC::$app['controller'] == 'my' && FSC::$app['action'] == 'index' ? 'this_set' : ''; ?>" href="<?=$linkPrefix?>/my/" title="个人中心"> <a class="<?php echo FSC::$app['controller'] == 'my' ? 'this_set' : ''; ?>" href="<?=$linkPrefix?>/my/" title="个人中心">
<img src="/img/PersonalCenter.svg" alt="用户图标" /> <img src="/img/PersonalCenter.svg" alt="用户图标" />
<span>我的</span> <span>我的</span>
</a> </a>

2
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 .top_nav{padding-left:20%;padding-right:20%}
.layout_index .mt65{margin-top:65px} .layout_index .mt65{margin-top:65px}
.mt10,.layout_index .mt10{margin-top:10px} .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 .pl20{padding-left:20px}
.layout_index .pt20{padding-top:20px} .layout_index .pt20{padding-top:20px}
.layout_index .lh18{line-height:1.8} .layout_index .lh18{line-height:1.8}

Loading…
Cancel
Save