Skip to content

Commit

Permalink
refactor: Update import statements and CSS classes
Browse files Browse the repository at this point in the history
• Change @import to @require in comment.styl for better performance
• Replace redefine-box-shadow-flat with shadow-redefine-flat for consistency
• Update date formatting in essays widget for improved localization
  • Loading branch information
EvanNotFound committed Nov 15, 2024
1 parent 48aa3c0 commit 3f4f079
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion layout/_widgets/essays.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="w-10 h-10 mr-4 rounded-lg overflow-hidden border border-border-color p-[1px] flex-shrink-0">
<%- image_tag(theme.defaults.avatar, {class: "w-full h-full rounded-[6.2px]"}) %>
</div>
<div class="w-full border-border-color rounded-xl rounded-tl-none redefine-box-shadow-flat overflow-hidden">
<div class="w-full border-border-color rounded-xl rounded-tl-none shadow-redefine-flat overflow-hidden">
<!-- Pass the raw date here in a data attribute -->
<div class="essay-date px-4 py-1.5 text-sm border-b border-border-color bg-zinc-50 dark:bg-zinc-800 text-third-text-color"
data-date="<%= moment(e.date).tz(timezone).utc().format() %>">Loading Date...</div>
Expand Down
2 changes: 1 addition & 1 deletion layout/_widgets/friends-link.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<% for (const f of category.list) { %>
<li class="group transform scale-100 transition-transform duration-100 ease-linear active:scale-95">
<a href="<%= f.link %>">
<div class="flex flex-row items-center gap-1 sm:gap-2 overflow-hidden min-w-0 rounded-lg redefine-box-shadow-flat">
<div class="flex flex-row items-center gap-1 sm:gap-2 overflow-hidden min-w-0 rounded-lg shadow-redefine-flat">
<div class="h-16 w-16 rounded-bl-lg bg-third-background-color">
<% if (f.avatar) { %>
<img class="rounded-l-lg h-16 w-16 max-w-none"
Expand Down
6 changes: 3 additions & 3 deletions source/css/layout/_partials/comments/comment.styl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
if (hexo-config('comment.enable') == true && hexo-config('comment.system') != "") {
if (hexo-config('comment.system') == "waline") {
@import "./waline.styl"
@require "./waline.styl"

} else if (hexo-config('comment.system') == "gitalk") {
@import "./gitalk.styl"
@require "./gitalk.styl"

} else if (hexo-config('comment.system') == "twikoo") {
@import "./twikoo.styl"
@require "./twikoo.styl"
}
}

0 comments on commit 3f4f079

Please sign in to comment.