fix(typography): long string for update-list is not truncated (#1050)

Resolves #1049
This commit is contained in:
Cotes Chung 2023-05-19 01:50:45 +08:00 committed by GitHub
parent eb40f51c84
commit a51d31c55a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 15 deletions

View File

@ -1,6 +1,4 @@
{% comment %} <!-- Get the last 5 posts from lastmod list. -->
Get the last 5 posts from lastmod list.
{% endcomment %}
{% assign MAX_SIZE = 5 %} {% assign MAX_SIZE = 5 %}
@ -26,12 +24,12 @@
{% if update_list.size > 0 %} {% if update_list.size > 0 %}
<div id="access-lastmod" class="post"> <div id="access-lastmod" class="post">
<div class="panel-heading">{{- site.data.locales[include.lang].panel.lastmod -}}</div> <div class="panel-heading">{{- site.data.locales[include.lang].panel.lastmod -}}</div>
<ul class="post-content ps-0 pb-1 ms-1 mt-2"> <ul class="post-content list-unstyled ps-0 pb-1 ms-1 mt-2">
{% for item in update_list %} {% for item in update_list %}
{% assign index = item | split: '::' | last | plus: 0 %} {% assign index = item | split: '::' | last | plus: 0 %}
{% assign post = site.posts[index] %} {% assign post = site.posts[index] %}
{% assign url = post.url | relative_url %} {% assign url = post.url | relative_url %}
<li> <li class="text-truncate lh-lg">
<a href="{{ url }}">{{ post.title }}</a> <a href="{{ url }}">{{ post.title }}</a>
</li> </li>
{% endfor %} {% endfor %}

View File

@ -255,16 +255,6 @@ i {
} }
#access-lastmod { #access-lastmod {
li {
height: 1.8rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
list-style: none;
}
a { a {
&:hover { &:hover {
@extend %link-hover; @extend %link-hover;