Skip to content

Commit 052d667

Browse files
committed
fix: compact sidebar and template tabs overflow
1 parent 9a70e3c commit 052d667

7 files changed

Lines changed: 35 additions & 35 deletions

File tree

‎apps/web/src/components/TemplateInput.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const TemplateInput = ({ boxRef }: TemplateInputProps) => {
8888
// itself (row 2) instead of guessing a fixed offset for the row above it.
8989
// Below lg it stays a normal block so mobile keeps its original stacking.
9090
<div className="space-y-1 lg:space-y-0 lg:contents">
91-
<div className="lg:col-start-1 lg:row-start-1">
91+
<div className="lg:col-start-1 lg:row-start-1 overflow-hidden">
9292
{isLoadingTemplates ? (
9393
<div className="flex gap-2 py-1">
9494
<div className="w-24 h-7 bg-gray-100 dark:bg-gray-700 animate-pulse" />

‎apps/web/src/layout/Sidebar/DarkModeToggle/index.tsx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ const DarkModeToggle = ({ isExpanded }: DarkModeToggleProps) => {
1313
<button
1414
onClick={toggleDark}
1515
className={clsx(
16-
'h-12 flex items-center transition-all duration-300 group shrink-0 text-gray-400 hover:text-amber-500 dark:hover:text-amber-400 justify-center w-auto lg:w-full lg:border-t border-gray-100 dark:border-gray-700 lg:hover:bg-gray-50 lg:dark:hover:bg-gray-700',
17-
isExpanded && 'lg:gap-3 lg:px-4',
16+
'h-8 flex items-center transition-all duration-300 group shrink-0 text-gray-400 hover:text-amber-500 dark:hover:text-amber-400 justify-center w-auto lg:w-full lg:border-t border-gray-100 dark:border-gray-700 lg:hover:bg-gray-50 lg:dark:hover:bg-gray-700',
17+
isExpanded && 'lg:gap-2 lg:px-3',
1818
)}
1919
title={isDark ? 'Switch to Light Mode' : 'Switch to Dark Mode'}
2020
>
2121
{isDark ? (
2222
<FaSun
23-
size={18}
24-
className="lg:size-5 group-hover:scale-110 group-hover:text-amber-500 transition-all shrink-0"
23+
size={14}
24+
className="group-hover:scale-110 group-hover:text-amber-500 transition-all shrink-0"
2525
/>
2626
) : (
2727
<FaMoon
28-
size={16}
29-
className="lg:size-[18px] group-hover:scale-110 group-hover:text-blue-500 transition-all shrink-0"
28+
size={13}
29+
className="group-hover:scale-110 group-hover:text-blue-500 transition-all shrink-0"
3030
/>
3131
)}
3232
{isExpanded && (
33-
<span className="hidden lg:block text-xs font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap">
33+
<span className="hidden lg:block text-[11px] font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap">
3434
{isDark ? 'Light Mode' : 'Dark Mode'}
3535
</span>
3636
)}

‎apps/web/src/layout/Sidebar/Navigation/index.tsx‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const SidebarNavigation = ({ isExpanded }: SidebarNavigationProps) => {
7373
];
7474

7575
return (
76-
<nav className="flex-1 flex flex-row lg:flex-col p-1 lg:p-2 gap-2 lg:gap-0 lg:space-y-1.5 w-full overflow-x-auto lg:overflow-visible items-center lg:items-stretch h-full no-scrollbar">
76+
<nav className="flex-1 flex flex-row lg:flex-col p-0.5 lg:p-1 gap-1 lg:gap-0 lg:space-y-0.5 w-full overflow-x-auto lg:overflow-visible items-center lg:items-stretch h-full no-scrollbar">
7777
{menuItems.map((item) => {
7878
const Icon = item.icon;
7979
const isActive = currentPath === item.path;
@@ -88,10 +88,10 @@ const SidebarNavigation = ({ isExpanded }: SidebarNavigationProps) => {
8888
onClick={() => navigate(item.path)}
8989
className={clsx(
9090
'group flex items-center cursor-pointer transition-all duration-300 relative',
91-
'p-2 lg:p-2.5 mx-1 rounded-xl lg:rounded-2xl whitespace-nowrap',
91+
'py-1.5 px-2 mx-0.5 rounded-md whitespace-nowrap',
9292
isExpanded
93-
? 'lg:rounded-xl lg:gap-3 gap-2'
94-
: 'lg:justify-center gap-2',
93+
? 'lg:rounded-md lg:gap-2 gap-1.5'
94+
: 'lg:justify-center gap-1.5',
9595
isExpandedItem
9696
? 'bg-blue-50/80 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 shadow-sm shadow-blue-500/5'
9797
: 'text-gray-400 dark:text-gray-500 hover:bg-gray-50 dark:hover:bg-gray-800 hover:text-gray-600 dark:hover:text-gray-300',
@@ -101,18 +101,18 @@ const SidebarNavigation = ({ isExpanded }: SidebarNavigationProps) => {
101101
<div
102102
className={clsx(
103103
'shrink-0 flex items-center justify-center transition-all duration-300',
104-
isExpandedItem ? 'scale-110' : 'group-hover:scale-110',
104+
isExpandedItem ? 'scale-105' : 'group-hover:scale-105',
105105
)}
106106
>
107107
<Icon
108-
size={isExpanded ? 16 : 20}
109-
className="lg:w-5 lg:h-5 w-4 h-4"
108+
size={isExpanded ? 14 : 16}
109+
className="lg:w-4 lg:h-4 w-3.5 h-3.5"
110110
/>
111111
</div>
112112

113113
<span
114114
className={clsx(
115-
'text-[12px] lg:text-[13px] font-bold tracking-tight transition-all truncate flex-1',
115+
'text-[11px] lg:text-[12px] font-semibold tracking-tight transition-all truncate flex-1',
116116
isExpandedItem ? 'opacity-100' : 'opacity-80',
117117
!isExpanded ? 'lg:hidden block' : 'block',
118118
'hidden sm:block',
@@ -134,12 +134,12 @@ const SidebarNavigation = ({ isExpanded }: SidebarNavigationProps) => {
134134
)}
135135

136136
{isExpandedItem && (
137-
<div className="absolute bottom-0 lg:bottom-auto left-auto lg:left-0 w-5 lg:w-1 h-1 lg:h-4 bg-blue-500 rounded-full" />
137+
<div className="absolute bottom-0 lg:bottom-auto left-auto lg:left-0 w-4 lg:w-0.5 h-0.5 lg:h-3 bg-blue-500 rounded-full" />
138138
)}
139139
</div>
140140

141141
{hasChildren && isExpandedItem && (
142-
<div className="flex flex-row lg:flex-col ml-2 lg:ml-3 mt-0.5 lg:mt-0.5 gap-1">
142+
<div className="flex flex-row lg:flex-col ml-2 lg:ml-2.5 mt-0.5 lg:mt-0.5 gap-0.5">
143143
{item.children!.map((child) => {
144144
const isChildRouteActive = currentPath === child.path;
145145
return (
@@ -148,10 +148,10 @@ const SidebarNavigation = ({ isExpanded }: SidebarNavigationProps) => {
148148
onClick={() => navigate(child.path)}
149149
className={clsx(
150150
'group flex items-center cursor-pointer transition-all duration-200 relative',
151-
'px-2 lg:px-3 py-1.5 lg:py-1.5 mx-1 rounded-lg lg:rounded-lg whitespace-nowrap',
151+
'px-2 py-1 mx-0.5 rounded whitespace-nowrap',
152152
isExpanded
153-
? 'lg:gap-2 gap-1.5'
154-
: 'lg:justify-center gap-1.5',
153+
? 'lg:gap-1.5 gap-1'
154+
: 'lg:justify-center gap-1',
155155
isChildRouteActive
156156
? 'bg-blue-50/60 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400'
157157
: 'text-gray-400 dark:text-gray-500 hover:bg-gray-50 dark:hover:bg-gray-800 hover:text-gray-600 dark:hover:text-gray-300',
@@ -168,7 +168,7 @@ const SidebarNavigation = ({ isExpanded }: SidebarNavigationProps) => {
168168
/>
169169
<span
170170
className={clsx(
171-
'text-[11px] lg:text-[12px] font-semibold tracking-tight transition-all truncate',
171+
'text-[10px] lg:text-[11px] font-semibold tracking-tight transition-all truncate',
172172
!isExpanded ? 'lg:hidden block' : 'block',
173173
'hidden sm:block',
174174
)}

‎apps/web/src/layout/Sidebar/ProfileSection.tsx‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ const ProfileSection = ({ isExpanded }: ProfileSectionProps) => {
4646
{isAuthenticated && user ? (
4747
<div
4848
className={clsx(
49-
'flex items-center gap-2.5 h-12 lg:h-12 px-3 transition-all shrink-0',
49+
'flex items-center gap-2 h-8 lg:h-8 px-2 transition-all shrink-0',
5050
isExpanded
5151
? 'lg:hover:bg-gray-50 lg:dark:hover:bg-gray-800/50 w-full lg:w-full'
5252
: 'justify-center lg:justify-center w-auto lg:w-full',
5353
)}
5454
>
5555
<button
5656
onClick={handleAuthAction}
57-
className="w-5 h-5 lg:w-7 lg:h-7 rounded-full lg:rounded-lg bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center text-white font-bold text-[9px] lg:text-[11px] shrink-0 shadow-sm cursor-pointer"
57+
className="w-4 h-4 lg:w-6 lg:h-6 rounded-full lg:rounded-md bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center text-white font-bold text-[8px] lg:text-[10px] shrink-0 shadow-sm cursor-pointer"
5858
>
5959
{user.avatarUrl ? (
6060
<img
@@ -70,10 +70,10 @@ const ProfileSection = ({ isExpanded }: ProfileSectionProps) => {
7070
{isExpanded && (
7171
<span className="hidden lg:contents">
7272
<div className="flex-1 min-w-0">
73-
<p className="text-[12px] font-semibold text-gray-700 dark:text-gray-200 truncate leading-tight">
73+
<p className="text-[11px] font-semibold text-gray-700 dark:text-gray-200 truncate leading-tight">
7474
{user.name}
7575
</p>
76-
<p className="text-[9px] text-gray-400 truncate leading-tight">
76+
<p className="text-[8px] text-gray-400 truncate leading-tight">
7777
{user.email}
7878
</p>
7979
</div>
@@ -91,17 +91,17 @@ const ProfileSection = ({ isExpanded }: ProfileSectionProps) => {
9191
<button
9292
onClick={handleAuthAction}
9393
className={clsx(
94-
'h-12 flex items-center transition-all duration-300 group shrink-0 text-gray-400 hover:text-blue-500 dark:hover:text-blue-400 justify-center w-auto lg:w-full lg:border-t border-gray-100 dark:border-gray-700 lg:hover:bg-gray-50 lg:dark:hover:bg-gray-700',
95-
isExpanded && 'lg:gap-3 lg:px-4',
94+
'h-8 flex items-center transition-all duration-300 group shrink-0 text-gray-400 hover:text-blue-500 dark:hover:text-blue-400 justify-center w-auto lg:w-full lg:border-t border-gray-100 dark:border-gray-700 lg:hover:bg-gray-50 lg:dark:hover:bg-gray-700',
95+
isExpanded && 'lg:gap-2 lg:px-3',
9696
)}
9797
title="Sign In"
9898
>
9999
<FaSignInAlt
100-
size={18}
100+
size={14}
101101
className="group-hover:scale-110 transition-all shrink-0"
102102
/>
103103
{isExpanded && (
104-
<span className="hidden lg:block text-xs font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap">
104+
<span className="hidden lg:block text-[11px] font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap">
105105
Sign In
106106
</span>
107107
)}

‎apps/web/src/layout/Sidebar/Toggle/index.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ const SidebarToggle = ({ isExpanded, onToggle }: SidebarToggleProps) => {
99
return (
1010
<button
1111
onClick={onToggle}
12-
className="h-12 w-full text-gray-400 dark:text-gray-500 hover:text-blue-600 dark:hover:text-blue-400 border-t border-gray-100 dark:border-gray-700 hidden lg:flex items-center justify-center hover:bg-blue-50 dark:hover:bg-blue-900/20 transition-all duration-300 group shrink-0"
12+
className="h-8 w-full text-gray-400 dark:text-gray-500 hover:text-blue-600 dark:hover:text-blue-400 border-t border-gray-100 dark:border-gray-700 hidden lg:flex items-center justify-center hover:bg-blue-50 dark:hover:bg-blue-900/20 transition-all duration-300 group shrink-0"
1313
title={isExpanded ? 'Collapse Sidebar' : 'Expand Sidebar'}
1414
>
1515
{isExpanded ? (
1616
<HiChevronLeft
17-
size={24}
17+
size={16}
1818
className="group-hover:-translate-x-0.5 transition-transform"
1919
/>
2020
) : (
2121
<HiChevronRight
22-
size={24}
22+
size={16}
2323
className="group-hover:translate-x-0.5 transition-transform"
2424
/>
2525
)}

‎apps/web/src/layout/Sidebar/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const Sidebar = ({ isExpanded, onToggle }: SidebarProps) => {
2020
>
2121
<SidebarHeader isExpanded={isExpanded} />
2222
<SidebarNavigation isExpanded={isExpanded} />
23-
<div className="flex lg:flex-col ml-auto lg:ml-0 lg:mt-auto items-center lg:items-stretch lg:w-full gap-4 lg:gap-0 pr-3 lg:pr-0">
23+
<div className="flex lg:flex-col ml-auto lg:ml-0 lg:mt-auto items-center lg:items-stretch lg:w-full gap-1 lg:gap-0 pr-3 lg:pr-0">
2424
<ProfileSection isExpanded={isExpanded} />
2525
<DarkModeToggle isExpanded={isExpanded} />
2626
<SidebarToggle isExpanded={isExpanded} onToggle={onToggle} />

‎apps/web/src/utils/promptUtils.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const buildChangesRule = (writingStyle: WritingStyle): string => {
108108
If a resume is provided, do not invent new skills and experiences. Use existing skills and experiences to match with the job description.
109109
Keep ALL other sentences exactly as written. Do NOT rewrite, rephrase, restructure, or add new paragraphs. Preserve the original text word-for-word except for the changes listed above.`;
110110
case 'balanced':
111-
return `Do not fabricate or invent anything new. Use the cover letter (if any), resume (if any), or combination of both. Avoid using dash (-) to join sentences. Avoid complex sentences. Do not put comma (,) before "and" — for example write "Bread, Butter and Butterfly" not "Bread, Butter, and Butterfly". Use human voice and writing style.`;
111+
return `Do not fabricate or invent anything new. Use the cover letter (if any), resume (if any), or combination of both. Avoid using dash (-) or double dashes (--) to join sentences or words. Avoid complex sentences. Do not put comma (,) before "and" — for example it should be "Bread, Butter and Butterfly". It should not be "Bread, Butter, and Butterfly". Use human voice and writing style.`;
112112
case 'full':
113113
return `Rewrite the cover letter as you like. You may invent new skills, technologies and experiences outside the user's resume or cover letter template. But always make sure those match well with the job description.`;
114114
}

0 commit comments

Comments
 (0)