literate / _next /static /chunks /870-b143eb11c68e0d46.js
ekojs's picture
feat: LiTERatE v0.1
0d8af24 verified
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[870],{3870:(e,r,s)=>{s.d(r,{A:()=>j});var t=s(1500),o=s(4184),n=s.n(o),a=s(432),l=s(51),i=s(3080);let c=()=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"5"}),(0,t.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),(0,t.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),(0,t.jsx)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),(0,t.jsx)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),(0,t.jsx)("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),(0,t.jsx)("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),(0,t.jsx)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),(0,t.jsx)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}),d=()=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),x=()=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M12 8a2.83 2.83 0 0 0 4 4 4 4 0 1 1-4-4"}),(0,t.jsx)("path",{d:"M12 2v2"}),(0,t.jsx)("path",{d:"M12 20v2"}),(0,t.jsx)("path",{d:"m4.9 4.9 1.4 1.4"}),(0,t.jsx)("path",{d:"m17.7 17.7 1.4 1.4"}),(0,t.jsx)("path",{d:"M2 12h2"}),(0,t.jsx)("path",{d:"M20 12h2"}),(0,t.jsx)("path",{d:"m6.3 17.7-1.4 1.4"}),(0,t.jsx)("path",{d:"m19.1 4.9-1.4 1.4"})]}),m=()=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),(0,t.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,t.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),h=()=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,t.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),u=e=>{let{mode:r,currentTheme:s,onClick:o,icon:n}=e;return(0,t.jsxs)("button",{onClick:o,className:"w-full text-left px-3 py-1.5 text-sm rounded-sm flex items-center gap-2 ".concat(s===r?"bg-primary/10 text-primary":"hover:bg-secondary focus:bg-secondary focus:outline-none"),children:[n,r.charAt(0).toUpperCase()+r.slice(1)]})},g=e=>{let{themeMode:r,setTheme:s}=e,[o,n]=(0,a.useState)(!1);return(0,t.jsxs)(i.bL,{open:o,onOpenChange:n,children:[(0,t.jsx)(i.l9,{asChild:!0,children:(0,t.jsx)("button",{className:"p-2 rounded-full bg-secondary hover:bg-secondary/80 focus:ring-2 focus:ring-primary/20 focus:outline-none transition-colors","aria-label":"Toggle theme",children:(()=>{switch(r){case"light":return(0,t.jsx)(c,{});case"dark":return(0,t.jsx)(d,{});default:return(0,t.jsx)(x,{})}})()})}),(0,t.jsx)(i.ZL,{children:(0,t.jsxs)(i.UC,{className:"bg-card rounded-md shadow-lg border border-border overflow-hidden z-10 p-1 animate-in fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",sideOffset:5,align:"end",onEscapeKeyDown:e=>e.preventDefault(),onOpenAutoFocus:e=>e.preventDefault(),children:[(0,t.jsx)(i.bm,{className:"hidden"}),(0,t.jsxs)("div",{className:"p-1 flex flex-col gap-1",children:[(0,t.jsx)(i.bm,{asChild:!0,children:(0,t.jsx)(u,{mode:"light",currentTheme:r,onClick:()=>{s("light"),n(!1)},icon:(0,t.jsx)(c,{})})}),(0,t.jsx)(i.bm,{asChild:!0,children:(0,t.jsx)(u,{mode:"dark",currentTheme:r,onClick:()=>{s("dark"),n(!1)},icon:(0,t.jsx)(d,{})})}),(0,t.jsx)(i.bm,{asChild:!0,children:(0,t.jsx)(u,{mode:"system",currentTheme:r,onClick:()=>{s("system"),n(!1)},icon:(0,t.jsx)(x,{})})})]}),(0,t.jsx)(i.i3,{className:"fill-border"})]})})]})};function f(){let[e,r]=(0,a.useState)("system"),[s,o]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let s=localStorage.getItem("theme");if("light"===s||"dark"===s)r(s),document.documentElement.classList.toggle("dark","dark"===s);else{r("system");let s=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle("dark",s);let t=window.matchMedia("(prefers-color-scheme: dark)"),o=r=>{"system"===e&&document.documentElement.classList.toggle("dark",r.matches)};return t.addEventListener("change",o),()=>t.removeEventListener("change",o)}},[e]);let i=e=>{if(r(e),"system"===e){localStorage.removeItem("theme");let e=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle("dark",e)}else localStorage.setItem("theme",e),document.documentElement.classList.toggle("dark","dark"===e)};return(0,t.jsxs)("header",{className:"max-w-5xl mx-auto mb-12",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center gap-4 mb-8 py-4",children:[(0,t.jsxs)(n(),{href:"/",className:"flex items-center gap-2 group",children:[(0,t.jsx)("div",{className:"w-10 h-10 flex items-center justify-center rounded-lg overflow-hidden transition-transform group-hover:scale-105",children:(0,t.jsx)(l.default,{src:"/literate-logo.svg",alt:"LiTERatE Logo",width:40,height:40,className:"w-full h-full"})}),(0,t.jsx)("h1",{className:"text-2xl sm:text-3xl font-bold group-hover:text-primary transition-colors",children:"LiTERatE"})]}),(0,t.jsxs)("div",{className:"hidden md:flex items-center gap-6",children:[(0,t.jsxs)("nav",{className:"flex gap-6",children:[(0,t.jsx)(n(),{href:"/",className:"font-medium hover:text-primary focus:text-primary transition-colors relative after:absolute after:left-0 after:bottom-0 after:h-0.5 after:w-0 after:bg-primary hover:after:w-full focus:after:w-full after:transition-all",children:"Leaderboard"}),(0,t.jsx)(n(),{href:"/methodology",className:"font-medium hover:text-primary focus:text-primary transition-colors relative after:absolute after:left-0 after:bottom-0 after:h-0.5 after:w-0 after:bg-primary hover:after:w-full focus:after:w-full after:transition-all",children:"Methodology"})]}),(0,t.jsx)(g,{themeMode:e,setTheme:i})]}),(0,t.jsxs)("div",{className:"flex md:hidden items-center gap-2",children:[(0,t.jsx)(g,{themeMode:e,setTheme:i}),(0,t.jsx)("button",{onClick:()=>{o(!s)},className:"p-2 rounded-full bg-secondary hover:bg-secondary/80 focus:ring-2 focus:ring-primary/20 focus:outline-none transition-colors","aria-label":"Toggle menu",children:s?(0,t.jsx)(h,{}):(0,t.jsx)(m,{})})]})]}),s&&(0,t.jsx)("div",{className:"md:hidden bg-card rounded-lg shadow-lg p-4 mb-6 animate-in slide-in-from-top-5",children:(0,t.jsxs)("nav",{className:"flex flex-col gap-4",children:[(0,t.jsx)(n(),{href:"/",className:"font-medium hover:text-primary focus:text-primary transition-colors p-2 rounded-md hover:bg-secondary/50 focus:bg-secondary/50",onClick:()=>o(!1),children:"Leaderboard"}),(0,t.jsx)(n(),{href:"/methodology",className:"font-medium hover:text-primary focus:text-primary transition-colors p-2 rounded-md hover:bg-secondary/50 focus:bg-secondary/50",onClick:()=>o(!1),children:"Methodology"}),(0,t.jsxs)("div",{className:"border-t border-border pt-4 mt-2",children:[(0,t.jsx)("p",{className:"text-sm font-medium mb-2",children:"Theme"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("button",{onClick:()=>i("light"),className:"p-2 rounded-md flex items-center gap-2 ".concat("light"===e?"bg-primary/10 text-primary":"hover:bg-secondary/50"),children:[(0,t.jsx)(c,{}),(0,t.jsx)("span",{className:"text-sm",children:"Light"})]}),(0,t.jsxs)("button",{onClick:()=>i("dark"),className:"p-2 rounded-md flex items-center gap-2 ".concat("dark"===e?"bg-primary/10 text-primary":"hover:bg-secondary/50"),children:[(0,t.jsx)(d,{}),(0,t.jsx)("span",{className:"text-sm",children:"Dark"})]}),(0,t.jsxs)("button",{onClick:()=>i("system"),className:"p-2 rounded-md flex items-center gap-2 ".concat("system"===e?"bg-primary/10 text-primary":"hover:bg-secondary/50"),children:[(0,t.jsx)(x,{}),(0,t.jsx)("span",{className:"text-sm",children:"System"})]})]})]})]})})]})}function p(){return(0,t.jsxs)("footer",{className:"max-w-5xl mx-auto mt-16 pt-8 border-t border-border text-center text-sm text-muted-foreground",children:[(0,t.jsxs)("p",{className:"mb-4",children:["Built by the team at"," ",(0,t.jsx)("a",{href:"https://readomni.com/",className:"underline hover:text-primary",target:"_blank",rel:"noopener noreferrer",children:"Omni"})]}),(0,t.jsxs)("div",{className:"flex justify-center space-x-6",children:[(0,t.jsx)("a",{href:"https://discord.gg/M6N69PuMKt",className:"hover:text-primary",target:"_blank",rel:"noopener noreferrer","aria-label":"Discord",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"9",cy:"12",r:"1"}),(0,t.jsx)("circle",{cx:"15",cy:"12",r:"1"}),(0,t.jsx)("path",{d:"M7.5 7.5c3.5-1 5.5-1 9 0"}),(0,t.jsx)("path",{d:"M7 16.5c3.5 1 6.5 1 10 0"}),(0,t.jsx)("path",{d:"M15.5 17c0 1 1.5 3 2 3 1.5 0 2.833-1.667 3.5-3 .667-1.667.5-5.833-1.5-11.5-1.457-1.015-3-1.34-4.5-1.5l-1 2.5"}),(0,t.jsx)("path",{d:"M8.5 17c0 1-1.356 3-1.832 3-1.429 0-2.698-1.667-3.333-3-.635-1.667-.48-5.833 1.428-11.5C6.151 4.485 7.545 4.16 9 4l1 2.5"})]})}),(0,t.jsx)("a",{href:"https://twitter.com/readomni",className:"hover:text-primary",target:"_blank",rel:"noopener noreferrer","aria-label":"Twitter",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("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"})})}),(0,t.jsx)("a",{href:"https://readomni.com/",className:"hover:text-primary",target:"_blank",rel:"noopener noreferrer","aria-label":"Website",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),(0,t.jsx)("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})})]})]})}function j(e){let{children:r}=e;return(0,t.jsxs)("div",{className:"min-h-screen p-6 sm:p-8 pb-20 bg-background text-foreground",children:[(0,t.jsx)(f,{}),(0,t.jsx)("main",{className:"max-w-5xl mx-auto",children:r}),(0,t.jsx)(p,{})]})}}}]);