UNPKG

hexo-theme-hyonline

Version:
1 lines 10.3 kB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["post"],{"37d3":function(t,e,c){"use strict";c.r(e);c("b0c0"),c("9911");var i=c("7a23"),n={class:"flex flex-col"},l={class:"main-grid"},a={class:"post-header"},o={class:"post-labels"},s={key:1},r={key:2},j=Object(i["j"])("em",{class:"opacity-50"},"#",-1),b={key:2},p=Object(i["j"])("b",{class:"opacity-50"},"#",-1),u={key:0,class:"post-title text-white"},g={class:"flex flex-row items-center justify-start mt-8 mb-4"},O={key:0,class:"post-footer"},d={class:"text-white opacity-80"},h={class:"opacity-70"},f={key:1,class:"post-footer"},m={class:"flex flex-row items-center"},v={class:"text-ob-dim mt-1"},y={key:2,class:"post-stats"},w={class:"pl-2 opacity-70"},x={class:"pl-2 opacity-70"},k={key:3,class:"post-stats"},C={class:"pl-2"},A={class:"pl-2"},M={class:"main-grid"},T={key:1,class:"\n bg-ob-deep-800\n px-14\n py-16\n rounded-2xl\n shadow-xl\n block\n min-h-screen\n "},I=Object(i["j"])("br",null,null,-1),S=Object(i["j"])("br",null,null,-1),_=Object(i["j"])("br",null,null,-1),P={class:"flex flex-col lg:flex-row justify-start items-end my-8"},F={key:0,class:"w-full h-full self-stretch mr-0 lg:mr-4"},H={key:1,class:"w-full h-full self-stretch mt-8 lg:mt-0"},R={key:2,id:"comments"};function J(t,e,c,J,N,q){var z=Object(i["I"])("ob-skeleton"),D=Object(i["I"])("svg-icon"),E=Object(i["I"])("SubTitle"),G=Object(i["I"])("Article"),L=Object(i["I"])("Comment"),K=Object(i["I"])("Profile"),V=Object(i["I"])("Toc"),B=Object(i["I"])("Sidebar"),Q=Object(i["J"])("lazy"),U=Object(i["J"])("scroll-spy");return Object(i["A"])(),Object(i["g"])("div",n,[Object(i["j"])("div",l,[Object(i["j"])("div",a,[Object(i["j"])("span",o,[t.loading?(Object(i["A"])(),Object(i["g"])(z,{key:0,tag:"b",height:"20px",width:"35px"})):!t.loading&&t.post.categories&&t.post.categories.length>0?(Object(i["A"])(),Object(i["g"])("b",s,[Object(i["j"])("span",null,Object(i["M"])(t.post.categories[0].name),1)])):(Object(i["A"])(),Object(i["g"])("b",r,Object(i["M"])(t.t("settings.default-category")),1)),Object(i["j"])("ul",null,[t.loading?(Object(i["A"])(),Object(i["g"])(z,{key:0,count:2,tag:"li",height:"16px",width:"35px",class:"mr-2"})):!t.loading&&t.post.tags&&t.post.tags.length>0?(Object(i["A"])(!0),Object(i["g"])(i["a"],{key:1},Object(i["G"])(t.post.tags,(function(t){return Object(i["A"])(),Object(i["g"])("li",{key:t.slug},[j,Object(i["i"])(" "+Object(i["M"])(t.name),1)])})),128)):(Object(i["A"])(),Object(i["g"])("li",b,[p,Object(i["i"])(" "+Object(i["M"])(t.t("settings.default-tag")),1)]))])]),t.post.title?(Object(i["A"])(),Object(i["g"])("h1",u,Object(i["M"])(t.post.title),1)):(Object(i["A"])(),Object(i["g"])(z,{key:1,class:"post-title text-white uppercase",width:"100%",height:"clamp(1.2rem, calc(1rem + 3.5vw), 4rem)"})),Object(i["j"])("div",g,[t.post.author&&t.post.count_time.symbolsTime?(Object(i["A"])(),Object(i["g"])("div",O,[Object(i["T"])(Object(i["j"])("img",{class:"hover:opacity-50 cursor-pointer",alt:"author avatar",onClick:e[1]||(e[1]=function(e){return t.handleAuthorClick(t.post.author.link)})},null,512),[[Q,t.post.author.avatar||""]]),Object(i["j"])("span",d,[Object(i["j"])("strong",{class:"text-white pr-1.5 hover:opacity-50 cursor-pointer",onClick:e[2]||(e[2]=function(e){return t.handleAuthorClick(t.post.author.link)})},Object(i["M"])(t.post.author.name),1),Object(i["j"])("span",h,Object(i["M"])(t.t("settings.shared-on"))+" "+Object(i["M"])(t.t(t.post.date.month))+" "+Object(i["M"])(t.post.date.day)+", "+Object(i["M"])(t.post.date.year),1)])])):(Object(i["A"])(),Object(i["g"])("div",f,[Object(i["j"])("div",m,[Object(i["j"])(z,{class:"mr-2",height:"28px",width:"28px",circle:!0}),Object(i["j"])("span",v,[Object(i["j"])(z,{height:"20px",width:"150px"})])])])),t.post.count_time.symbolsTime&&t.post.date?(Object(i["A"])(),Object(i["g"])("div",y,[Object(i["j"])("span",null,[Object(i["j"])(D,{"icon-class":"clock-outline",style:{stroke:"white"}}),Object(i["j"])("span",w,Object(i["M"])(t.post.count_time.symbolsTime),1)]),Object(i["j"])("span",null,[Object(i["j"])(D,{"icon-class":"text-outline",style:{stroke:"white"}}),Object(i["j"])("span",x,Object(i["M"])(t.post.count_time.symbolsCount),1)])])):(Object(i["A"])(),Object(i["g"])("div",k,[Object(i["j"])("span",null,[Object(i["j"])(D,{"icon-class":"clock"}),Object(i["j"])("span",C,[Object(i["j"])(z,{width:"40px",height:"16px"})])]),Object(i["j"])("span",null,[Object(i["j"])(D,{"icon-class":"text"}),Object(i["j"])("span",A,[Object(i["j"])(z,{width:"40px",height:"16px"})])])]))])])]),Object(i["j"])("div",M,[Object(i["j"])("div",null,[t.post.content?Object(i["T"])((Object(i["A"])(),Object(i["g"])("div",{key:0,class:"post-html",innerHTML:t.post.content},null,8,["innerHTML"])),[[U,{sectionSelector:"h1, h2, h3, h4, h5, h6"}]]):(Object(i["A"])(),Object(i["g"])("div",T,[Object(i["j"])(z,{tag:"div",count:1,height:"36px",width:"150px",class:"mb-6"}),I,Object(i["j"])(z,{tag:"div",count:35,height:"16px",width:"100px",class:"mr-2"}),S,_,Object(i["j"])(z,{tag:"div",count:25,height:"16px",width:"100px",class:"mr-2"})])),Object(i["j"])("div",P,[t.post.prev_post.title?(Object(i["A"])(),Object(i["g"])("div",F,[Object(i["j"])(E,{title:"settings.paginator.prev",icon:"arrow-left-circle"}),Object(i["j"])(G,{data:t.post.prev_post},null,8,["data"])])):Object(i["h"])("",!0),t.post.next_post.title?(Object(i["A"])(),Object(i["g"])("div",H,[Object(i["j"])(E,{title:"settings.paginator.next",side:t.isMobile?"left":"right",icon:"arrow-right-circle"},null,8,["side"]),Object(i["j"])(G,{data:t.post.next_post},null,8,["data"])])):Object(i["h"])("",!0)]),t.post.title&&t.post.text&&t.post.uid?(Object(i["A"])(),Object(i["g"])("div",R,[Object(i["j"])(L,{title:t.post.title,body:t.post.text,uid:t.post.uid},null,8,["title","body","uid"])])):Object(i["h"])("",!0)]),Object(i["j"])("div",null,[Object(i["j"])(B,null,{default:Object(i["S"])((function(){return[Object(i["j"])(K,{author:t.post.author.slug||""},null,8,["author"]),Object(i["j"])(V,{toc:t.post.toc},null,8,["toc"])]})),_:1})])])])}var N=c("1da1"),q=(c("96cf"),c("ac1f"),c("5319"),c("2a1d")),z=c("749c"),D=c("41ba"),E=c("6c02"),G=c("47e2"),L=c("4ea3"),K=c("d5a6"),V=c("e628"),B=(c("cc94"),c("f2fb")),Q=c("8578"),U=c("5701"),W=Object(i["k"])({name:"ObPost",components:{Sidebar:q["d"],Toc:q["f"],Comment:L["a"],SubTitle:K["a"],Article:V["a"],Profile:q["b"]},setup:function(){var t=Object(B["a"])(),e=Object(D["a"])(),c=Object(Q["a"])(),n=Object(U["a"])(),l=Object(E["c"])(),a=Object(G["b"])(),o=a.t,s=Object(i["F"])(new z["e"]),r=Object(i["F"])(!0),j=function(){var a=Object(N["a"])(regeneratorRuntime.mark((function a(){var o;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r.value=!0,s.value=new z["e"],window.scrollTo({top:0}),o=String(l.params.slug),o=o.indexOf(",")?o.replace(/[,]+/g,"/"):o,a.next=7,e.fetchPost(o).then((function(e){s.value=e,t.setTitle(s.value.title),n.setHeaderImage(e.cover),r.value=!1}));case 7:return c.hexoConfig.writing.highlight.enable&&console.error("[Aurora Config Error]: Please turn off [Hightlightjs] and enable [Prismjs] instead. "),c.hexoConfig.writing.prismjs.preprocess&&console.error("[Aurora Config Error]: Please set Hexo config's prismjs' [preprocess] property to false! "),a.next=11,Object(i["s"])();case 11:Prism.highlightAll();case 12:case"end":return a.stop()}}),a)})));return function(){return a.apply(this,arguments)}}();Object(i["R"])((function(){return l.params}),(function(t){t.slug&&-1===l.fullPath.indexOf("#")&&j()}));var b=function(t){""===t&&(t=window.location.href),window.location.href=t};return Object(i["x"])(j),Object(i["v"])((function(){n.resetHeaderImage()})),{isMobile:Object(i["e"])((function(){return n.isMobile})),handleAuthorClick:b,loading:r,post:s,t:o}}});W.render=J;e["default"]=W},4523:function(t,e,c){"use strict";c("c496")},"4ea3":function(t,e,c){"use strict";var i=c("7a23"),n={class:"\n bg-ob-deep-800\n p-4\n mt-8\n lg:px-14 lg:py-10\n rounded-2xl\n shadow-xl\n mb-8\n lg:mb-0\n "},l=Object(i["j"])("div",{id:"gitalk-container"},null,-1),a=Object(i["j"])("div",{id:"vcomments"},null,-1);function o(t,e,c,o,s,r){var j=Object(i["I"])("SubTitle");return Object(i["A"])(),Object(i["g"])("div",n,[Object(i["j"])(j,{title:"titles.comment"},null,8,["title"]),l,a])}c("99af");var s=c("8578"),r=c("d5a6"),j=c("41ba"),b=Object(i["k"])({name:"ObComment",props:{title:{type:String,default:""},body:{type:String,default:""},uid:{type:String,default:""}},components:{SubTitle:r["a"]},setup:function(t){var e=Object(i["N"])(t).title,c=Object(i["N"])(t).body,n=Object(i["N"])(t).uid,l=Object(s["a"])(),a=Object(j["a"])(),o=function(t,e,c){var i=t&&""!==t?t:"",n=e&&""!==e?"".concat(window.location.href," \n ").concat(e):window.location.href,o="pathname"===l.themeConfig.plugins.gitalk.id?window.location.pathname:c;if(a.setCache({title:t,body:e,uid:c}),l.configReady)if(l.themeConfig.plugins.gitalk.enable){var s=""===l.themeConfig.plugins.gitalk.proxy?"https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token":l.themeConfig.plugins.gitalk.proxy,r=new Gitalk({clientID:l.themeConfig.plugins.gitalk.clientID,clientSecret:l.themeConfig.plugins.gitalk.clientSecret,repo:l.themeConfig.plugins.gitalk.repo,owner:l.themeConfig.plugins.gitalk.owner,admin:l.themeConfig.plugins.gitalk.admin,id:o,language:l.themeConfig.plugins.gitalk.language,distractionFreeMode:!0,title:i,body:n,proxy:s});r.render("gitalk-container")}else l.themeConfig.plugins.valine.enable&&new Valine({el:"#vcomments",appId:l.themeConfig.plugins.valine.app_id,appKey:l.themeConfig.plugins.valine.app_key,avatar:l.themeConfig.plugins.valine.avatar,placeholder:l.themeConfig.plugins.valine.placeholder,visitor:l.themeConfig.plugins.valine.visitor,lang:l.themeConfig.plugins.valine.lang,meta:l.themeConfig.plugins.valine.meta,requiredFields:l.themeConfig.plugins.valine.requiredFields,avatarForce:l.themeConfig.plugins.valine.avatarForce,path:window.location.pathname})};Object(i["R"])((function(){return l.configReady}),(function(t,e){if(!e&&t){var c=a.cachePost;o(c.title,c.body,c.uid)}})),Object(i["x"])((function(){o(e.value,c.value,n.value)}))}});c("4523");b.render=o;e["a"]=b},c496:function(t,e,c){},cc94:function(t,e,c){}}]);