mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-20 03:32:09 +10:00
- refactor(templates): update sidebar display conditionals for consistency
- Modified multiple template files to change the sidebar length conditionals from `!== 0` to `> 0` for improved readability and consistency across components. - Added Code of Conduct
This commit is contained in:
@ -562,7 +562,9 @@ export const Azurill = ({ columns, isFirstPage = false }: TemplateProps) => {
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className={cn("main group space-y-4", sidebar.length !== 0 ? "col-span-2" : "col-span-3")}>
|
||||
<div
|
||||
className={cn("main group space-y-4", sidebar.length > 0 ? "col-span-2" : "col-span-3")}
|
||||
>
|
||||
{main.map((section) => (
|
||||
<Fragment key={section}>{mapSectionToComponent(section)}</Fragment>
|
||||
))}
|
||||
|
||||
@ -566,7 +566,12 @@ export const Chikorita = ({ columns, isFirstPage = false }: TemplateProps) => {
|
||||
|
||||
return (
|
||||
<div className="grid min-h-[inherit] grid-cols-3">
|
||||
<div className={cn("main p-custom group space-y-4", sidebar.length !== 0 ? "col-span-2" : "col-span-3")}>
|
||||
<div
|
||||
className={cn(
|
||||
"main p-custom group space-y-4",
|
||||
sidebar.length > 0 ? "col-span-2" : "col-span-3",
|
||||
)}
|
||||
>
|
||||
{isFirstPage && <Header />}
|
||||
|
||||
{main.map((section) => (
|
||||
@ -574,7 +579,12 @@ export const Chikorita = ({ columns, isFirstPage = false }: TemplateProps) => {
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className={cn("sidebar p-custom group h-full space-y-4 bg-primary text-background", sidebar.length === 0 && "hidden")}>
|
||||
<div
|
||||
className={cn(
|
||||
"sidebar p-custom group h-full space-y-4 bg-primary text-background",
|
||||
sidebar.length === 0 && "hidden",
|
||||
)}
|
||||
>
|
||||
{sidebar.map((section) => (
|
||||
<Fragment key={section}>{mapSectionToComponent(section)}</Fragment>
|
||||
))}
|
||||
|
||||
@ -609,7 +609,12 @@ export const Ditto = ({ columns, isFirstPage = false }: TemplateProps) => {
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className={cn("main p-custom group space-y-4", sidebar.length !== 0 ? "col-span-2" : "col-span-3")}>
|
||||
<div
|
||||
className={cn(
|
||||
"main p-custom group space-y-4",
|
||||
sidebar.length > 0 ? "col-span-2" : "col-span-3",
|
||||
)}
|
||||
>
|
||||
{main.map((section) => (
|
||||
<Fragment key={section}>{mapSectionToComponent(section)}</Fragment>
|
||||
))}
|
||||
|
||||
@ -587,7 +587,7 @@ export const Gengar = ({ columns, isFirstPage = false }: TemplateProps) => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={cn("main group", sidebar.length !== 0 ? "col-span-2" : "col-span-3")}>
|
||||
<div className={cn("main group", sidebar.length > 0 ? "col-span-2" : "col-span-3")}>
|
||||
{isFirstPage && (
|
||||
<div
|
||||
className="p-custom space-y-4"
|
||||
|
||||
@ -589,7 +589,12 @@ export const Glalie = ({ columns, isFirstPage = false }: TemplateProps) => {
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className={cn("main p-custom group space-y-4", sidebar.length !== 0 ? "col-span-2" : "col-span-3")}>
|
||||
<div
|
||||
className={cn(
|
||||
"main p-custom group space-y-4",
|
||||
sidebar.length > 0 ? "col-span-2" : "col-span-3",
|
||||
)}
|
||||
>
|
||||
{main.map((section) => (
|
||||
<Fragment key={section}>{mapSectionToComponent(section)}</Fragment>
|
||||
))}
|
||||
|
||||
@ -609,7 +609,7 @@ export const Pikachu = ({ columns, isFirstPage = false }: TemplateProps) => {
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className={cn("main group space-y-4", sidebar.length !== 0 ? "col-span-2" : "col-span-3")}>
|
||||
<div className={cn("main group space-y-4", sidebar.length > 0 ? "col-span-2" : "col-span-3")}>
|
||||
{isFirstPage && <Header />}
|
||||
|
||||
{main.map((section) => (
|
||||
|
||||
Reference in New Issue
Block a user