@stackshift-ui/blog 7.0.0-beta.2 → 7.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blog.d.ts +1 -0
- package/dist/blog.js +1 -1
- package/dist/blog.mjs +1 -1
- package/dist/blog_a.js +1 -1
- package/dist/blog_a.mjs +1 -1
- package/dist/blog_b.js +1 -1
- package/dist/blog_b.mjs +1 -1
- package/dist/blog_c.js +1 -1
- package/dist/blog_c.mjs +1 -1
- package/dist/blog_d.js +1 -1
- package/dist/blog_d.mjs +1 -1
- package/dist/chunk-F5644BXY.mjs +1 -0
- package/dist/chunk-HYWHEEUI.mjs +1 -0
- package/dist/chunk-LMUKVTZM.mjs +1 -0
- package/dist/chunk-YTGYR6N2.mjs +1 -0
- package/dist/chunk-YZPBCGXG.mjs +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +15 -15
- package/src/blog.tsx +9 -5
- package/src/blog_a.tsx +24 -21
- package/src/blog_b.tsx +22 -32
- package/src/blog_c.tsx +1 -5
- package/src/blog_d.tsx +13 -16
- package/dist/chunk-2HGCY7QJ.mjs +0 -1
- package/dist/chunk-2R3WGAH2.mjs +0 -1
- package/dist/chunk-56BLTZWI.mjs +0 -1
- package/dist/chunk-D64XJR4X.mjs +0 -1
- package/dist/chunk-T6TH744R.mjs +0 -1
package/dist/chunk-T6TH744R.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-TMLYY2AQ.mjs";import{a as t}from"./chunk-PC6NMI3O.mjs";import{Button as v}from"@stackshift-ui/button";import{Card as N,CardContent as k}from"@stackshift-ui/card";import{Container as P}from"@stackshift-ui/container";import{Flex as g}from"@stackshift-ui/flex";import{Heading as o}from"@stackshift-ui/heading";import{Image as b}from"@stackshift-ui/image";import{Link as h}from"@stackshift-ui/link";import{Section as C}from"@stackshift-ui/section";import{buildSanityLink as L}from"@stackshift-ui/system";import{Text as r}from"@stackshift-ui/text";import{Fragment as x,jsx as l,jsxs as m}from"react/jsx-runtime";function z({subtitle:e,title:a,posts:c,primaryButton:n}){return l(C,{className:"py-20 bg-background",children:m(P,{maxWidth:1280,children:[l(F,{subtitle:e,title:a}),l(I,{posts:c,count:0,blogsPerPage:5}),l(S,{primaryButton:n})]})})}function F({subtitle:e,title:a}){return m("div",{className:"w-full mb-16 text-center",children:[e?l(r,{weight:"bold",className:"text-secondary",children:e}):null,a?l(o,{fontSize:"3xl",children:a}):null]})}function I({posts:e,count:a,blogsPerPage:c}){return m(g,{wrap:!0,justify:"center",className:"mb-16",gap:4,children:[l("div",{className:"w-full lg:w-[45%]",children:e==null?void 0:e.slice(a,a+1).map((n,i)=>l(f,{size:"lg",post:n},i))}),l(g,{wrap:!0,className:"w-full lg:w-[45%]",gap:4,children:e==null?void 0:e.slice(a+1,c).map((n,i)=>l("div",{className:"w-full lg:basis-[45%]",children:l(f,{post:n,size:"sm"},i)},i))})]})}function f({post:e,size:a,key:c}){var i;let n=s("1024");return m(N,{className:"overflow-hidden rounded-md shadow",children:[e!=null&&e.mainImage?l(j,{post:e,size:a,breakpoints:n},c):null,m(g,{direction:"col",className:"bg-white justify-between",style:{height:"295px"},children:[m(k,{className:"p-4",children:[m(g,{align:"center",children:[e!=null&&e.publishedAt?l(r,{muted:!0,className:"text-sm",children:t(new Date(e.publishedAt)," dd MMM, yyyy")}):null,(e==null?void 0:e.authors)&&m(x,{children:[l("span",{className:"mx-2 w-1 h-1 bg-gray-500 rounded-full"}),l(g,{className:"mt-auto text-sm text-gray-500",children:(i=e==null?void 0:e.authors)==null?void 0:i.map((d,w,{length:u})=>m(x,{children:[l(r,{className:"italic",fontSize:"sm",children:d==null?void 0:d.name}),w+1!==u?l("span",{children:"\xA0,\xA0"}):null]}))})]})]}),e!=null&&e.title?l(o,{type:"h4",className:"my-2 line-clamp-3 !text-2xl",children:e.title}):null,e!=null&&e.excerpt?l(r,{muted:!0,className:"mb-2 text-justify line-clamp-3",children:e.excerpt}):null]}),e!=null&&e.link?l(h,{"aria-label":"View Blog Post",className:"font-bold text-primary hover:text-secondary px-4 pb-4",href:`/${e==null?void 0:e.link}`,children:"View Blog Post"}):null]})]})}function j({post:e,size:a,breakpoints:c,key:n}){var i;return c?l(b,{className:"object-cover w-full overflow-hidden",src:`${e.mainImage}`,sizes:"100vw",style:{width:"100%",height:"auto",objectFit:"cover"},width:271,height:248,alt:(i=e==null?void 0:e.mainImage)!=null?i:`blog-variantB-image-${n}`}):l("div",{className:`${a==="lg"?"h-[44.5rem]":"h-[12.5rem]"}`,children:l(b,{className:"object-cover w-full overflow-hidden rounded-t-md",src:`${e.mainImage}`,sizes:"100vw",style:{width:"100%",height:"100%",objectFit:"cover"},width:271,height:248,alt:`blog-variantB-image-${e.title}`})})}function S({primaryButton:e}){var c,n,i;if(!(e!=null&&e.label))return null;let a=L({type:(c=e==null?void 0:e.type)!=null?c:"",internalLink:(n=e==null?void 0:e.internalLink)!=null?n:"",externalLink:(i=e==null?void 0:e.externalLink)!=null?i:""});return l("div",{className:"text-center",children:l(v,{"aria-label":e==null?void 0:e.label,asChild:!0,children:l(h,{href:a.href,target:a.target,rel:a.rel,"aria-label":e==null?void 0:e.label,children:e==null?void 0:e.label})})})}export{z as a};
|