|
| 1 | +--- |
| 2 | +import { SITE, PORT } from '~/config.mjs'; |
| 3 | +
|
| 4 | +import Layout from '~/layouts/BlogLayout.astro'; |
| 5 | +import PortfolioList from '~/components/portfolio/PortfolioList.astro'; |
| 6 | +import Pagination from '~/components/atoms/Pagination.astro'; |
| 7 | +import Picture from '~/components/core/Picture.astro'; |
| 8 | +
|
| 9 | +import { fetchPortfolios } from '~/utils/portfolios'; |
| 10 | +import { getCanonical, getPermalink, PORT_BASE } from '~/utils/permalinks'; |
| 11 | +
|
| 12 | +export async function getStaticPaths({ paginate }) { |
| 13 | + if (PORT?.disabled || PORT?.porfolio?.disabled) return []; |
| 14 | +
|
| 15 | + const portfolios = await fetchPortfolios(); |
| 16 | +
|
| 17 | + return paginate(portfolios, { |
| 18 | + params: { portfolio: PORT_BASE || undefined }, |
| 19 | + pageSize: PORT.postsPerPage, |
| 20 | + }); |
| 21 | +} |
| 22 | +
|
| 23 | +const { page } = Astro.props; |
| 24 | +const currentPage = page.currentPage ?? 1; |
| 25 | +
|
| 26 | +const meta = { |
| 27 | + title: `Portfolio ${currentPage > 1 ? `— Page ${currentPage} ` : ''}— ${SITE.name}`, |
| 28 | + description: SITE.description, |
| 29 | + canonical: getCanonical(getPermalink(page.url.current)), |
| 30 | + ogType: "portfolio", |
| 31 | + noindex: currentPage > 1 |
| 32 | +}; |
| 33 | +--- |
| 34 | + |
| 35 | +<Layout {meta}> |
| 36 | + <Fragment slot="title"> |
| 37 | + <span class="bg-clip-text text-transparent bg-gradient-to-r from-secondary-600 to-primary-600">Portfolio</span> |
| 38 | + <h1 class="text-5xl md:text-[3.50rem] font-bold leading-tighter tracking-tighter mb-4 font-heading"> |
| 39 | + Coming Soon! |
| 40 | + </h1> |
| 41 | + <div class="max-w-3xl mx-auto"> |
| 42 | + <p class="text-xl text-gray-600 mb-8 dark:text-slate-400"> |
| 43 | + I'm currently working on some projects, once they are ready I will post them here |
| 44 | + </p> |
| 45 | + <p class="text-xl text-gray-600 mb-8 dark:text-slate-400"> |
| 46 | + Happy Coding! |
| 47 | + </p> |
| 48 | + </div> |
| 49 | + <div> |
| 50 | + <div class="relative mb-8 m-auto max-w-3xl"> |
| 51 | + <Picture |
| 52 | + src={import('~/assets/images/apple-dev.webp')} |
| 53 | + class="mx-auto rounded-md shadow-lg bg-gray-400 dark:bg-slate-700 w-full" |
| 54 | + widths={[400, 767]} |
| 55 | + sizes=" (max-width: 767px) 400px, 768px" |
| 56 | + alt="Jesus Sanz Avatar" |
| 57 | + aspectRatio="16:9" |
| 58 | + /> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + </Fragment> |
| 62 | + <!-- <PortfolioList portfolios={page.data} /> --> |
| 63 | + <Pagination prevUrl={page.url.prev} nextUrl={page.url.next} /> |
| 64 | +</Layout> |
0 commit comments