From ec00ef7d08d6dfd3710124d3907c6f9c4abe94b1 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 9 Jan 2022 20:14:38 +0200 Subject: [PATCH] update message preview effects, fix feed loading on post --- .../css/template/default/module/post.css | 20 +++++++++++++------ src/public/js/module/post.js | 6 +++--- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/public/css/template/default/module/post.css b/src/public/css/template/default/module/post.css index ecc2545..530e59e 100644 --- a/src/public/css/template/default/module/post.css +++ b/src/public/css/template/default/module/post.css @@ -55,14 +55,19 @@ color: #ccd3df; font-size: 12px; border-top: 1px #4d5666 solid; - display: none; + opacity: 0; + height: 0 +} + +.modulePost .preview.active { + opacity: 1; + height: auto } .modulePost .preview .title { - float: left; - padding: 16px; - width: 78px; - text-align: center; + position: absolute; + left: 56px; + top: 16px; } .modulePost .preview .title i { @@ -70,7 +75,10 @@ } .modulePost .preview .text { - padding: 16px 16px 16px 90px; + padding-left: 82px; + padding-right: 16px; + padding-top: 16px; + padding-bottom: 16px; } .modulePost .button { diff --git a/src/public/js/module/post.js b/src/public/js/module/post.js index 98c1241..7448c0b 100644 --- a/src/public/js/module/post.js +++ b/src/public/js/module/post.js @@ -63,10 +63,10 @@ var ModulePost = { if (response.success) { if (response.format == '') { - $('#modulePostPreview').hide(); + $('#modulePostPreview').removeClass('active'); $('#modulePostPreview .text').html(''); } else { - $('#modulePostPreview').show(); + $('#modulePostPreview').addClass('active'); $('#modulePostPreview .text').html(response.format); } @@ -89,7 +89,7 @@ $(document).ready(function() { // Event listeners $(document).on('ModulePost.add:success', function(/*event, response*/) { - ModuleFeed.load('#moduleFeed', true); + ModuleFeed.load('#moduleFeed', 1, true); }); $('#modulePostMessage').on('keyup', function() {