hosting-frontend/.next/static/chunks/app/page-ff92cb3df51b84dd.js

1 line
19 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{1473:(e,t,r)=>{Promise.resolve().then(r.bind(r,8783)),Promise.resolve().then(r.bind(r,1943)),Promise.resolve().then(r.bind(r,6573)),Promise.resolve().then(r.bind(r,6109)),Promise.resolve().then(r.bind(r,3155)),Promise.resolve().then(r.bind(r,9842))},1943:(e,t,r)=>{"use strict";r.d(t,{default:()=>c});var s=r(5155),o=r(2619),a=r.n(o),i=r(1847);let l=(0,i.A)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),n=(0,i.A)("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),d=(0,i.A)("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);function c(e){let{year:t=new Date().getFullYear()}=e;return(0,s.jsx)("footer",{className:"border-t bg-gray-50",children:(0,s.jsxs)("div",{className:"container mx-auto px-4 py-12",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-8 mb-8",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-bold mb-4",children:"Portfolio Host"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Host your portfolio with ease and get discovered by opportunities."})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"font-semibold mb-4",children:"Product"}),(0,s.jsxs)("ul",{className:"space-y-2 text-sm",children:[(0,s.jsx)("li",{children:(0,s.jsx)(a(),{href:"/register",className:"text-muted-foreground hover:text-primary",children:"Get Started"})}),(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#features",className:"text-muted-foreground hover:text-primary",children:"Features"})}),(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#pricing",className:"text-muted-foreground hover:text-primary",children:"Pricing"})})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"font-semibold mb-4",children:"Resources"}),(0,s.jsxs)("ul",{className:"space-y-2 text-sm",children:[(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#docs",className:"text-muted-foreground hover:text-primary",children:"Documentation"})}),(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#blog",className:"text-muted-foreground hover:text-primary",children:"Blog"})}),(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:"#support",className:"text-muted-foreground hover:text-primary",children:"Support"})})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"font-semibold mb-4",children:"Connect"}),(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsx)("a",{href:"mailto:hello@portfoliohost.com","aria-label":"Email",className:"text-muted-foreground hover:text-primary",children:(0,s.jsx)(l,{size:20})}),(0,s.jsx)("a",{href:"https://github.com","aria-label":"GitHub",className:"text-muted-foreground hover:text-primary",children:(0,s.jsx)(n,{size:20})}),(0,s.jsx)("a",{href:"https://twitter.com","aria-label":"Twitter",className:"text-muted-foreground hover:text-primary",children:(0,s.jsx)(d,{size:20})})]})]})]}),(0,s.jsx)("div",{className:"border-t pt-8",children:(0,s.jsxs)("div",{className:"flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:["\xa9 ",t," Portfolio Host. All rights reserved."]}),(0,s.jsxs)("div",{className:"flex gap-6 text-sm",children:[(0,s.jsx)("a",{href:"#privacy",className:"text-muted-foreground hover:text-primary",children:"Privacy"}),(0,s.jsx)("a",{href:"#terms",className:"text-muted-foreground hover:text-primary",children:"Terms"}),(0,s.jsx)("a",{href:"#cookies",className:"text-muted-foreground hover:text-primary",children:"Cookies"})]})]})})]})})}},2327:(e,t,r)=>{"use strict";r.d(t,{u:()=>a});let s="http://localhost:8000/api";class o{getToken(){return localStorage.getItem("auth_token")}async request(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getToken(),o={"Content-Type":"application/json",...t.headers};r&&(o.Authorization="Bearer ".concat(r));try{let r=await fetch("".concat(s).concat(e),{...t,headers:o}),a=await r.json();if(!r.ok)throw 401===r.status&&(localStorage.removeItem("auth_token"),window.location.href="/login"),Error(a.message||"API request failed");return a}catch(e){throw console.error("API Error:",e),e}}async get(e){return this.request(e,{method:"GET"})}async post(e,t){return this.request(e,{method:"POST",body:t?JSON.stringify(t):void 0})}async put(e,t){return this.request(e,{method:"PUT",body:t?JSON.stringify(t):void 0})}async delete(e){return this.request(e,{method:"DELETE"})}async upload(e,t){let r=this.getToken(),o={};r&&(o.Authorization="Bearer ".concat(r));try{let r=await fetch("".concat(s).concat(e),{method:"POST",headers:o,body:t}),a=await r.json();if(!r.ok)throw 401===r.status&&(localStorage.removeItem("auth_token"),window.location.href="/login"),Error(a.message||"Upload failed");return a}catch(e){throw console.error("Upload Error:",e),e}}}let a=new o},3155:(e,t,r)=>{"use strict";r.d(t,{default:()=>m});var s=r(5155),o=r(2115),a=r(2619),i=r.n(a),l=r(9178),n=r(7003),d=r(4926),c=r(1847);let h=(0,c.A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),u=(0,c.A)("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);function m(){let{user:e,logout:t}=(0,l.A)(),[r,a]=(0,o.useState)(!1),c=()=>{a(!1)},m=async()=>{await t(),c()};return(0,s.jsx)("nav",{className:"border-b bg-white sticky top-0 z-50",children:(0,s.jsxs)("div",{className:"container mx-auto px-4 py-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(i(),{href:"/",className:"text-2xl font-bold text-primary hover:opacity-80",children:"Portfolio Host"}),(0,s.jsxs)("div",{className:"hidden md:flex items-center gap-6",children:[(0,s.jsx)(i(),{href:"/",className:"text-foreground hover:text-primary transition",children:"Home"}),e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i(),{href:"/dashboard",className:"text-foreground hover:text-primary transition",children:"Dashboard"}),(0,s.jsxs)(n.$,{onClick:m,variant:"ghost",className:"flex items-center gap-2","aria-label":"Logout",children:[(0,s.jsx)(d.A,{size:18}),"Logout"]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i(),{href:"/login",children:(0,s.jsx)(n.$,{variant:"outline",children:"Login"})}),(0,s.jsx)(i(),{href:"/register",children:(0,s.jsx)(n.$,{children:"Sign Up"})})]})]}),(0,s.jsx)("button",{onClick:()=>{a(!r)},className:"md:hidden p-2 hover:bg-gray-100 rounded-md","aria-label":"Toggle menu","aria-expanded":r,children:r?(0,s.jsx)(h,{size:24}):(0,s.jsx)(u,{size:24})})]}),r&&(0,s.jsxs)("div",{className:"md:hidden mt-4 pb-4 border-t pt-4 space-y-3",children:[(0,s.jsx)(i(),{href:"/",className:"block text-foreground hover:text-primary transition py-2",onClick:c,children:"Home"}),e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i(),{href:"/dashboard",className:"block text-foreground hover:text-primary transition py-2",onClick:c,children:"Dashboard"}),(0,s.jsxs)(n.$,{onClick:m,variant:"ghost",className:"w-full justify-start flex items-center gap-2","aria-label":"Logout",children:[(0,s.jsx)(d.A,{size:18}),"Logout"]})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(i(),{href:"/login",onClick:c,children:(0,s.jsx)(n.$,{variant:"outline",className:"w-full",children:"Login"})}),(0,s.jsx)(i(),{href:"/register",onClick:c,children:(0,s.jsx)(n.$,{className:"w-full",children:"Sign Up"})})]})]})]})})}},4845:(e,t,r)=>{"use strict";r.d(t,{AuthProvider:()=>n,c:()=>l});var s=r(5155),o=r(2115),a=r(63),i=r(2327);let l=(0,o.createContext)(void 0);function n(e){let{children:t}=e,[r,n]=(0,o.useState)(null),[d,c]=(0,o.useState)(null),[h,u]=(0,o.useState)(!0),m=(0,a.useRouter)();(0,o.useEffect)(()=>{let e=localStorage.getItem("auth_token");e?(c(e),x(e)):u(!1)},[]);let x=async e=>{try{let e=await i.u.get("/auth/user");e.success&&e.data&&n(e.data)}catch(e){console.error("Failed to fetch user:",e),localStorage.removeItem("auth_token"),c(null)}finally{u(!1)}},f=async e=>{try{let t=await i.u.post("/auth/login",e);if(t.success&&t.data){let{token:e,user:r}=t.data;localStorage.setItem("auth_token",e),c(e),n(r),m.push("/dashboard")}else throw Error(t.message||"Login failed")}catch(e){throw console.error("Login error:",e),e}},p=async e=>{try{let t=await i.u.post("/auth/register",e);if(t.success&&t.data){let{token:e,user:r}=t.data;localStorage.setItem("auth_token",e),c(e),n(r),m.push("/dashboard")}else throw Error(t.message||"Registration failed")}catch(e){throw console.error("Registration error:",e),e}};return(0,s.jsx)(l.Provider,{value:{user:r,token:d,isAuthenticated:!!d,isLoading:h,login:f,register:p,logout:()=>{localStorage.removeItem("auth_token"),c(null),n(null),m.push("/login")}},children:t})}},4926:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(1847).A)("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]])},5016:(e,t,r)=>{"use strict";r.d(t,{cn:()=>a});var s=r(2821),o=r(5889);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,o.QP)((0,s.$)(t))}},6109:(e,t,r)=>{"use strict";r.d(t,{default:()=>h});var s=r(5155),o=r(1847);let a=(0,o.A)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),i=(0,o.A)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),l=(0,o.A)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),n=(0,o.A)("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]),d=[{id:"fast",title:"Lightning Fast",description:"Deploy your portfolio instantly and reach global audiences with blazing-fast loading times.",icon:"zap"},{id:"secure",title:"Secure & Reliable",description:"Enterprise-grade security with automatic SSL certificates and 99.9% uptime guarantee.",icon:"shield"},{id:"domain",title:"Custom Domains",description:"Use your own domain name to create a professional online presence.",icon:"globe"},{id:"mobile",title:"Mobile Optimized",description:"Your portfolio looks perfect on all devices from smartphones to desktops.",icon:"smartphone"}],c={zap:a,shield:i,globe:l,smartphone:n};function h(e){let{items:t=d}=e;return(0,s.jsx)("section",{className:"py-16 md:py-24 bg-white",children:(0,s.jsxs)("div",{className:"container mx-auto px-4",children:[(0,s.jsxs)("div",{className:"text-center mb-12",children:[(0,s.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Why Choose Portfolio Host?"}),(0,s.jsx)("p",{className:"text-lg text-muted-foreground",children:"Everything you need to share your work with the world"})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:t.map(e=>{let t=c[e.icon];return(0,s.jsxs)("div",{className:"p-6 rounded-lg border hover:shadow-lg transition",children:[(0,s.jsx)(t,{size:40,className:"text-primary mb-4"}),(0,s.jsx)("h3",{className:"text-xl font-semibold mb-2",children:e.title}),(0,s.jsx)("p",{className:"text-muted-foreground",children:e.description})]},e.id)})})]})})}},6573:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var s=r(5155),o=r(2619),a=r.n(o),i=r(7003);function l(e){let{title:t="Host Your Portfolio",description:r="Deploy and manage your portfolio websites with custom domains. Simple, fast, and professional hosting for creatives and developers.",primaryCTA:o={text:"Get Started",href:"/register"},secondaryCTA:l={text:"View Example",href:"#"}}=e;return(0,s.jsx)("section",{className:"py-20 md:py-32 bg-gradient-to-br from-purple-50 to-pink-50",children:(0,s.jsxs)("div",{className:"container mx-auto px-4 text-center",children:[(0,s.jsx)("h1",{className:"text-4xl md:text-6xl font-bold mb-6 bg-gradient-to-r from-purple-600 to-pink-600 bg-clip-text text-transparent",children:t}),(0,s.jsx)("p",{className:"text-lg md:text-xl text-muted-foreground mb-8 max-w-2xl mx-auto",children:r}),(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[(0,s.jsx)(a(),{href:o.href,children:(0,s.jsx)(i.$,{size:"lg",className:"w-full sm:w-auto",children:o.text})}),l.text&&(0,s.jsx)(a(),{href:l.href,children:(0,s.jsx)(i.$,{size:"lg",variant:"outline",className:"w-full sm:w-auto",children:l.text})})]}),(0,s.jsx)("div",{className:"mt-16 pt-16 border-t border-gray-200",children:(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Trusted by portfolio creators and developers worldwide"})})]})})}},7003:(e,t,r)=>{"use strict";r.d(t,{$:()=>n});var s=r(5155),o=r(2115),a=r(3101),i=r(5016);let l=(0,a.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),n=o.forwardRef((e,t)=>{let{className:r,variant:o,size:a,...n}=e;return(0,s.jsx)("button",{className:(0,i.cn)(l({variant:o,size:a,className:r})),ref:t,...n})});n.displayName="Button"},8783:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var s=r(5155),o=r(2115);let a=(0,r(1847).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),i=[{id:"faq-1",question:"How do I upload my portfolio?",answer:'Navigate to your dashboard and click "Create New Portfolio". Fill in your portfolio details, then upload a ZIP file containing your website files. Our system will automatically extract and deploy your portfolio.'},{id:"faq-2",question:"What file formats are supported?",answer:"We support ZIP files containing standard web files (HTML, CSS, JavaScript, images). The root of your ZIP should contain an index.html file as the entry point."},{id:"faq-3",question:"Can I use a custom domain?",answer:"Yes! You can connect your custom domain during portfolio creation. Simply point your domain's DNS records to our servers, and we'll handle the rest."},{id:"faq-4",question:"Is SSL/HTTPS included?",answer:"Absolutely! All portfolios hosted on Portfolio Host include free SSL certificates. Your site will automatically be served over HTTPS for security and SEO benefits."},{id:"faq-5",question:"How do I update my portfolio?",answer:"Simply upload a new ZIP file for your portfolio. The system will automatically replace the old version while keeping your custom domain and settings intact."},{id:"faq-6",question:"What happens if I delete my portfolio?",answer:"Deleted portfolios are permanently removed and cannot be recovered. Your custom domain will become available for reassignment. Please download any important files before deletion."}];function l(e){let{items:t=i}=e,[r,l]=(0,o.useState)(null);return(0,s.jsx)("section",{className:"py-16 md:py-24",children:(0,s.jsxs)("div",{className:"container mx-auto px-4",children:[(0,s.jsxs)("div",{className:"text-center mb-12",children:[(0,s.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Frequently Asked Questions"}),(0,s.jsx)("p",{className:"text-lg text-muted-foreground",children:"Find answers to common questions about Portfolio Host"})]}),(0,s.jsx)("div",{className:"max-w-2xl mx-auto space-y-4",children:t.map(e=>(0,s.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,s.jsxs)("button",{onClick:()=>{var t;l(r===(t=e.id)?null:t)},className:"w-full px-6 py-4 flex items-center justify-between hover:bg-gray-50 transition","aria-expanded":r===e.id,"aria-controls":"faq-answer-".concat(e.id),children:[(0,s.jsx)("span",{className:"font-semibold text-left text-foreground",children:e.question}),(0,s.jsx)(a,{size:20,className:"text-muted-foreground transition-transform flex-shrink-0 ml-4 ".concat(r===e.id?"rotate-180":"")})]}),r===e.id&&(0,s.jsx)("div",{id:"faq-answer-".concat(e.id),className:"px-6 py-4 bg-gray-50 border-t text-muted-foreground",children:e.answer})]},e.id))}),(0,s.jsxs)("div",{className:"text-center mt-12",children:[(0,s.jsx)("p",{className:"text-muted-foreground mb-4",children:"Still have questions?"}),(0,s.jsx)("a",{href:"mailto:support@portfoliohost.com",className:"text-primary hover:underline font-medium",children:"Contact our support team"})]})]})})}},9178:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var s=r(2115),o=r(4845);function a(){let e=(0,s.useContext)(o.c);if(void 0===e)throw Error("useAuth must be used within an AuthProvider");return e}},9842:(e,t,r)=>{"use strict";r.d(t,{default:()=>a});var s=r(5155);let o=[{id:"portfolios",label:"Portfolios Hosted",value:"10,000+"},{id:"uptime",label:"Uptime Guarantee",value:"99.9%"},{id:"users",label:"Active Users",value:"50,000+"},{id:"time",label:"Average Deploy Time",value:"<30s"}];function a(e){let{stats:t=o}=e;return(0,s.jsx)("section",{className:"py-16 md:py-24 bg-gradient-to-r from-purple-600 to-pink-600 text-white",children:(0,s.jsxs)("div",{className:"container mx-auto px-4",children:[(0,s.jsxs)("div",{className:"text-center mb-12",children:[(0,s.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Trusted by Creators"}),(0,s.jsx)("p",{className:"text-lg text-white/80",children:"Portfolio Host is the platform of choice for creative professionals"})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:t.map(e=>(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("div",{className:"text-4xl md:text-5xl font-bold mb-2",children:e.value}),(0,s.jsx)("p",{className:"text-lg text-white/80",children:e.label})]},e.id))})]})})}}},e=>{e.O(0,[676,619,441,255,358],()=>e(e.s=1473)),_N_E=e.O()}]);