Skip to content

Commit fff8b4d

Browse files
committed
feat: update folder card component and my-file view for improved styling and structure
1 parent 0440bce commit fff8b4d

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

src/client/utils/modules.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ export const modules = [
1616
className: defaultClass,
1717
activeClassName: activeClass
1818
},
19-
{
20-
name: "Shared",
21-
url: "/shared",
22-
icon: `<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>`,
23-
className: defaultClass,
24-
activeClassName: activeClass
25-
},
19+
// {
20+
// name: "Shared",
21+
// url: "/shared",
22+
// icon: `<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>`,
23+
// className: defaultClass,
24+
// activeClassName: activeClass
25+
// },
2626
{
2727
name: "Recent",
2828
url: "/recent",

src/client/views/components/folder-card.ejs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<!-- Folder Card Component -->
2-
<div class="p-4 bg-white border border-slate-100 rounded-xl hover:border-primary/20 hover:shadow-md transition-all cursor-pointer group">
2+
<div class="p-4 bg-white border border-foreground/5 rounded-xl hover:border-primary/20 transition-all cursor-pointer group">
33
<div class="flex items-start justify-between mb-2">
4-
<div class="p-2 <%= iconBg || 'bg-primary/5' %> text-<%= iconColor || 'primary' %> rounded-lg group-hover:bg-primary group-hover:text-white transition-all">
5-
<%- icon || (`<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>` ) %>
4+
<div class="p-2 <%= typeof iconBg !== 'undefined' ? iconBg : 'bg-primary/5' %> text-<%= typeof iconColor !== 'undefined' ? iconColor : 'primary' %> rounded-lg group-hover:bg-primary group-hover:text-white transition-all">
5+
<%- (typeof icon !== 'undefined' ? icon : '<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>') %>
66
</div>
7-
<button class="p-1 text-slate-300 hover:text-slate-600"><%- moreIcon || (`<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 5v.01M12 12v.01M12 19v.01"></path></svg>`) %></button>
7+
<button class="p-1 text-slate-300 hover:text-slate-600"><%- (typeof moreIcon !== 'undefined' ? moreIcon : '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 5v.01M12 12v.01M12 19v.01"></path></svg>') %></button>
88
</div>
99
<h4 class="font-bold text-slate-900 text-sm"><%= title %></h4>
1010
<p class="text-[10px] text-slate-400"><%= count %></p>

src/client/views/pages/my-file.ejs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@
7070
<div class="mb-12">
7171
<h3 class="text-xs font-bold text-slate-400 uppercase tracking-widest mb-6">Folders</h3>
7272
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
73-
<%- include('../components/folder-card', { title: '01. Assets', count: '128 files', icon: '<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>', iconBg: 'bg-primary/5', iconColor: 'primary' }) %>
74-
<%- include('../components/folder-card', { title: '02. Components', count: '45 files', icon: '<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>', iconBg: 'bg-primary/5', iconColor: 'primary' }) %>
75-
<%- include('../components/folder-card', { title: '03. Templates', count: '12 files', icon: '<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>', iconBg: 'bg-primary/5', iconColor: 'primary' }) %>
76-
<%- include('../components/folder-card', { title: 'Documentation', count: '8 files', icon: '<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>', iconBg: 'bg-primary/5', iconColor: 'primary' }) %>
73+
<%- include('../components/folder-card', { title: '01. Assets', count: '128 files', icon: '<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>', className: 'bg-primary/5' }) %>
74+
<%- include('../components/folder-card', { title: '02. Components', count: '45 files', icon: '<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>', className: 'bg-primary/5' }) %>
75+
<%- include('../components/folder-card', { title: '03. Templates', count: '12 files', icon: '<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>', className: 'bg-primary/5' }) %>
76+
<%- include('../components/folder-card', { title: 'Documentation', count: '8 files', icon: '<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>', className: 'bg-primary/5' }) %>
7777
</div>
7878
</div>
7979

0 commit comments

Comments
 (0)