PluginProbe ʕ •ᴥ•ʔ
Author Website Templates – Create Writer, Author & Publisher Websites Easily / 1.1.5
Author Website Templates – Create Writer, Author & Publisher Websites Easily v1.1.5
trunk 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9
author-website-templates / build / blocks / author-pro / hero / index.js
author-website-templates / build / blocks / author-pro / hero Last commit date
block.json 5 months ago index.asset.php 5 months ago index.js 5 months ago render.php 5 months ago
index.js
3 lines
1 (()=>{"use strict";const e=window.wp.blocks,t=window.wp.i18n,a=window.wp.blockEditor,l=window.wp.components,o=window.wp.element,r={instagram:{label:"Amazon",path:"M353.7 226.7C305 228.5 184.2 242.2 184.2 344.2C184.2 453.7 322.5 458.2 367.7 387.4C374.2 397.6 403.1 424.9 413 434.2L469.8 378.2C469.8 378.2 437.5 352.9 437.5 325.4L437.5 178.3C437.5 153 413 96 325.2 96C237.2 96 190.5 151 190.5 200.3L264 207.1C280.3 157.6 318.2 157.6 318.2 157.6C358.9 157.5 353.7 187.4 353.7 226.7zM353.7 313.5C353.7 393.5 269.5 381.5 269.5 330.7C269.5 283.5 320 274 353.7 272.9L353.7 313.5zM489.7 477C482 487 419.7 544 315.2 544C210.7 544 130.7 472.5 106.2 443C99.4 435.3 107.2 431.7 111.7 434.7C185 479.2 299.5 552.5 484.2 465C491.7 461.3 497.5 467 489.7 477zM529.5 479.2C523 495 513.5 506 508.3 510.2C502.8 514.7 498.8 512.9 501.8 506.4C504.8 499.9 521.1 459.9 514.5 451.4C508 443.1 477.5 447.1 466.5 448.2C455.7 449.2 453.5 450.2 452.5 447.9C450.2 442.2 474.2 432.4 490 430.4C505.7 428.6 531 429.6 536 436.1C539.7 441.2 536 463.2 529.5 479.2z"},facebook:{label:"Apple",path:"M447.1 332.7C446.9 296 463.5 268.3 497.1 247.9C478.3 221 449.9 206.2 412.4 203.3C376.9 200.5 338.1 224 323.9 224C308.9 224 274.5 204.3 247.5 204.3C191.7 205.2 132.4 248.8 132.4 337.5C132.4 363.7 137.2 390.8 146.8 418.7C159.6 455.4 205.8 545.4 254 543.9C279.2 543.3 297 526 329.8 526C361.6 526 378.1 543.9 406.2 543.9C454.8 543.2 496.6 461.4 508.8 424.6C443.6 393.9 447.1 334.6 447.1 332.7zM390.5 168.5C417.8 136.1 415.3 106.6 414.5 96C390.4 97.4 362.5 112.4 346.6 130.9C329.1 150.7 318.8 175.2 321 202.8C347.1 204.8 370.9 191.4 390.5 168.5z"},twitter:{label:"Open Book",path:"M320 205.3L320 514.6L320.5 514.4C375.1 491.7 433.7 480 492.8 480L512 480L512 160L492.8 160C450.6 160 408.7 168.4 369.7 184.6C352.9 191.6 336.3 198.5 320 205.3zM294.9 125.5L320 136L345.1 125.5C391.9 106 442.1 96 492.8 96L528 96C554.5 96 576 117.5 576 144L576 496C576 522.5 554.5 544 528 544L492.8 544C442.1 544 391.9 554 345.1 573.5L332.3 578.8C324.4 582.1 315.6 582.1 307.7 578.8L294.9 573.5C248.1 554 197.9 544 147.2 544L112 544C85.5 544 64 522.5 64 496L64 144C64 117.5 85.5 96 112 96L147.2 96C197.9 96 248.1 106 294.9 125.5z"},pinterest:{label:"Cart Plus",path:"M0 72C0 58.7 10.7 48 24 48L69.3 48C96.4 48 119.6 67.4 124.4 94L124.8 96L537.5 96C557.5 96 572.6 114.2 568.9 133.9L537.8 299.8C532.1 330.1 505.7 352 474.9 352L171.3 352L176.4 380.3C178.5 391.7 188.4 400 200 400L456 400C469.3 400 480 410.7 480 424C480 437.3 469.3 448 456 448L200.1 448C165.3 448 135.5 423.1 129.3 388.9L77.2 102.6C76.5 98.8 73.2 96 69.3 96L24 96C10.7 96 0 85.3 0 72zM160 528C160 501.5 181.5 480 208 480C234.5 480 256 501.5 256 528C256 554.5 234.5 576 208 576C181.5 576 160 554.5 160 528zM384 528C384 501.5 405.5 480 432 480C458.5 480 480 501.5 480 528C480 554.5 458.5 576 432 576C405.5 576 384 554.5 384 528zM336 142.4C322.7 142.4 312 153.1 312 166.4L312 200L278.4 200C265.1 200 254.4 210.7 254.4 224C254.4 237.3 265.1 248 278.4 248L312 248L312 281.6C312 294.9 322.7 305.6 336 305.6C349.3 305.6 360 294.9 360 281.6L360 248L393.6 248C406.9 248 417.6 237.3 417.6 224C417.6 210.7 406.9 200 393.6 200L360 200L360 166.4C360 153.1 349.3 142.4 336 142.4z"}},s=Object.keys(r).map(e=>({label:r[e].label,value:e})),n=window.ReactJSXRuntime,i=({isLocked:e,children:a})=>e?(0,n.jsxs)("div",{style:{position:"relative",opacity:.6},children:[(0,n.jsx)("div",{style:{pointerEvents:"none"},children:a}),(0,n.jsx)("a",{href:"https://rswpthemes.com/author-portfolio-pro-wordpress-theme/",target:"_blank",rel:"noopener noreferrer",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:20,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",background:"rgba(255, 255, 255, 0.4)"},children:(0,n.jsxs)("div",{style:{background:"#fff",padding:"8px 16px",borderRadius:"4px",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",fontWeight:"500",fontSize:"13px",color:"#333",display:"flex",alignItems:"center",gap:"6px"},children:[(0,n.jsx)("span",{role:"img","aria-label":"lock",children:"🔒"})," ",(0,t.__)("Upgrade to Pro","author-website-templates")]})})]}):a,d=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"awt/author-pro-hero","version":"1.0.0","title":"Hero [Author Pro]","category":"awt-blocks","description":"Author Pro hero section with badge, title, store buttons, and book image","keywords":["hero","author-pro","book","landing"],"textdomain":"author-website-templates","editorScript":"file:./index.js","render":"file:./render.php","attributes":{"align":{"type":"string","default":"full"},"anchor":{"type":"string","default":""},"blockId":{"type":"string","default":""},"badgeText":{"type":"string","default":"#1 New York Times Bestseller"},"badgeIcon":{"type":"string","default":"fas fa-star"},"title":{"type":"string","default":"Atomic <br> <em>Habits</em>"},"subtitle":{"type":"string","default":"An Easy & Proven Way to Build Good Habits & Break Bad Ones"},"description":{"type":"string","default":"No matter your goals, Atomic Habits offers a proven framework for improving--every day. James Clear reveals practical strategies that will teach you exactly how to form good habits and break bad ones."},"bookImageId":{"type":"number","default":0},"bookImageUrl":{"type":"string","default":""},"storeButtons":{"type":"array","default":[{"id":"amazon","iconKey":"amazon","iconSvg":"M353.7 226.7C305 228.5 184.2 242.2 184.2 344.2C184.2 453.7 322.5 458.2 367.7 387.4C374.2 397.6 403.1 424.9 413 434.2L469.8 378.2C469.8 378.2 437.5 352.9 437.5 325.4L437.5 178.3C437.5 153 413 96 325.2 96C237.2 96 190.5 151 190.5 200.3L264 207.1C280.3 157.6 318.2 157.6 318.2 157.6C358.9 157.5 353.7 187.4 353.7 226.7zM353.7 313.5C353.7 393.5 269.5 381.5 269.5 330.7C269.5 283.5 320 274 353.7 272.9L353.7 313.5zM489.7 477C482 487 419.7 544 315.2 544C210.7 544 130.7 472.5 106.2 443C99.4 435.3 107.2 431.7 111.7 434.7C185 479.2 299.5 552.5 484.2 465C491.7 461.3 497.5 467 489.7 477zM529.5 479.2C523 495 513.5 506 508.3 510.2C502.8 514.7 498.8 512.9 501.8 506.4C504.8 499.9 521.1 459.9 514.5 451.4C508 443.1 477.5 447.1 466.5 448.2C455.7 449.2 453.5 450.2 452.5 447.9C450.2 442.2 474.2 432.4 490 430.4C505.7 428.6 531 429.6 536 436.1C539.7 441.2 536 463.2 529.5 479.2z","iconImageUrl":"","topLabel":"Buy On","mainLabel":"Amazon","url":"#"},{"id":"apple","iconKey":"facebook","iconSvg":"M447.1 332.7C446.9 296 463.5 268.3 497.1 247.9C478.3 221 449.9 206.2 412.4 203.3C376.9 200.5 338.1 224 323.9 224C308.9 224 274.5 204.3 247.5 204.3C191.7 205.2 132.4 248.8 132.4 337.5C132.4 363.7 137.2 390.8 146.8 418.7C159.6 455.4 205.8 545.4 254 543.9C279.2 543.3 297 526 329.8 526C361.6 526 378.1 543.9 406.2 543.9C454.8 543.2 496.6 461.4 508.8 424.6C443.6 393.9 447.1 334.6 447.1 332.7zM390.5 168.5C417.8 136.1 415.3 106.6 414.5 96C390.4 97.4 362.5 112.4 346.6 130.9C329.1 150.7 318.8 175.2 321 202.8C347.1 204.8 370.9 191.4 390.5 168.5z","iconImageUrl":"","topLabel":"Get On","mainLabel":"Apple Books","url":"#"},{"id":"barnes","iconKey":"twitter","iconSvg":"M320 205.3L320 514.6L320.5 514.4C375.1 491.7 433.7 480 492.8 480L512 480L512 160L492.8 160C450.6 160 408.7 168.4 369.7 184.6C352.9 191.6 336.3 198.5 320 205.3zM294.9 125.5L320 136L345.1 125.5C391.9 106 442.1 96 492.8 96L528 96C554.5 96 576 117.5 576 144L576 496C576 522.5 554.5 544 528 544L492.8 544C442.1 544 391.9 554 345.1 573.5L332.3 578.8C324.4 582.1 315.6 582.1 307.7 578.8L294.9 573.5C248.1 554 197.9 544 147.2 544L112 544C85.5 544 64 522.5 64 496L64 144C64 117.5 85.5 96 112 96L147.2 96C197.9 96 248.1 106 294.9 125.5z","iconImageUrl":"","topLabel":"Order At","mainLabel":"Barnes&Noble","url":"#"}]},"showFloatingCard":{"type":"boolean","default":true},"floatingCardTopLabel":{"type":"string","default":"Free"},"floatingCardMainLabel":{"type":"string","default":"Read Sample"},"floatingCardIcon":{"type":"string","default":"fas fa-play"},"floatingCardUrl":{"type":"string","default":"#"},"ratingStars":{"type":"number","default":5},"ratingValue":{"type":"string","default":"4.9/5"},"ratingText":{"type":"string","default":"Rating on Goodreads (10k+ Reviews)"},"bgColor":{"type":"string","default":""},"shapeColor":{"type":"string","default":""},"accentColor":{"type":"string","default":""},"borderColor":{"type":"string","default":""},"paddingTop":{"type":"number","default":80},"paddingBottom":{"type":"number","default":80}},"supports":{"html":false,"anchor":true,"align":["full"],"alignWide":true}}');(0,e.registerBlockType)(d.name,{...d,edit:function({attributes:e,setAttributes:d,clientId:c}){const{blockId:p,anchor:h,badgeText:g,title:u,subtitle:C,description:m,bookImageId:x,bookImageUrl:b,storeButtons:w,showFloatingCard:v,floatingCardTopLabel:f,floatingCardMainLabel:j,floatingCardUrl:y,ratingStars:L,ratingValue:_,ratingText:k,bgColor:B,shapeColor:T,accentColor:N,borderColor:I,paddingTop:z,paddingBottom:S}=e,M=window.awtVars?.isPro||!1;(0,o.useEffect)(()=>{p||d({blockId:`hero-${Date.now()}`})},[p,c]);const R=(0,a.useBlockProps)({className:"awt-author-pro-hero relative overflow-hidden",id:h||p,style:{backgroundColor:B||void 0,paddingTop:z?`${z}px`:void 0,paddingBottom:S?`${S}px`:void 0}}),U=(e,t,a)=>{const l=[...w];l[e]={...l[e],[t]:a},"iconKey"===t&&r[a]&&(l[e].iconSvg=r[a].path),d({storeButtons:l})},A=e=>{d({bookImageId:e.id,bookImageUrl:e.url})};return(0,n.jsxs)("div",{...R,children:[(0,n.jsxs)(a.InspectorControls,{children:[(0,n.jsxs)(l.PanelBody,{title:(0,t.__)("Content Settings","author-website-templates"),initialOpen:!0,children:[(0,n.jsx)(l.TextControl,{label:(0,t.__)("Badge Text","author-website-templates"),value:g,onChange:e=>d({badgeText:e})}),(0,n.jsx)("hr",{style:{margin:"16px 0"}}),(0,n.jsx)(l.TextareaControl,{label:(0,t.__)("Title","author-website-templates"),value:u,onChange:e=>d({title:e}),help:(0,t.__)("Use <em>text</em> for accent color/italic style.","author-website-templates"),rows:3}),(0,n.jsx)(l.TextControl,{label:(0,t.__)("Subtitle","author-website-templates"),value:C,onChange:e=>d({subtitle:e})}),(0,n.jsx)(l.TextareaControl,{label:(0,t.__)("Description","author-website-templates"),value:m,onChange:e=>d({description:e}),rows:4}),(0,n.jsx)("hr",{style:{margin:"16px 0"}}),(0,n.jsx)("h3",{children:(0,t.__)("Book Image","author-website-templates")}),(0,n.jsx)(a.MediaUploadCheck,{children:(0,n.jsx)(a.MediaUpload,{onSelect:A,allowedTypes:["image"],value:x,render:({open:e})=>(0,n.jsx)("div",{children:b?(0,n.jsxs)("div",{children:[(0,n.jsx)("img",{src:b,alt:"",style:{maxWidth:"200px",marginBottom:"10px"}}),(0,n.jsx)("br",{}),(0,n.jsx)(l.Button,{onClick:e,variant:"secondary",children:(0,t.__)("Change Image","author-website-templates")}),(0,n.jsx)(l.Button,{onClick:()=>d({bookImageId:0,bookImageUrl:""}),variant:"link",isDestructive:!0,children:(0,t.__)("Remove","author-website-templates")})]}):(0,n.jsx)(l.Button,{onClick:e,variant:"primary",children:(0,t.__)("Select Book Image","author-website-templates")})})})}),(0,n.jsx)("hr",{style:{margin:"16px 0"}}),(0,n.jsx)("h3",{children:(0,t.__)("Rating","author-website-templates")}),(0,n.jsx)(l.RangeControl,{label:(0,t.__)("Stars","author-website-templates"),value:L,onChange:e=>d({ratingStars:e}),min:0,max:5,step:.5}),(0,n.jsx)(l.TextControl,{label:(0,t.__)("Rating Value","author-website-templates"),value:_,onChange:e=>d({ratingValue:e}),placeholder:"4.9/5"}),(0,n.jsx)(l.TextControl,{label:(0,t.__)("Rating Text","author-website-templates"),value:k,onChange:e=>d({ratingText:e}),placeholder:"Rating on Goodreads (10k+ Reviews)"})]}),(0,n.jsxs)(l.PanelBody,{title:(0,t.__)("Store Buttons","author-website-templates"),initialOpen:!1,children:[w.map((e,o)=>(0,n.jsxs)("div",{style:{marginBottom:"20px",padding:"15px",border:"1px solid #ddd",borderRadius:"4px"},children:[(0,n.jsxs)("h4",{children:[(0,t.__)("Button","author-website-templates")," #",o+1]}),(0,n.jsx)(l.SelectControl,{label:(0,t.__)("Icon","author-website-templates"),value:e.iconKey||"",options:[{label:(0,t.__)("Select an icon...","author-website-templates"),value:""},...s],onChange:e=>U(o,"iconKey",e)}),(0,n.jsx)("p",{children:(0,n.jsx)("strong",{children:(0,t.__)("OR Upload Custom Icon:","author-website-templates")})}),(0,n.jsx)(i,{isLocked:!M,children:(0,n.jsx)(a.MediaUploadCheck,{children:(0,n.jsx)(a.MediaUpload,{onSelect:e=>((e,t)=>{const a=[...w];a[e]={...a[e],iconImageUrl:t.url},d({storeButtons:a})})(o,e),allowedTypes:["image"],render:({open:a})=>(0,n.jsx)("div",{children:e.iconImageUrl?(0,n.jsxs)("div",{children:[(0,n.jsx)("img",{src:e.iconImageUrl,alt:"",style:{maxWidth:"50px",marginBottom:"5px"}}),(0,n.jsx)("br",{}),(0,n.jsx)(l.Button,{onClick:a,variant:"secondary",size:"small",children:(0,t.__)("Change","author-website-templates")}),(0,n.jsx)(l.Button,{onClick:()=>U(o,"iconImageUrl",""),variant:"link",isDestructive:!0,size:"small",children:(0,t.__)("Remove","author-website-templates")})]}):(0,n.jsx)(l.Button,{onClick:a,variant:"secondary",size:"small",children:(0,t.__)("Upload Icon","author-website-templates")})})})})}),(0,n.jsx)("hr",{style:{margin:"10px 0"}}),(0,n.jsx)(l.TextControl,{label:(0,t.__)("Top Label","author-website-templates"),value:e.topLabel,onChange:e=>U(o,"topLabel",e),placeholder:"Buy On"}),(0,n.jsx)(l.TextControl,{label:(0,t.__)("Main Label","author-website-templates"),value:e.mainLabel,onChange:e=>U(o,"mainLabel",e),placeholder:"Amazon"}),(0,n.jsx)(l.TextControl,{label:(0,t.__)("URL","author-website-templates"),value:e.url,onChange:e=>U(o,"url",e),placeholder:"#"}),(0,n.jsx)(l.Button,{onClick:()=>(e=>{const t=w.filter((t,a)=>a!==e);d({storeButtons:t})})(o),variant:"secondary",isDestructive:!0,children:(0,t.__)("Remove Button","author-website-templates")})]},e.id)),(0,n.jsx)(i,{isLocked:!M,children:(0,n.jsx)(l.Button,{onClick:M?()=>{d({storeButtons:[...w,{id:`store-${Date.now()}`,iconKey:"amazon",iconSvg:r.amazon.path,iconImageUrl:"",topLabel:"Buy On",mainLabel:"Amazon",url:"#"}]})}:void 0,variant:"primary",disabled:!M,style:{width:"100%",justifyContent:"center"},children:(0,t.__)("Add Store Button","author-website-templates")})})]}),(0,n.jsxs)(l.PanelBody,{title:(0,t.__)("Floating Card","author-website-templates"),initialOpen:!1,children:[(0,n.jsx)(l.ToggleControl,{label:(0,t.__)("Show Floating Card","author-website-templates"),checked:v,onChange:e=>d({showFloatingCard:e})}),v&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.TextControl,{label:(0,t.__)("Top Label","author-website-templates"),value:f,onChange:e=>d({floatingCardTopLabel:e}),placeholder:"Free"}),(0,n.jsx)(l.TextControl,{label:(0,t.__)("Main Label","author-website-templates"),value:j,onChange:e=>d({floatingCardMainLabel:e}),placeholder:"Read Sample"}),(0,n.jsx)(l.TextControl,{label:(0,t.__)("URL","author-website-templates"),value:y,onChange:e=>d({floatingCardUrl:e}),placeholder:"#"})]})]})]}),(0,n.jsxs)(a.InspectorControls,{group:"styles",children:[(0,n.jsxs)(l.PanelBody,{title:(0,t.__)("Spacing","author-website-templates"),initialOpen:!0,children:[(0,n.jsx)(l.RangeControl,{label:(0,t.__)("Top Padding (px)","author-website-templates"),value:z,onChange:e=>d({paddingTop:e}),min:0,max:300,initialPosition:128}),(0,n.jsx)(l.RangeControl,{label:(0,t.__)("Bottom Padding (px)","author-website-templates"),value:S,onChange:e=>d({paddingBottom:e}),min:0,max:300,initialPosition:80})]}),(0,n.jsx)(i,{isLocked:!M,children:(0,n.jsx)(a.PanelColorSettings,{title:(0,t.__)("Design Settings","author-website-templates"),initialOpen:!1,colorSettings:[{value:B,onChange:e=>d({bgColor:e}),label:(0,t.__)("Background Color","author-website-templates")},{value:T,onChange:e=>d({shapeColor:e}),label:(0,t.__)("Shape Color","author-website-templates")},{value:N,onChange:e=>d({accentColor:e}),label:(0,t.__)("Accent Color","author-website-templates")},{value:I,onChange:e=>d({borderColor:e}),label:(0,t.__)("Border Color","author-website-templates")}]})})]}),(0,n.jsxs)("section",{className:"relative w-full h-full",children:[(0,n.jsx)("div",{className:"hero-shape absolute top-0 right-0 w-1/2 h-full bg-blue-50/50 rounded-bl-[100px] -z-10",style:{backgroundColor:T||void 0}}),(0,n.jsx)("div",{className:"awt-container mx-auto px-6 lg:px-8",children:(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-16 items-center",children:[(0,n.jsxs)("div",{className:"order-2 md:order-1 space-y-8",children:[(0,n.jsxs)("div",{className:"inline-flex items-center gap-2 px-3 py-1 bg-yellow-100 text-yellow-800 rounded-full text-xs font-bold uppercase tracking-wider",children:[(0,n.jsx)("svg",{className:"w-4 h-4 fill-current",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",children:(0,n.jsx)("path",{d:"M341.5 45.1C337.4 37.1 329.1 32 320.1 32C311.1 32 302.8 37.1 298.7 45.1L225.1 189.3L65.2 214.7C56.3 216.1 48.9 222.4 46.1 231C43.3 239.6 45.6 249 51.9 255.4L166.3 369.9L141.1 529.8C139.7 538.7 143.4 547.7 150.7 553C158 558.3 167.6 559.1 175.7 555L320.1 481.6L464.4 555C472.4 559.1 482.1 558.3 489.4 553C496.7 547.7 500.4 538.8 499 529.8L473.7 369.9L588.1 255.4C594.5 249 596.7 239.6 593.9 231C591.1 222.4 583.8 216.1 574.8 214.7L415 189.3L341.5 45.1z"})}),(0,n.jsx)(a.RichText,{tagName:"span",value:g,onChange:e=>d({badgeText:e}),placeholder:(0,t.__)("Badge Text","author-website-templates"),allowedFormats:[]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(a.RichText,{tagName:"h1",className:"text-5xl lg:text-7xl font-serif font-bold text-primary leading-none mb-4",value:u,onChange:e=>d({title:e}),placeholder:(0,t.__)("Book Title","author-website-templates"),allowedFormats:["core/italic"]}),(0,n.jsx)(a.RichText,{tagName:"p",className:"text-xl text-primary font-medium mb-4",value:C,onChange:e=>d({subtitle:e}),placeholder:(0,t.__)("Subtitle...","author-website-templates")}),(0,n.jsx)(a.RichText,{tagName:"p",className:"text-secondary leading-relaxed text-lg",value:m,onChange:e=>d({description:e}),placeholder:(0,t.__)("Description...","author-website-templates")})]}),w&&w.length>0&&(0,n.jsxs)("div",{className:"pt-4 border-t border-gray-200",style:{borderColor:I||void 0},children:[(0,n.jsx)("p",{className:"text-xs font-bold text-gray-400 uppercase tracking-widest mb-4",children:(0,t.__)("Available On","author-website-templates")}),(0,n.jsx)("div",{className:"flex flex-wrap gap-4",children:w.map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center gap-3 px-6 py-3 bg-white border border-gray-200 rounded-lg shadow-sm hover:border-accent hover:shadow-md transition group cursor-pointer",style:{borderColor:I||void 0},children:[e.iconImageUrl?(0,n.jsx)("img",{src:e.iconImageUrl,alt:"",className:"w-6 h-6 object-contain"}):(0,n.jsx)("svg",{viewBox:"0 0 576 512",className:"w-6 h-6 fill-current text-primary group-hover:text-accent transition",style:N?{color:N}:{},children:(0,n.jsx)("path",{d:e.iconSvg})}),(0,n.jsxs)("div",{className:"text-left",children:[(0,n.jsx)("span",{className:"block text-[10px] font-bold text-gray-400 uppercase leading-none",children:e.topLabel}),(0,n.jsx)("span",{className:"block text-sm font-bold text-primary",children:e.mainLabel})]})]},t))})]}),L>0&&(0,n.jsxs)("div",{className:"flex items-center gap-4 text-sm font-medium text-gray-500",children:[(0,n.jsx)("div",{className:"flex text-yellow-500 text-base",children:(()=>{const e=[],t=Math.floor(L),a=L-t>=.5;for(let a=0;a<t;a++)e.push((0,n.jsx)("span",{children:"�
2 "},`star-${a}`));return a&&e.push((0,n.jsx)("span",{children:"�
3 "},"star-half")),e})()}),(0,n.jsxs)("span",{children:[_," ",k]})]})]}),(0,n.jsxs)("div",{className:"order-1 lg:order-2 flex justify-center lg:justify-end relative",children:[(0,n.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-80 h-80 bg-accent/20 rounded-full blur-3xl -z-10",style:N?{backgroundColor:N,opacity:.2}:{}}),(0,n.jsxs)("div",{className:"relative w-[320px] md:w-[400px] aspect-[2/3] transform rotate-[-3deg] hover:rotate-0 transition duration-700 ease-out cursor-pointer group",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/20 translate-y-4 translate-x-4 blur-lg rounded-lg -z-10 group-hover:translate-y-6 group-hover:translate-x-6 transition duration-700"}),(0,n.jsx)(a.MediaUploadCheck,{children:(0,n.jsx)(a.MediaUpload,{onSelect:A,allowedTypes:["image"],value:x,render:({open:e})=>(0,n.jsxs)("div",{onClick:e,className:"relative w-full h-full",children:[b?(0,n.jsx)("img",{src:b,alt:"Book Cover",className:"w-full h-full object-cover rounded-lg shadow-2xl border border-white/10"}):(0,n.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gray-100 rounded-lg border-2 border-dashed border-gray-300 text-gray-400",children:(0,t.__)("Select Book Cover","author-website-templates")}),(0,n.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30 opacity-0 group-hover:opacity-100 transition rounded-lg",children:(0,n.jsx)("span",{className:"text-white font-bold bg-black/50 px-4 py-2 rounded",children:(0,t.__)("Change Image","author-website-templates")})})]})})}),v&&(0,n.jsxs)("div",{className:"absolute bottom-6 -left-6 bg-white px-6 py-3 rounded shadow-xl flex items-center gap-2 hover:scale-105 transition",children:[(0,n.jsx)("span",{className:"w-8 h-8 rounded-full bg-accent text-white flex items-center justify-center",style:{backgroundColor:N||void 0},children:(0,n.jsx)("svg",{viewBox:"0 0 576 512",className:"w-4 h-4 fill-current text-white",children:(0,n.jsx)("path",{d:"M187.2 100.9C174.8 94.1 159.8 94.4 147.6 101.6C135.4 108.8 128 121.9 128 136L128 504C128 518.1 135.5 531.2 147.6 538.4C159.7 545.6 174.8 545.9 187.2 539.1L523.2 355.1C536 348.1 544 334.6 544 320C544 305.4 536 291.9 523.2 284.9L187.2 100.9z"})})}),(0,n.jsxs)("div",{children:[(0,n.jsx)(a.RichText,{tagName:"span",className:"block text-xs font-bold text-gray-400 uppercase",value:f,onChange:e=>d({floatingCardTopLabel:e}),placeholder:"Free"}),(0,n.jsx)(a.RichText,{tagName:"h4",className:"text-sm m-0 font-bold text-primary",value:j,onChange:e=>d({floatingCardMainLabel:e}),placeholder:"Read Sample"})]})]})]})]})]})}),(0,n.jsx)("style",{children:`\n #${p} em {\n color: ${N||"inherit"} !important;\n font-style: italic;\n }\n `})]})]})},save:()=>null})})();