Skip to content

Commit 8841111

Browse files
committed
feat: ueditor upgraded to 2.9.0
1 parent f343c23 commit 8841111

File tree

130 files changed

+27145
-606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+27145
-606
lines changed

app/Exceptions/Handler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,9 @@ protected function convertExceptionToResponse(Exception $e)
5555
}
5656
return response()->view('errors.500', ['exception' => $e], 500);
5757
}
58+
59+
protected function shouldntReport(\Exception $e)
60+
{
61+
return $this->isExceptionIgnore($e) || parent::shouldntReport($e);
62+
}
5863
}

module/Blog/Admin/Controller/BlogController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ protected function crud(AdminCRUDBuilder $builder)
4040
$builder->text('seoKeywords', 'SEO关键词')->listable(false);
4141
$builder->textarea('seoDescription', 'SEO描述')->listable(false);
4242
$builder->datetime('postTime', '发布时间')->defaultValue(date('Y-m-d H:i:s'));
43+
$builder->switch('isTop', '置顶')->gridEditable(true);
4344
$builder->switch('isPublished', '发布')->optionsYesNo()->defaultValue(true);
4445
$builder->display('created_at', L('Created At'))->listable(false);
4546
$builder->display('updated_at', L('Updated At'))->listable(false);

module/Blog/Core/MBlog.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ public static function paginateBlog($categoryId, $page = 1, $pageSize = 10, $opt
4040
}
4141
$option['where']['isPublished'] = true;
4242
if (!isset($option['order'])) {
43-
$option['order'] = ['postTime', 'desc'];
43+
$option['order'] = [
44+
['isTop', 'desc'],
45+
['postTime', 'desc'],
46+
];
4447
}
4548
if (!isset($option['whereOperate'])) {
4649
$option['whereOperate'] = [];

module/Blog/Docs/release.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 2.4.0
2+
3+
- 新增:博客内容置顶功能,后台快捷编辑
4+
- 优化:博客标签、分类、最近内容、信息等样式优化
5+
6+
---
7+
18
## 2.3.0 博客标签页,多处优化升级
29

310
- 新增:博客标签独立页面

module/Blog/View/pc/blog/about.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<div class="tw-p-6 tw-bg-white tw-rounded">
1414
<div class="tw-text-lg">
15-
<i class="iconfont icon-user"></i>
15+
<i class="iconfont icon-user ub-text-primary"></i>
1616
关于我
1717
</div>
1818
<div class="tw-mt-4">

module/Blog/View/pc/blog/inc/blogItems.blade.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
>
1515
<div>
1616
<div class="ub-text-truncate">
17-
<a href="{{modstart_web_url('blog/'.$record['id'])}}" class="pb-keywords-highlight tw-text-xl tw-text-gray-800">
17+
@if($record['isTop'])
18+
<span class="tw tw-align-top tw-bg-red-100 tw-inline-block tw-leading-6 tw-px-3 tw-rounded tw-text-lg tw-text-red-500">置顶</span>
19+
@endif
20+
<a href="{{modstart_web_url('blog/'.$record['id'])}}"
21+
class="pb-keywords-highlight tw-align-top tw-inline-block tw-leading-6 tw-text-gray-800 tw-text-xl">
1822
{{$record['title']}}
1923
</a>
2024
</div>
@@ -55,7 +59,10 @@ class="tw-rounded-3xl tw-text-gray-400 tw-block tw-bg-gray-100 tw-leading-6 tw-m
5559
</div>
5660
@if(!empty($record['_cover']))
5761
<div class="lg:tw-w-40 tw-w-full lg:tw-ml-4 tw-flex-shrink-0">
58-
<div class="ub-cover-3-2 tw-rounded" style="background-image:url({{$record['_cover']}})"></div>
62+
<div class="tw-overflow-hidden tw-rounded">
63+
<div class="hover:tw-rotate-3 hover:tw-scale-110 tw-duration-300 tw-ease-in-out tw-rounded tw-transform ub-cover-3-2"
64+
style="background-image:url({{$record['_cover']}})"></div>
65+
</div>
5966
</div>
6067
@endif
6168
</div>

module/Blog/View/pc/blog/inc/blogLatest.blade.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<div class="tw-p-6 margin-top tw-bg-white tw-rounded">
22
<div class="tw-text-lg">
3-
<i class="iconfont icon-list-alt"></i>
3+
<i class="iconfont icon-list ub-text-primary"></i>
44
最新博客
55
</div>
66
<div class="tw-mt-4">
77
@foreach(MBlog::latestBlog(5) as $b)
88
<div class="tw-pb-2">
9-
<a href="{{modstart_web_url('blog/'.$b['id'])}}" class="tw-text-gray-800">
9+
<a href="{{modstart_web_url('blog/'.$b['id'])}}"
10+
class="tw-block tw-overflow-ellipsis tw-overflow-hidden tw-text-gray-800 tw-truncate">
1011
<i class="iconfont icon-angle-right ub-text-muted tw-mr-1"></i>
1112
{{$b['title']}}
1213
</a>

module/Blog/View/pc/blog/inc/categories.blade.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
<div class="tw-p-6 margin-top tw-bg-white tw-rounded">
22
<div class="tw-text-lg">
3-
<i class="iconfont icon-category"></i>
3+
<i class="iconfont icon-category ub-text-primary"></i>
44
分类
55
</div>
66
<div class="tw-mt-4">
77
<div class="row">
88
@foreach(\MBlog::categoryTree() as $t)
99
<div class="col-6">
1010
<a href="{{modstart_web_url('blogs',['categoryId'=>$t['id']])}}"
11-
class="tw-text-gray-600 tw-block tw-bg-gray-100 tw-rounded tw-leading-10 tw-mb-3 tw-px-2 @if(!empty($category)&&$category['id']==$t['id']) ub-bg-primary ub-text-white @endif">
11+
class="hover:tw-shadow tw-text-gray-600 tw-block tw-bg-gray-100 tw-rounded tw-leading-10 tw-mb-3 tw-px-2 tw-truncate @if(!empty($category)&&$category['id']==$t['id']) ub-bg-primary ub-text-white @endif">
1212
<i class="iconfont icon-angle-right ub-text-muted"></i>
13-
{{$t['title']}}{{$t['blogCount']?$t['blogCount']:0}}
13+
{{$t['title']}}
14+
{{$t['blogCount']?$t['blogCount']:0}}
1415
</a>
1516
</div>
1617
@endforeach

module/Blog/View/pc/blog/inc/contact.blade.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,47 @@
11
<div class="tw-p-6 margin-top tw-bg-white tw-rounded">
22
<div class="tw-text-lg">
3-
<i class="iconfont icon-user"></i>
3+
<i class="iconfont icon-phone ub-text-primary"></i>
44
联系方式
55
</div>
66
<div class="tw-mt-4">
77
@if(modstart_config('Blog_ContactQQ'))
88
<div class="ub-pair">
9-
<div class="name">QQ</div>
9+
<div class="name">
10+
<i class="iconfont icon-qq"></i> QQ
11+
</div>
1012
<div class="value">
1113
{{modstart_config('Blog_ContactQQ')}}
1214
</div>
1315
</div>
1416
@endif
1517
@if(modstart_config('Blog_ContactEmail'))
1618
<div class="ub-pair">
17-
<div class="name">邮箱</div>
19+
<div class="name">
20+
<i class="iconfont icon-email"></i>
21+
邮箱
22+
</div>
1823
<div class="value">
1924
<a class="tw-text-gray-600" href="mailto:{{modstart_config('Blog_ContactEmail')}}">{{modstart_config('Blog_ContactEmail')}}</a>
2025
</div>
2126
</div>
2227
@endif
2328
@if(modstart_config('Blog_ContactWeibo'))
2429
<div class="ub-pair">
25-
<div class="name">微博</div>
30+
<div class="name">
31+
<i class="iconfont icon-weibo"></i>
32+
微博
33+
</div>
2634
<div class="value">
2735
<a class="tw-text-gray-600" href="{{modstart_config('Blog_ContactWeibo')}}" target="_blank">{{modstart_config('Blog_ContactWeibo')}}</a>
2836
</div>
2937
</div>
3038
@endif
3139
@if(modstart_config('Blog_ContactWechat'))
3240
<div class="ub-pair">
33-
<div class="name">微信</div>
41+
<div class="name">
42+
<i class="iconfont icon-wechat"></i>
43+
微信
44+
</div>
3445
<div class="value">
3546
{{modstart_config('Blog_ContactWechat')}}
3647
</div>

module/Blog/View/pc/blog/inc/info.blade.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<div class="tw-bg-white tw-rounded tw-px-6 tw-py-12">
22
<div>
3-
<div class="ub-cover-1-1 contain tw-rounded tw-w-28 tw-m-auto tw-inline-block"
4-
style="background-image:url({{\ModStart\Core\Assets\AssetsUtil::fix(modstart_config('Blog_Avatar'))}})"></div>
3+
<div class="">
4+
<div class="contain hover:tw-scale-110 tw-duration-300 tw-ease-in-out tw-inline-block tw-m-auto tw-rounded tw-transform tw-w-28 ub-cover-1-1"
5+
style="background-image:url({{\ModStart\Core\Assets\AssetsUtil::fix(modstart_config('Blog_Avatar'))}})"></div>
6+
</div>
57
</div>
68
<div class="tw-text-center tw-text-xl tw-mt-5">
79
{{modstart_config('Blog_Name')}}

0 commit comments

Comments
 (0)