Skip to content

Commit

Permalink
优化:页面UI优化
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuchunshu committed Dec 16, 2022
1 parent 29f9815 commit ee53de3
Show file tree
Hide file tree
Showing 15 changed files with 243 additions and 240 deletions.
105 changes: 68 additions & 37 deletions app/CodeFec/Menu/default.php
@@ -1,6 +1,14 @@
<?php
// 仪表盘
menu()->add(0,[

declare(strict_types=1);
/**
* This file is part of zhuchunshu.
* @link https://github.com/zhuchunshu
* @document https://github.com/zhuchunshu/super-forum
* @contact laravel@88.com
* @license https://github.com/zhuchunshu/super-forum/blob/master/LICENSE
*/
menu()->add(0, [
'url' => '/admin',
'name' => '仪表盘',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-dashboard" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
Expand All @@ -11,7 +19,7 @@
</svg>',
]);

menu()->add(1,[
menu()->add(1, [
'url' => '/admin/plugins',
'name' => '组件',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-package" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
Expand All @@ -23,10 +31,10 @@
<line x1="16" y1="5.25" x2="8" y2="9.75"></line>
</svg>',
]);
menu()->add(6,[
'url' => '/admin/themes',
'name' => '主题',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-template" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
menu()->add(6, [
'url' => '/admin/themes',
'name' => '主题',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-template" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="4" y="4" width="16" height="4" rx="1"></rect>
<rect x="4" y="12" width="6" height="8" rx="1"></rect>
Expand All @@ -36,92 +44,115 @@
</svg>',
]);

menu()->add(101,[
'url' => '/admin/plugins',
'name' => '管理',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-package" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
menu()->add(101, [
'url' => '/admin/plugins',
'name' => '管理',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-package" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<polyline points="12 3 20 7.5 20 16.5 12 21 4 16.5 4 7.5 12 3"></polyline>
<line x1="12" y1="12" x2="20" y2="7.5"></line>
<line x1="12" y1="12" x2="12" y2="21"></line>
<line x1="12" y1="12" x2="4" y2="7.5"></line>
<line x1="16" y1="5.25" x2="8" y2="9.75"></line>
</svg>',
'parent_id' => 1,
'parent_id' => 1,
]);

menu()->add(102,[
'url' => '/admin/plugins/upload',
'name' => '上传',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-package" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
menu()->add(102, [
'url' => '/admin/plugins/upload',
'name' => '上传',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-package" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<polyline points="12 3 20 7.5 20 16.5 12 21 4 16.5 4 7.5 12 3"></polyline>
<line x1="12" y1="12" x2="20" y2="7.5"></line>
<line x1="12" y1="12" x2="12" y2="21"></line>
<line x1="12" y1="12" x2="4" y2="7.5"></line>
<line x1="16" y1="5.25" x2="8" y2="9.75"></line>
</svg>',
'parent_id' => 1,
'parent_id' => 1,
]);
menu()->add(161,[
'url' => '/admin/themes',
'name' => '管理',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-package" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
menu()->add(161, [
'url' => '/admin/themes',
'name' => '管理',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-package" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<polyline points="12 3 20 7.5 20 16.5 12 21 4 16.5 4 7.5 12 3"></polyline>
<line x1="12" y1="12" x2="20" y2="7.5"></line>
<line x1="12" y1="12" x2="12" y2="21"></line>
<line x1="12" y1="12" x2="4" y2="7.5"></line>
<line x1="16" y1="5.25" x2="8" y2="9.75"></line>
</svg>',
'parent_id' => 6,
'parent_id' => 6,
]);

menu()->add(162,[
'url' => '/admin/themes/upload',
'name' => '上传',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-package" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
menu()->add(162, [
'url' => '/admin/themes/upload',
'name' => '上传',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-package" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<polyline points="12 3 20 7.5 20 16.5 12 21 4 16.5 4 7.5 12 3"></polyline>
<line x1="12" y1="12" x2="20" y2="7.5"></line>
<line x1="12" y1="12" x2="12" y2="21"></line>
<line x1="12" y1="12" x2="4" y2="7.5"></line>
<line x1="16" y1="5.25" x2="8" y2="9.75"></line>
</svg>',
'parent_id' => 6,
'parent_id' => 6,
]);

// 网站设置
menu()->add(5,[
menu()->add(5, [
'url' => '/admin/setting',
'name' => '站务',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-3d-cube-sphere" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M6 17.6l-2 -1.1v-2.5"></path>
<path d="M4 10v-2.5l2 -1.1"></path>
<path d="M10 4.1l2 -1.1l2 1.1"></path>
<path d="M18 6.4l2 1.1v2.5"></path>
<path d="M20 14v2.5l-2 1.12"></path>
<path d="M14 19.9l-2 1.1l-2 -1.1"></path>
<line x1="12" y1="12" x2="14" y2="10.9"></line>
<line x1="18" y1="8.6" x2="20" y2="7.5"></line>
<line x1="12" y1="12" x2="12" y2="14.5"></line>
<line x1="12" y1="18.5" x2="12" y2="21"></line>
<path d="M12 12l-2 -1.12"></path>
<line x1="6" y1="8.6" x2="4" y2="7.5"></line>
</svg>',
]);



menu()->add(501, [
'url' => '/admin/setting',
'name' => '设置',
'name' => '站点设置',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-settings" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z"></path>
<circle cx="12" cy="12" r="3"></circle>
</svg>',
'parent_id' => 5,
]);

menu()->add(10,[
'url' => '#',
'name' => '文件编辑',
menu()->add(10, [
'url' => '#',
'name' => '文件编辑',
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M14 3v4a1 1 0 0 0 1 1h4"></path>
<path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path>
</svg>'
</svg>',
]);

menu()->add(1001,[
menu()->add(1001, [
'url' => '/admin/EditFile/css',
'name' => '自定义CSS代码',
'icon' => '',
'parent_id' => 10
'parent_id' => 10,
]);

menu()->add(1002,[
menu()->add(1002, [
'url' => '/admin/EditFile/js',
'name' => '自定义JS代码',
'icon' => '',
'parent_id' => 10
'parent_id' => 10,
]);
Expand Up @@ -49,7 +49,7 @@ class="card-title text-reset">{{$data->user->username}}</a>
<div class="col-auto bottomLine">
<a href="/tags/{{$data->tag->id}}.html" style="text-decoration:none">
<div class="card-circle">
<img src="{{$data->tag->icon}}" alt="">
{!! $data->tag->icon !!}
<span>{{$data->tag->name}}</span>
</div>
</a>
Expand Down
2 changes: 1 addition & 1 deletion app/Plugins/Topic/resources/views/Tags/index.blade.php
Expand Up @@ -39,7 +39,7 @@
<div class="col-md-6 col-lg-4">
<a href="/tags/{{$value->id}}.html" class="card card-link text-primary-fg" style="background-color: {{$value->color}}!important;">
<div class="card-stamp">
<div class="card-stamp-icon bg-yellow" style=color:{{$value->font_color}}">
<div class="card-stamp-icon bg-yellow">
<!-- Download SVG icon from http://tabler-icons.io/i/star -->
{!! $value->icon !!}
</div>
Expand Down
50 changes: 22 additions & 28 deletions app/Plugins/User/resources/views/data.blade.php
Expand Up @@ -15,9 +15,9 @@

<div class="col-md-12">
<div class="border-0 card">
<a href="{{get_user_settings($user->id,'backgroundImg','https://images.unsplash.com/photo-1653185053677-26b081c1a214?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1632&q=80')}}"
<a href="{{get_user_settings($user->id,'backgroundImg','/plugins/Core/image/user_background.jpg')}}"
class="card-cover card-cover-blurred"
style="background-image: url({{get_user_settings($user->id,'backgroundImg','https://images.unsplash.com/photo-1653185053677-26b081c1a214?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1632&q=80')}});min-height: 200px">
style="background-image: url({{get_user_settings($user->id,'backgroundImg','/plugins/Core/image/user_background.jpg')}});min-height: 200px">

</a>
<div class="card-body ms-1">
Expand All @@ -26,7 +26,7 @@ class="card-cover card-cover-blurred"
<div class="row">
<div class="col-auto text-center">
<span class="avatar avatar-xl avatar-thumb text-light border-2 border-wide rounded"
style="background-image: url({{super_avatar($user)}});margin-top:-70px"></span>
style="background-image: url({{super_avatar($user)}});margin-top:-220px"></span>
<div>
<span class="card-title mb-1"
style="font-size: 25px;display: inline">{{$user->username}}</span>
Expand All @@ -44,31 +44,25 @@ class="card-cover card-cover-blurred"
</div>
</div>
</div>
<div class="col-auto text-center">
<a class="btn btn-outline-primary mt-1 mb-3" user-click="user_follow"
user-id="{{ $user->id }}">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-user-plus"
width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"
fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<circle cx="9" cy="7" r="4"></circle>
<path d="M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path>
<path d="M16 11h6m-3 -3v6"></path>
</svg>
<span>关注</span>
</a>
<br>
<a class="btn btn-outline-primary" href="/users/pm/{{$user->id}}" >
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-send"
width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"
fill="none" stroke-linecap="round" stroke-linejoin="round">
<desc>Download more icon variants from https://tabler-icons.io/i/send</desc>
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<line x1="10" y1="14" x2="21" y2="3"></line>
<path d="M21 3l-6.5 18a0.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a0.55 .55 0 0 1 0 -1l18 -6.5"></path>
</svg>
<span>发私信</span>
</a>
<div class="col-auto align-self-center text-center">
<div class="dropdown">
<button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-plus" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</button>
<div class="dropdown-menu">
<a class="dropdown-item" user-click="user_follow"
user-id="{{ $user->id }}">
<span>关注</span>
</a>
<a class="dropdown-item" href="/users/pm/{{$user->id}}">
私信
</a>
</div>
</div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/Plugins/User/resources/views/draft.blade.php
Expand Up @@ -44,7 +44,7 @@
<div class="col-auto bottomLine">
<a href="/tags/{{$data->tag->id}}.html" style="text-decoration:none">
<div class="card-circle">
<img src="{{$data->tag->icon}}" alt="">
{!! $data->tag->icon !!}
<span>{{$data->tag->name}}</span>
</div>
</a>
Expand Down

0 comments on commit ee53de3

Please sign in to comment.