mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
Added label for card
This commit is contained in:
1 parent
4dc66a5b3d
commit
ee0460ff59
3 files changed
+15
-2
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<a href="<%- url_for(url) %>">
|
||||
<div class="card <%- background %>">
|
||||
<div class="card <%- background %>" <% if (label) { %> data-label="<%- label %>" <% }%> >
|
||||
<i class="icon <%- icon %>"></i>
|
||||
<p><%- title %></p>
|
||||
</div>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<%- partial('_partial/index/card', {
|
||||
url: url_for(post.path),
|
||||
title: post.title,
|
||||
label: post.label,
|
||||
icon: post.icon == undefined ? 'icon-style' : post.icon,
|
||||
background: post.background == undefined ? 'bg-emerald-500' : post.background
|
||||
}) %>
|
||||
|
||||
@@ -45,11 +45,23 @@ html.scrollbar {
|
||||
}
|
||||
|
||||
.home .card {
|
||||
@apply p-4 flex items-center rounded-lg shadow-sm cursor-pointer text-slate-900/90 bg-opacity-[.65] fadeIn;
|
||||
@apply relative p-4 flex items-center rounded-lg shadow-sm cursor-pointer text-slate-900/90 bg-opacity-[.65] fadeIn;
|
||||
@apply dark:text-slate-300 dark:bg-opacity-50;
|
||||
@apply hover:text-slate-50/90 hover:bg-opacity-100 hover:shadow-xl;
|
||||
}
|
||||
|
||||
.home .card[data-label]::before {
|
||||
content: attr(data-label);
|
||||
display: block;
|
||||
position: absolute;
|
||||
font-size: 10px;
|
||||
right: 8px;
|
||||
top: 8px;
|
||||
background: rgba(255 255 255 / 0.3);
|
||||
border-radius: 4px;
|
||||
padding: 1px 3px 2px 3px;
|
||||
}
|
||||
|
||||
.home .card > i {
|
||||
@apply text-3xl;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user