Browse Source

add icons for my page

master
filesite 7 months ago
parent
commit
a8f666d4f2
  1. 5
      themes/tajian/controller/MyController.php
  2. 4
      themes/tajian/views/layout/main.php
  3. 6
      themes/tajian/views/my/index.php
  4. 1
      www/css/tajian.css
  5. 4
      www/img/collection-fill.svg
  6. 5
      www/img/collection.svg
  7. 5
      www/img/edit.svg

5
themes/tajian/controller/MyController.php

@ -20,7 +20,6 @@ Class MyController extends SiteController {
//获取数据 //获取数据
$menus = array(); //菜单,一级目录
$htmlReadme = ''; //Readme.md 内容,底部网站详细介绍 $htmlReadme = ''; //Readme.md 内容,底部网站详细介绍
$menus_sorted = array(); //Readme_sort.txt 说明文件内容,一级目录菜单从上到下的排序 $menus_sorted = array(); //Readme_sort.txt 说明文件内容,一级目录菜单从上到下的排序
@ -55,8 +54,8 @@ Class MyController extends SiteController {
$pageTitle = $defaultTitle = '个人中心 | ' . FSC::$app['config']['site_name']; $pageTitle = $defaultTitle = '个人中心 | ' . FSC::$app['config']['site_name'];
$viewName = 'index'; $viewName = 'index';
$params = compact( $params = compact(
'dirTree', 'scanResults', 'menus', 'htmlReadme', 'dirTree', 'scanResults',
'tags', 'nickname' 'htmlReadme', 'tags', 'nickname'
); );
return $this->render($viewName, $params, $pageTitle); return $this->render($viewName, $params, $pageTitle);
} }

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

@ -67,7 +67,7 @@ if (!empty($viewData['tags'])) { //显示tags分类
$selected = $item['id'] == $selectedId || (!empty($breadcrumbs) && $item['id'] == $breadcrumbs[0]['id']) ? 'this_set' : ''; $selected = $item['id'] == $selectedId || (!empty($breadcrumbs) && $item['id'] == $breadcrumbs[0]['id']) ? 'this_set' : '';
echo <<<eof echo <<<eof
<a href="{$linkPrefix}/list/?id={$item['id']}" class="{$selected}"> <a href="{$linkPrefix}/list/?id={$item['id']}" class="{$selected}">
<img src="/img/other.svg" alt="菜单图标" /> <img src="/img/collection-fill.svg" alt="菜单图标" />
<span>{$item['name']}</span> <span>{$item['name']}</span>
</a> </a>
eof; eof;
@ -104,7 +104,7 @@ if (!empty($viewData['tags'])) { //显示tags分类
$selected = $item['id'] == $selectedId || (!empty($breadcrumbs) && $item['id'] == $breadcrumbs[0]['id']) ? 'this_set' : ''; $selected = $item['id'] == $selectedId || (!empty($breadcrumbs) && $item['id'] == $breadcrumbs[0]['id']) ? 'this_set' : '';
echo <<<eof echo <<<eof
<a href="{$linkPrefix}/list/?id={$item['id']}" class="{$selected}"> <a href="{$linkPrefix}/list/?id={$item['id']}" class="{$selected}">
<img src="/img/other.svg" alt="菜单图标" /> <img src="/img/collection-fill.svg" alt="菜单图标" />
<span>{$item['name']}</span> <span>{$item['name']}</span>
</a> </a>
eof; eof;

6
themes/tajian/views/my/index.php

@ -20,8 +20,10 @@ if (!empty(FSC::$app['config']['multipleUserUriParse']) && !empty(FSC::$app['use
</div> </div>
<hr> <hr>
<ul class="mg_menus"> <ul class="mg_menus">
<li><a href="###">管理分类</a></li> <li><a href="###"><img src="/img/collection.svg" alt="collection" width="18"> 管理分类</a></li>
<li><a href="###">管理收藏</a></li> <li><a href="###"><img src="/img/favorite.png" alt="favorite" width="20"> 管理收藏</a></li>
<li><a href="###"><img src="/img/edit.svg" alt="edit" width="18"> 添加分类</a></li>
<li><a href="###"><img src="/img/addvideos.svg" alt="add favorite" width="20"> 添加收藏</a></li>
</ul> </ul>
</div> </div>
</main> </main>

1
www/css/tajian.css

@ -257,6 +257,7 @@ a:link{text-decoration:none;}
.mg_menus li{display:inline-block;width:45%;margin:5px;border:1px solid #DDD;border-radius:5px;text-align:center;vertical-align:middle;} .mg_menus li{display:inline-block;width:45%;margin:5px;border:1px solid #DDD;border-radius:5px;text-align:center;vertical-align:middle;}
.mg_menus li a{display:block;padding:15px 10px} .mg_menus li a{display:block;padding:15px 10px}
.mg_menus li a:hover{background-color:lightblue;color:#FFF;font-weight:bold} .mg_menus li a:hover{background-color:lightblue;color:#FFF;font-weight:bold}
.mg_menus li img{vertical-align:middle}
/* layout index */ /* layout index */
body.layout_index{background-color:#e5f1f3} body.layout_index{background-color:#e5f1f3}

4
www/img/collection-fill.svg

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-collection-play-fill" viewBox="0 0 16 16">
<path d="M2.5 3.5a.5.5 0 0 1 0-1h11a.5.5 0 0 1 0 1zm2-2a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1zM0 13a1.5 1.5 0 0 0 1.5 1.5h13A1.5 1.5 0 0 0 16 13V6a1.5 1.5 0 0 0-1.5-1.5h-13A1.5 1.5 0 0 0 0 6zm6.258-6.437a.5.5 0 0 1 .507.013l4 2.5a.5.5 0 0 1 0 .848l-4 2.5A.5.5 0 0 1 6 12V7a.5.5 0 0 1 .258-.437"/>
</svg>

After

Width:  |  Height:  |  Size: 478 B

5
www/img/collection.svg

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-collection-play" viewBox="0 0 16 16">
<path d="M2 3a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 0-1h-11A.5.5 0 0 0 2 3m2-2a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 0-1h-7A.5.5 0 0 0 4 1m2.765 5.576A.5.5 0 0 0 6 7v5a.5.5 0 0 0 .765.424l4-2.5a.5.5 0 0 0 0-.848z"/>
<path d="M1.5 14.5A1.5 1.5 0 0 1 0 13V6a1.5 1.5 0 0 1 1.5-1.5h13A1.5 1.5 0 0 1 16 6v7a1.5 1.5 0 0 1-1.5 1.5zm13-1a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5h-13A.5.5 0 0 0 1 6v7a.5.5 0 0 0 .5.5z"/>
</svg>

After

Width:  |  Height:  |  Size: 574 B

5
www/img/edit.svg

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil-square" viewBox="0 0 16 16">
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
<path fill-rule="evenodd" d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
</svg>

After

Width:  |  Height:  |  Size: 615 B

Loading…
Cancel
Save