Skip to content

Commit

Permalink
ui: optimize post title display
Browse files Browse the repository at this point in the history
  • Loading branch information
XPoet committed Sep 7, 2023
1 parent d78f98a commit 212d638
Show file tree
Hide file tree
Showing 2 changed files with 225 additions and 198 deletions.
34 changes: 18 additions & 16 deletions layout/article-content.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<% if (page?.cover) { %>
<div class="article-content-top border-box">
<div class="cover-article-title text-ellipsis">
<div class="cover-article-title">
<%= page.title %>
</div>
<img class="post-cover" src="<%= page.cover %>" alt="<%= page.title %>">
Expand All @@ -15,7 +15,7 @@
<div class="article-content-bottom border-box<%= page?.cover ? ' has-cover' : '' %>">
<% if (!page?.cover) { %>
<div class="article-title">
<span class="title-hover-animation"><%= page.title %></span>
<%= page.title %>
</div>
<% } %>
Expand Down Expand Up @@ -84,14 +84,15 @@
<a class="prev"
rel="prev"
href="<%= url_for(page.prev.path) %>"
title="<%= page.prev.title %>"
>
<span class="left arrow-icon flex-center">
<i class="fas fa-chevron-left"></i>
</span>
<span class="title flex-center">
<span class="post-nav-title-item text-ellipsis"><%= page.prev.title %></span>
<span class="post-nav-item"><%= __('prev_posts') %></span>
</span>
<span class="left arrow-icon flex-center">
<i class="fas fa-chevron-left"></i>
</span>
<span class="title flex-center">
<span class="post-nav-title-item text-ellipsis"><%= page.prev.title %></span>
<span class="post-nav-item"><%= __('prev_posts') %></span>
</span>
</a>
</div>
<% } %>
Expand All @@ -100,14 +101,15 @@
<a class="next"
rel="next"
href="<%= url_for(page.next.path) %>"
title="<%= page.next.title %>"
>
<span class="title flex-center">
<span class="post-nav-title-item text-ellipsis"><%= page.next.title %></span>
<span class="post-nav-item"><%= __('next_posts') %></span>
</span>
<span class="right arrow-icon flex-center">
<i class="fas fa-chevron-right"></i>
</span>
<span class="title flex-center">
<span class="post-nav-title-item text-ellipsis"><%= page.next.title %></span>
<span class="post-nav-item"><%= __('next_posts') %></span>
</span>
<span class="right arrow-icon flex-center">
<i class="fas fa-chevron-right"></i>
</span>
</a>
</div>
<% } %>
Expand Down
Loading

0 comments on commit 212d638

Please sign in to comment.