Skip to content

Commit d437b74

Browse files
committed
✨ Add Portfolio template
1 parent 3bf2f15 commit d437b74

File tree

17 files changed

+572
-6
lines changed

17 files changed

+572
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,4 +295,5 @@ import { Accordion } from 'webcoreui/react'
295295

296296
## Templates
297297

298+
- [Portfolio](https://github.com/Frontendland/webcoreui/tree/main/src/templates/Portfolio)
298299
- [ProductPage](https://github.com/Frontendland/webcoreui/tree/main/src/templates/ProductPage)

public/img/avatar0-hd.png

101 KB
Loading

public/img/templates/portfolio.png

88.5 KB
Loading

public/img/templates/product-page.png

71.3 KB
Loading

src/blocks/Layout/Layout.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const hasSidebar = hasLeftSidebar || hasRightSidebar
2222
2323
const containerClasses = [
2424
'container',
25-
hasSidebar && 'flex column sm-row'
25+
hasSidebar && 'flex column sm-row',
26+
!hasSidebar && className
2627
]
2728
---
2829

src/blocks/Layout/Layout.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
2828
const containerClasses = classNames([
2929
'container',
30-
hasSidebar && 'flex column sm-row'
30+
hasSidebar && 'flex column sm-row',
31+
!hasSidebar && className
3132
])
3233
</script>
3334

src/blocks/Layout/Layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ const Layout = ({
2626

2727
const containerClasses = classNames([
2828
'container',
29-
hasSidebar && 'flex column sm-row'
29+
hasSidebar && 'flex column sm-row',
30+
!hasSidebar && className
3031
])
3132

3233
return (

src/data.ts

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,3 +524,152 @@ export const getProductPageTemplateData = (theme = 'success') => ({
524524
text: feature
525525
}))
526526
})
527+
528+
export const getPortfolioTemplateData = (theme = 'success') => ({
529+
layout: {
530+
seo: {
531+
title: 'Portfolio Template - Webcore',
532+
url: 'https://webcoreui.dev/',
533+
description: 'A customizable and easy to use template for portfolios.',
534+
faviconUrl: '/logo.svg'
535+
},
536+
menu: {
537+
logo: {
538+
html: logo
539+
},
540+
items: [
541+
{ name: '<- Back to templates', href: '/templates' }
542+
]
543+
},
544+
footer: {
545+
logo: {
546+
html: logo
547+
},
548+
columns: [
549+
{
550+
title: 'Contacts',
551+
items: [
552+
{ href: 'mailto:josh@example.com', name: 'john@example.com' },
553+
{ href: 'tel:+1 234 5678', name: '+1 234 5678' }
554+
]
555+
}
556+
]
557+
}
558+
},
559+
hero: {
560+
heading: 'Hey, I\'m Josh 👋',
561+
subHeading: 'Senior React Developer based in Oregon',
562+
buttons: [
563+
{ text: 'Call Me', theme: theme as ButtonProps['theme'] },
564+
{ text: 'Send an Email', theme: 'outline' as ButtonProps['theme'] }
565+
],
566+
badge: {
567+
rounded: true,
568+
theme: 'outline' as ButtonProps['theme'],
569+
text: '⭐ Top rated developer'
570+
},
571+
image: {
572+
src: '/img/placeholder-hd1.png',
573+
alt: 'Banner',
574+
width: 500,
575+
height: 300
576+
}
577+
},
578+
aboutMe: {
579+
title: 'More About Me',
580+
text: 'Description about the person, including previous work experiences, studies, and relevant projects. Anything that can establish credibility, experience, and expertise should be listed here to instill trustworthiness in the visitor. This field can also handle <code>HTML</code> tags for further formatting.',
581+
img: {
582+
src: '/img/avatar0-hd.png',
583+
alt: 'About me',
584+
width: 250,
585+
height: 250
586+
},
587+
services: [
588+
'List of services provided by the person',
589+
'Broken into two columns on larger screens',
590+
'Define a list of ratings',
591+
'Create CTAs between blocks',
592+
'Add your previous work',
593+
'Provide a list of services'
594+
].map(feature => ({
595+
icon: successIcon,
596+
color: `var(--w-color-${theme})`,
597+
text: feature
598+
}))
599+
},
600+
ratings: [
601+
{
602+
score: 5,
603+
showText: true,
604+
text: 'Rated for result',
605+
feedback: '"He did an excellent job. The end result is what we wanted."'
606+
},
607+
{
608+
score: 5,
609+
showText: true,
610+
text: 'Rated for design',
611+
feedback: '"A thorough, reliable, precise professional who is demanding in his work! I can only recommend him!"'
612+
},
613+
{
614+
score: 5,
615+
showText: true,
616+
text: 'Rated for communication',
617+
feedback: '"Thank you for your work! It turned out very nice!"'
618+
}
619+
],
620+
ratingCta: { text: 'More reviews', theme: 'secondary' as ButtonProps['theme'] },
621+
myWork: {
622+
title: 'My Most Recent Work',
623+
items: Array
624+
.from({ length: 3 }, (_, i) => i + 3)
625+
.map(i => ({
626+
href: '#',
627+
img: {
628+
src: `/img/placeholder${i}.png`,
629+
alt: 'img',
630+
width: 500,
631+
height: 250
632+
},
633+
title: `My Work #${i - 2}`,
634+
text: 'You can also pass <b>HTML</b> tags to your cards.'
635+
}))
636+
},
637+
servicesCta: { text: 'Call Me', theme: theme as ButtonProps['theme'] },
638+
services: {
639+
secondary: true,
640+
items: [
641+
{
642+
icon: componentsIcon,
643+
title: 'List of services',
644+
text: 'Use the <code>GridWithIcons</code> block to organize your list into a grid with icons to enhance clarity and visual appeal.'
645+
}, {
646+
icon: alertIcon,
647+
title: 'Configurable',
648+
text: 'You can create as many items as necessary with icons and an optional title. You can also configure the number of columns.'
649+
}, {
650+
icon: successIcon,
651+
title: 'Supports formatting',
652+
text: 'The <code>text</code> prop also supports formatting through <b>HTML</b> tags to help you customize the appearance of the element.'
653+
}
654+
]
655+
}
656+
})
657+
658+
// items: {
659+
// icon?: IconProps['type'] | string
660+
// title?: string
661+
// text: string
662+
// }[]
663+
// columns?: 1 | 2 | 3 | 4
664+
// alignment?: 'center' | 'right'
665+
// iconWithBackground?: boolean
666+
// secondary?: boolean
667+
// className?: string
668+
669+
// servicesTitle?: string
670+
// services?: GridWithIconsProps
671+
// servicesCta?: {
672+
// text: string
673+
// icon?: IconProps['type'] | string
674+
// } & ButtonProps
675+
// [key: string]: any

src/pages/templates/index.astro

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import Layout from '@static/Layout.astro'
44
import BlogCard from '@blocks/BlogCard/BlogCard.astro'
55
66
const templates = [
7-
{ name: 'Product Page', url: 'product-page' }
7+
{ name: 'Product Page', url: 'product-page' },
8+
{ name: 'Portfolio', url: 'portfolio' }
89
]
910
---
1011

@@ -14,12 +15,12 @@ const templates = [
1415
<div class="grid md-2 lg-3">
1516
{templates.map(template => (
1617
<Fragment>
17-
{['Astro', 'Svelte', 'React'].map((framework, index) => (
18+
{['Astro', 'Svelte', 'React'].map(framework => (
1819
<BlogCard
1920
href={`templates/${template.url}/${framework.toLowerCase()}`}
2021
title={`${framework} ${template.name}`}
2122
img={{
22-
src: `/img/placeholder${index + 1}.png`,
23+
src: `/img/templates/${template.url}.png`,
2324
alt: framework,
2425
width: 200,
2526
height: 200
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
import { getPortfolioTemplateData } from '@data'
3+
4+
import Portfolio from '@templates/Portfolio/Portfolio.astro'
5+
---
6+
7+
<Portfolio {...getPortfolioTemplateData()}>
8+
<div slot="menu">
9+
<a href="tel:+1 234 5678">+1 234 5678</a>
10+
<span>•</span>
11+
<a href="mailto:josh@example.com">josh@example.com</a>
12+
</div>
13+
</Portfolio>

0 commit comments

Comments
 (0)