Merge pull request #55 from zhaospei/master

fix show-more display
This commit is contained in:
Bùi Tuấn Dũng 2023-02-06 23:26:31 +07:00 committed by GitHub
commit 4380117e62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 7 deletions

View file

@ -162,6 +162,7 @@
overflow-wrap: anywhere;
padding-bottom: 1em;
clear: both;
position: relative;
}
.problem-feed-name {
@ -234,7 +235,7 @@
padding: 0px 12px;
margin-top: 5px;
position: absolute;
inset: 50% 0px 52px;
inset: 50% 0px 0px;
background: linear-gradient(transparent, white);
display: flex;
-webkit-box-pack: end;

View file

@ -42,8 +42,8 @@
{{ post.summary|default(post.content, true)|markdown(lazy_load=True)|reference|str|safe }}
{% endcache %}
</div>
</div>
<div class="show-more"> {{_("...More")}} </div>
</div>
<div class="actionbar-box">
{% set pagevote = post.pagevote %}
{% set bookmark = post.bookmark %}

View file

@ -14,5 +14,6 @@
{% endwith %}
<div class='blog-description content-description'>
{{ comment.body|markdown(lazy_load=True)|reference|str|safe }}
<div class="show-more"></div>
</div>
</div>

View file

@ -132,8 +132,8 @@
</form>
<center id="thank-{{problem.id}}" style="display: none; margin-top: 3em"></center>
{% endif %}
</div>
<div class="show-more"> {{_("...More")}} </div>
</div>
<div class="actionbar-box">
{% set pagevote = problem.pagevote %}
{% set bookmark = problem.bookmark %}

View file

@ -33,13 +33,13 @@
<script type="text/javascript">
function activateBlogBoxOnClick() {
$('.show-more').on('click', function () {
var $description = $(this).parent().children('.blog-description');
var $blogbox = $(this).parent().parent();
var $description = $blogbox.children('.blog-description');
var max_height = $description.css('max-height');
if (max_height !== 'fit-content') {
$description.css('max-height', 'fit-content');
$(this).parent().css('cursor', 'auto');
$(this).parent().removeClass('pre-expand-blog');
console.log($(this).parent());
$blogbox.css('cursor', 'auto');
$blogbox.removeClass('pre-expand-blog');
$(this).hide();
}
})

View file

@ -21,5 +21,6 @@
</div>
<div class='blog-description content-description'>
{{ ticket.messages.last().body|markdown(lazy_load=True)|reference|str|safe }}
<div class="show-more"></div>
</div>
</div>