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 / books / index.js
author-website-templates / build / blocks / author-pro / books Last commit date
block.json 5 months ago index.asset.php 5 months ago index.js 5 months ago render.php 5 months ago style-index-rtl.css 5 months ago style-index.css 5 months ago
index.js
1 lines
1 (()=>{"use strict";var e,t={841:(e,t,o)=>{const n=window.wp.blocks,l=window.wp.i18n,a=window.wp.blockEditor,r=window.wp.components,s=window.wp.serverSideRender;var i=o.n(s);const p=window.wp.element,u=window.ReactJSXRuntime,d=({isLocked:e,children:t})=>e?(0,u.jsxs)("div",{style:{position:"relative",opacity:.5},children:[(0,u.jsx)("div",{style:{pointerEvents:"none"},children:t}),(0,u.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)"},title:(0,l.__)("Click to Upgrade to Pro","author-website-templates"),children:(0,u.jsx)("div",{style:{background:"#fff",padding:"6px 12px",borderRadius:"4px",boxShadow:"0 2px 5px rgba(0,0,0,0.1)",fontSize:"12px",fontWeight:"bold",color:"#333"},children:"🔒 Upgrade to Pro"})})]}):t,c=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"awt/author-pro-books","version":"1.0.0","title":"Other Books [Author Pro]","category":"theme","icon":"book","description":"Display a grid of books or posts dynamically.","attributes":{"blockId":{"type":"string"},"sectionTitle":{"type":"string","default":"Explore More Stories"},"sectionBadge":{"type":"string","default":"Other Books"},"postType":{"type":"string","default":"book"},"postsToShow":{"type":"number","default":3},"order":{"type":"string","default":"desc"},"align":{"type":"string","default":"full"},"orderBy":{"type":"string","default":"date"},"selectedCategory":{"type":"string","default":""},"includePostIds":{"type":"string","default":""},"accentColor":{"type":"string","default":""},"btnColor":{"type":"string","default":""},"btnHoverColor":{"type":"string","default":""},"paddingTop":{"type":"number","default":128},"paddingBottom":{"type":"number","default":128},"buttonText":{"type":"string","default":"Buy on Amazon"},"buttonIconId":{"type":"number","default":0},"buttonIconUrl":{"type":"string","default":""},"btnTextColor":{"type":"string","default":"#ffffff"},"btnHoverTextColor":{"type":"string","default":"#ffffff"},"showViewAllBtn":{"type":"boolean","default":true},"viewAllBtnText":{"type":"string","default":"View All Books"},"viewAllBtnLink":{"type":"string","default":""},"anchor":{"type":"string","default":""}},"supports":{"html":false,"anchor":true,"align":["full"],"spacing":{"margin":true,"padding":true,"__experimentalSkipSerialization":true}},"textdomain":"author-website-templates","editorScript":"file:./index.js","render":"file:./render.php"}');(0,n.registerBlockType)(c.name,{...c,edit:function({attributes:e,setAttributes:t}){const{blockId:o,sectionTitle:n,sectionBadge:s,postType:c,postsToShow:b,order:h,orderBy:g,selectedCategory:m,includePostIds:w,accentColor:f,btnColor:x,btnHoverColor:v,paddingTop:_,paddingBottom:y,buttonText:C,buttonIconId:k,buttonIconUrl:j,btnTextColor:B,btnHoverTextColor:T,showViewAllBtn:I,viewAllBtnText:S,viewAllBtnLink:O,anchor:P}=e,A=window.awtVars?.isPro||!1;(0,p.useEffect)(()=>{o||t({blockId:`author-pro-books-${Math.floor(1e4*Math.random())}`})},[o,t]);const $=P||o,R=`\n #${$} .awt-dynamic-accent { color: ${f} !important; }\n #${$} .awt-dynamic-accent-hover:hover { color: ${f} !important; }\n\n #${$} .awt-buy-btn {\n background-color: ${x||"#1e293b"}; /* Default slate-900 */\n color: ${B||"#ffffff"} !important;\n transition: all 0.3s ease;\n }\n\n #${$} .awt-buy-btn:hover {\n background-color: ${v||f||"#000"} !important;\n color: ${T||"#ffffff"} !important;\n }\n `,D=(0,a.useBlockProps)({className:"awt-author-pro-books relative",id:P?void 0:o});return(0,u.jsxs)("div",{...D,children:[(0,u.jsx)("style",{children:R}),(0,u.jsxs)(a.InspectorControls,{children:[(0,u.jsxs)(r.PanelBody,{title:(0,l.__)("Query Settings","author-website-templates"),initialOpen:!0,children:[(0,u.jsx)(r.TextControl,{label:(0,l.__)("Post Type","author-website-templates"),value:c,onChange:e=>t({postType:e}),help:(0,l.__)("e.g. book, post","author-website-templates")}),(0,u.jsx)(r.RangeControl,{label:(0,l.__)("Number of Items","author-website-templates"),value:b,onChange:e=>t({postsToShow:e}),min:1,max:12}),(0,u.jsx)(r.SelectControl,{label:(0,l.__)("Order","author-website-templates"),value:h,options:[{label:"Descending (Newest First)",value:"desc"},{label:"Ascending (Oldest First)",value:"asc"}],onChange:e=>t({order:e})}),(0,u.jsx)(r.TextControl,{label:(0,l.__)("Filter by Category ID","author-website-templates"),value:m,onChange:e=>t({selectedCategory:e}),help:(0,l.__)("Enter a single Category ID (e.g. 5)","author-website-templates")}),(0,u.jsx)(r.TextControl,{label:(0,l.__)("Specific Post IDs","author-website-templates"),value:w,onChange:e=>t({includePostIds:e}),help:(0,l.__)("Comma separated IDs (e.g. 101, 102). Overrides other filters.","author-website-templates")})]}),(0,u.jsxs)(r.PanelBody,{title:(0,l.__)("Content Settings","author-website-templates"),initialOpen:!1,children:[(0,u.jsx)(r.TextControl,{label:(0,l.__)("Section Badge","author-website-templates"),value:s,onChange:e=>t({sectionBadge:e})}),(0,u.jsx)(r.TextControl,{label:(0,l.__)("Section Title","author-website-templates"),value:n,onChange:e=>t({sectionTitle:e})}),(0,u.jsx)("hr",{}),(0,u.jsx)(r.TextControl,{label:(0,l.__)("Cards - Buy Button Text","author-website-templates"),value:C,onChange:e=>t({buttonText:e})}),(0,u.jsx)("p",{className:"components-base-control__label",children:(0,l.__)("Cards - Button Icon","author-website-templates")}),(0,u.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[j&&(0,u.jsx)("img",{src:j,alt:"Icon",className:"w-8 h-8 object-contain"}),(0,u.jsx)(a.MediaUpload,{onSelect:e=>{t({buttonIconId:e.id,buttonIconUrl:e.url})},type:"image",value:k,render:({open:e})=>(0,u.jsx)(r.Button,{onClick:e,variant:"secondary",children:j?(0,l.__)("Replace Icon","author-website-templates"):(0,l.__)("Upload Icon","author-website-templates")})}),j&&(0,u.jsx)(r.Button,{onClick:()=>{t({buttonIconId:0,buttonIconUrl:""})},isDestructive:!0,variant:"link",children:(0,l.__)("Remove","author-website-templates")})]})]}),(0,u.jsxs)(r.PanelBody,{title:(0,l.__)("View All Button","author-website-templates"),initialOpen:!1,children:[(0,u.jsx)(r.ToggleControl,{label:(0,l.__)("Show View All Button","author-website-templates"),checked:I,onChange:e=>t({showViewAllBtn:e})}),I&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r.TextControl,{label:(0,l.__)("Button Text","author-website-templates"),value:S,onChange:e=>t({viewAllBtnText:e})}),(0,u.jsx)(r.TextControl,{label:(0,l.__)("Custom Link (Optional)","author-website-templates"),value:O,onChange:e=>t({viewAllBtnLink:e}),help:(0,l.__)("Leave empty to use the automatic Book Archive link.","author-website-templates")})]})]})]}),(0,u.jsxs)(a.InspectorControls,{group:"styles",children:[(0,u.jsxs)(r.PanelBody,{title:(0,l.__)("Spacing","author-website-templates"),initialOpen:!0,children:[(0,u.jsx)(r.RangeControl,{label:(0,l.__)("Top Padding (px)","author-website-templates"),value:_,onChange:e=>t({paddingTop:e}),min:0,max:300}),(0,u.jsx)(r.RangeControl,{label:(0,l.__)("Bottom Padding (px)","author-website-templates"),value:y,onChange:e=>t({paddingBottom:e}),min:0,max:300})]}),(0,u.jsx)(d,{isLocked:!A,children:(0,u.jsx)(a.PanelColorSettings,{title:(0,l.__)("Styling","author-website-templates"),initialOpen:!0,colorSettings:[{value:f,onChange:e=>t({accentColor:e}),label:(0,l.__)("Accent Color","author-website-templates")},{value:x,onChange:e=>t({btnColor:e}),label:(0,l.__)("Button Background Color","author-website-templates")},{value:B,onChange:e=>t({btnTextColor:e}),label:(0,l.__)("Button Text Color","author-website-templates")},{value:v,onChange:e=>t({btnHoverColor:e}),label:(0,l.__)("Button Hover Background","author-website-templates")},{value:T,onChange:e=>t({btnHoverTextColor:e}),label:(0,l.__)("Button Hover Text Color","author-website-templates")}]})})]}),(0,u.jsx)(i(),{block:"awt/author-pro-books",attributes:e})]})},save:()=>null})}},o={};function n(e){var l=o[e];if(void 0!==l)return l.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.m=t,e=[],n.O=(t,o,l,a)=>{if(!o){var r=1/0;for(u=0;u<e.length;u++){for(var[o,l,a]=e[u],s=!0,i=0;i<o.length;i++)(!1&a||r>=a)&&Object.keys(n.O).every(e=>n.O[e](o[i]))?o.splice(i--,1):(s=!1,a<r&&(r=a));if(s){e.splice(u--,1);var p=l();void 0!==p&&(t=p)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[o,l,a]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={3831:0,9775:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var l,a,[r,s,i]=o,p=0;if(r.some(t=>0!==e[t])){for(l in s)n.o(s,l)&&(n.m[l]=s[l]);if(i)var u=i(n)}for(t&&t(o);p<r.length;p++)a=r[p],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(u)},o=globalThis.webpackChunkauthor_website_templates=globalThis.webpackChunkauthor_website_templates||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var l=n.O(void 0,[9775],()=>n(841));l=n.O(l)})();