From d15122f0918d61484da8dd355c669ee83314092b Mon Sep 17 00:00:00 2001 From: augushong Date: Sat, 19 Mar 2022 12:33:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=A8=E6=80=81=E7=9A=84?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/controller/Common.php | 6 +++++ config/view_type.php | 1 + public/static/css/index.articles.css | 35 ++++++++++++++++++++++++++++ view/admin/post/edit.html | 20 ++++++++-------- view/admin/system/index.html | 32 +++++++++++++++++++++++++ view/index/index/index.html | 18 ++++++++++++++ 6 files changed, 102 insertions(+), 10 deletions(-) diff --git a/app/index/controller/Common.php b/app/index/controller/Common.php index f883d3b..82716d1 100644 --- a/app/index/controller/Common.php +++ b/app/index/controller/Common.php @@ -17,6 +17,12 @@ class Common extends BaseController { parent::initialize(); + $site_logo = get_source_link(get_system_config('site_logo')); + + View::assign('site_logo', $site_logo); + $site_logo_box = get_source_link(get_system_config('site_logo_box')); + + View::assign('site_logo_box', $site_logo_box); $list_nav_slide = Nav::where('type', 3)->cacheAlways('type_list_3')->order('sort asc')->where('status', 1)->select(); diff --git a/config/view_type.php b/config/view_type.php index 67996a4..b92efea 100644 --- a/config/view_type.php +++ b/config/view_type.php @@ -12,5 +12,6 @@ return [ ], 'post' => [ '' => '普通:', + 'event' => '动态', ] ]; diff --git a/public/static/css/index.articles.css b/public/static/css/index.articles.css index 23ebba2..9bc5270 100644 --- a/public/static/css/index.articles.css +++ b/public/static/css/index.articles.css @@ -336,4 +336,39 @@ a.post-item:visited { #banner .layui-carousel-ind { z-index: 999; +} + +.post-event { + padding : 10px 0; + border-bottom: 1px solid #ddd; +} + +.post-event-header { + display : flex; + align-items : center; + justify-content: flex-start; +} + +.post-event-nickname { + font-size : 14px; + font-weight: 600; + margin-left: 15px; +} + +.post-event-avatar { + width : 40px; + height : 40px; + background-size : cover; + background-position: left; + border-radius : 50%; + border : 1px solid #bbb; +} + +.post-event-body { + line-height: 1.5; + +} + +.post-event-body img { + max-width: 100%; } \ No newline at end of file diff --git a/view/admin/post/edit.html b/view/admin/post/edit.html index 0785356..4ea1369 100644 --- a/view/admin/post/edit.html +++ b/view/admin/post/edit.html @@ -65,7 +65,7 @@ - +
描述
@@ -88,7 +88,7 @@
- +
@@ -101,8 +101,8 @@
信息
- - + +
状态
@@ -137,7 +137,7 @@
- +
排序
@@ -162,7 +162,7 @@
分类和标签
- +
分类
@@ -199,8 +199,8 @@
- - + +
@@ -247,7 +247,7 @@ index: 0, lenght: 0 } - + upload.render({ elem: '.upload-poster', url: '{:url("File/save")}', @@ -266,7 +266,7 @@ } } }) - + form.val('*', { status: '{$post->getData("status")}', diff --git a/view/admin/system/index.html b/view/admin/system/index.html index 433706e..0db4b67 100644 --- a/view/admin/system/index.html +++ b/view/admin/system/index.html @@ -72,6 +72,20 @@ class="layui-input">
+
+
网站logo(方形)
+
+
+
上传logo
+
+
+ +
+ +
+
备案号
@@ -248,6 +262,24 @@ } } }) + var uploadSiteLogo = upload.render({ + elem: '.upload-site-logo-box', + url: '{:url("File/save")}', + data: { + type: 1, + dir: 'site_logo' + }, + accept: 'images', + done: function (result) { + if (result.code == 0) { + layer.msg('上传成功'); + $('input[name="site_logo_box"]').val(result.data.save_name); + $('.site-logo-box').attr('src', result.data.src); + } else { + layer.msg(result.msg) + } + } + }) var uploadSiteLogo = upload.render({ elem: '.upload-site-qrcode', url: '{:url("File/save")}', diff --git a/view/index/index/index.html b/view/index/index/index.html index cf91a95..54a3613 100644 --- a/view/index/index/index.html +++ b/view/index/index/index.html @@ -63,6 +63,23 @@
{volist name='list_post' id='post'} + {switch $post['tpl_name'] } + {case event } +
+
+
+ +
+
+ {:get_system_config('default_author')} +
+
+
+ {$post->content_html|raw} +
+
+ {/case} + {default /} {notempty name='$post->getData("poster")'} @@ -82,6 +99,7 @@
+ {/switch} {/volist} {empty name='list_post'}