diff --git a/README.md b/README.md index 367521d..ff0e127 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,9 @@ While the main purpose of this repo is to generate the static HTML Documentation ## License The MIT License (MIT). Please see [License File](LICENSE.md) for more information. + +## Attributions +> Please see the respective authors' repositories for their license files + +- The Hyde core is built with [Laravel Zero](https://laravel-zero.com/) which is based on [Laravel](https://laravel.com/) +- The frontend is built with [TailwindCSS](https://tailwindcss.com/). diff --git a/_site/404.html b/_site/404.html new file mode 100644 index 0000000..9db2b08 --- /dev/null +++ b/_site/404.html @@ -0,0 +1,523 @@ + + + + 404 - Page not found + + + + + + + + + + + + + +
+
+
+
+ 404 +
+ +
+ +

+ Sorry, the page you are looking for could not be found. +

+ + + + +
+
+ +
+
+
+ + +
+ + diff --git a/_site/media/app.css.map b/_site/media/app.css.map index c947fa6..5e57a0d 100644 --- a/_site/media/app.css.map +++ b/_site/media/app.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../../src/resources/sass/_torchlight.scss","../../src/resources/sass/app.scss"],"names":[],"mappings":"AAOC,wBACC,qBACA,gBACA,mBACA,gBACA,UAEA,wCACC,cACA,8BACA,2BACA,sBACA,iBACA,oBAEA,8CACC,kBACA,mBAGD,4GAEC,kBCtBH,oBACC,YACA,iBACA,uBACC,eACA,gBAED,sBACC,YACA,0DACC,UAMJ,cACC,gBACA,sBACC,kBACA,kFACC,eACA,sLACC,eAIH,6BACC,aAMA,mFACC,8BACA,8BACA,kBACA,mBACA,sBAMF,yBADD,uBAEE,YAIF,uBACI,gBACA,yBAFJ,uBAGQ,+BAGJ,4BACI,eACA,gBACA,qBACA,mBAIN,gCACC,cACA,gBAKH,kBACC,YACA,aACA,gCACA,eACA,MACA,OACA,eAKC,0CACC,aAID,2CACC","file":"app.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../resources/sass/_torchlight.scss","../../resources/sass/app.scss"],"names":[],"mappings":"AAOC,wBACC,qBACA,gBACA,mBACA,gBACA,UAEA,wCACC,cACA,8BACA,2BACA,sBACA,iBACA,oBAEA,8CACC,kBACA,mBAGD,4GAEC,kBCtBH,oBACC,YACA,iBACA,uBACC,eACA,gBAED,sBACC,YACA,0DACC,UAMJ,cACC,gBACA,sBACC,kBACA,kFACC,eACA,sLACC,eAIH,6BACC,aAMA,mFACC,8BACA,8BACA,kBACA,mBACA,sBAMF,yBADD,uBAEE,YAIF,uBACI,gBACA,yBAFJ,uBAGQ,+BAGJ,4BACI,eACA,gBACA,qBACA,mBAIN,gCACC,cACA,gBAKH,kBACC,YACA,aACA,gCACA,eACA,MACA,OACA,eAKC,0CACC,aAID,2CACC","file":"app.css"} \ No newline at end of file diff --git a/_site/media/tailwind.css b/_site/media/tailwind.css index 9f50143..0cc3e46 100644 --- a/_site/media/tailwind.css +++ b/_site/media/tailwind.css @@ -1 +1 @@ -/*! tailwindcss v3.0.23 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where([class~=lead]):not(:where([class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose] *)){color:#6366f1;text-decoration:none;font-weight:500}.prose :where(a):not(:where([class~=not-prose] *)):hover{color:#4338ca}.prose :where(strong):not(:where([class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(ol):not(:where([class~=not-prose] *)){list-style-type:decimal;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose] *)){list-style-type:disc;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(hr):not(:where([class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose] *)){font-weight:500;font-style:unset;color:#1f2937;border-left-width:.25rem;border-left-color:#d1d5db;quotes:"\201C""\201D""\2018""\2019";margin-top:1em;margin-bottom:1em;padding-left:.75em;background-color:#80808020;line-height:1.25em;padding-top:.25em;padding-bottom:.25em}.prose :where(blockquote):not(:where([class~=not-prose] *)) p{padding-right:.25em;margin-top:.25em;margin-bottom:.25em}.prose :where(blockquote):not(:where([class~=not-prose] *)) p:before{content:unset}.prose :where(blockquote):not(:where([class~=not-prose] *)) p:after{content:unset}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose] *)){font-weight:900}.prose :where(h2):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:1.5em;margin-bottom:.75em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose] *)){font-weight:800}.prose :where(h3):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose] *)){font-weight:700}.prose :where(h4):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose] *)){font-weight:700}.prose :where(figure>*):not(:where([class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose :where(code):not(:where([class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em;font:unset;background-color:#80808033;padding-left:4px;padding-right:4px;margin-left:-2px;margin-right:1px;border-radius:4px;white-space:pre}.prose :where(code):not(:where([class~=not-prose] *)):before{content:unset}.prose :where(code):not(:where([class~=not-prose] *)):after{content:unset}.prose :where(a code):not(:where([class~=not-prose] *)){color:var(--tw-prose-links)}.prose :where(pre):not(:where([class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre):not(:where([class~=not-prose] *)) code{font-family:Fira Code Regular,Consolas,Monospace,Courier New}.prose :where(pre code):not(:where([class~=not-prose] *)){background-color:initial;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose] *)){vertical-align:initial;padding:.5714286em}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.5em}.prose :where(p):not(:where([class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(img):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(figure):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(h2 code):not(:where([class~=not-prose] *)){font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose] *)){font-size:.9em}.prose :where(li):not(:where([class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose] *)){padding-left:.375em}.prose>:where(ul>li p):not(:where([class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose>:where(ul>li>:first-child):not(:where([class~=not-prose] *)){margin-top:1.25em}.prose>:where(ul>li>:last-child):not(:where([class~=not-prose] *)){margin-bottom:1.25em}.prose>:where(ol>li>:first-child):not(:where([class~=not-prose] *)){margin-top:1.25em}.prose>:where(ol>li>:last-child):not(:where([class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(hr+*):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose] *)){padding-right:0}.prose :where(tbody td:first-child):not(:where([class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child):not(:where([class~=not-prose] *)){padding-right:0}.prose>:where(:first-child):not(:where([class~=not-prose] *)){margin-top:0}.prose>:where(:last-child):not(:where([class~=not-prose] *)){margin-bottom:0}.fixed{position:fixed}.absolute{position:absolute}.top-0{top:0}.left-0{left:0}.z-30{z-index:30}.z-20{z-index:20}.m-2{margin:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mt-8{margin-top:2rem}.mt-4{margin-top:1rem}.mb-8{margin-bottom:2rem}.mt-auto{margin-top:auto}.mb-4{margin-bottom:1rem}.block{display:block}.flex{display:flex}.list-item{display:list-item}.hidden{display:none}.h-16{height:4rem}.h-screen{height:100vh}.h-full{height:100%}.min-h-screen{min-height:100vh}.min-h-\[75vh\]{min-height:75vh}.w-screen{width:100vw}.w-64{width:16rem}.w-full{width:100%}.w-fit{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.max-w-7xl{max-width:80rem}.max-w-5xl{max-width:64rem}.max-w-3xl{max-width:48rem}.max-w-xl{max-width:36rem}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.rounded{border-radius:.25rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-purple-700{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity))}.p-4{padding:1rem}.p-8{padding:2rem}.py-16{padding-top:4rem;padding-bottom:4rem}.px-8{padding-left:2rem;padding-right:2rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pt-32{padding-top:8rem}.text-left{text-align:left}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-6xl{font-size:3.75rem;line-height:1}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-black{font-weight:900}.font-normal{font-weight:400}.font-extrabold{font-weight:800}.leading-relaxed{line-height:1.625}.leading-7{line-height:1.75rem}.leading-8{line-height:2rem}.leading-10{line-height:2.5rem}.tracking-tight{letter-spacing:-.025em}.text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.transition{transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:bg-purple-700:hover{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity))}.hover\:bg-purple-900:hover{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:underline:hover{-webkit-text-decoration-line:underline;text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-4:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-purple-900:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(88 28 135/var(--tw-ring-opacity))}.focus\:ring-opacity-75:focus{--tw-ring-opacity:0.75}@media (min-width:640px){.sm\:leading-none{line-height:1}.sm\:shadow-xl{--tw-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}}@media (min-width:768px){.md\:absolute{position:absolute}.md\:left-72{left:18rem}.md\:mt-0{margin-top:0}.md\:mb-12{margin-bottom:3rem}.md\:flex{display:flex}.md\:hidden{display:none}.md\:text-center{text-align:center}.md\:text-7xl{font-size:4.5rem;line-height:1}.md\:text-4xl{font-size:2.25rem}.md\:leading-10,.md\:text-4xl{line-height:2.5rem}.md\:shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}}@media (min-width:1024px){.lg\:mt-8{margin-top:2rem}.lg\:mb-12{margin-bottom:3rem}.lg\:pt-44{padding-top:11rem}.lg\:text-5xl{font-size:3rem;line-height:1}}@media (min-width:1280px){.xl\:left-80{left:20rem}.xl\:mb-16{margin-bottom:4rem}} \ No newline at end of file +/*! tailwindcss v3.0.23 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where([class~=lead]):not(:where([class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose] *)){color:#6366f1;text-decoration:none;font-weight:500}.prose :where(a):not(:where([class~=not-prose] *)):hover{color:#4338ca}.prose :where(strong):not(:where([class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(ol):not(:where([class~=not-prose] *)){list-style-type:decimal;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose] *)){list-style-type:disc;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(hr):not(:where([class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose] *)){font-weight:500;font-style:unset;color:#1f2937;border-left-width:.25rem;border-left-color:#d1d5db;quotes:"\201C""\201D""\2018""\2019";margin-top:1em;margin-bottom:1em;padding-left:.75em;background-color:#80808020;line-height:1.25em;padding-top:.25em;padding-bottom:.25em}.prose :where(blockquote):not(:where([class~=not-prose] *)) p{padding-right:.25em;margin-top:.25em;margin-bottom:.25em}.prose :where(blockquote):not(:where([class~=not-prose] *)) p:before{content:unset}.prose :where(blockquote):not(:where([class~=not-prose] *)) p:after{content:unset}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose] *)){font-weight:900}.prose :where(h2):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:1.5em;margin-bottom:.75em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose] *)){font-weight:800}.prose :where(h3):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose] *)){font-weight:700}.prose :where(h4):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose] *)){font-weight:700}.prose :where(figure>*):not(:where([class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose :where(code):not(:where([class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em;font:unset;background-color:#80808033;padding-left:4px;padding-right:4px;margin-left:-2px;margin-right:1px;border-radius:4px;white-space:pre}.prose :where(code):not(:where([class~=not-prose] *)):before{content:unset}.prose :where(code):not(:where([class~=not-prose] *)):after{content:unset}.prose :where(a code):not(:where([class~=not-prose] *)){color:var(--tw-prose-links)}.prose :where(pre):not(:where([class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre):not(:where([class~=not-prose] *)) code{font-family:Fira Code Regular,Consolas,Monospace,Courier New}.prose :where(pre code):not(:where([class~=not-prose] *)){background-color:initial;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose] *)){vertical-align:initial;padding:.5714286em}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.5em}.prose :where(p):not(:where([class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(img):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(figure):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(h2 code):not(:where([class~=not-prose] *)){font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose] *)){font-size:.9em}.prose :where(li):not(:where([class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose] *)){padding-left:.375em}.prose>:where(ul>li p):not(:where([class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose>:where(ul>li>:first-child):not(:where([class~=not-prose] *)){margin-top:1.25em}.prose>:where(ul>li>:last-child):not(:where([class~=not-prose] *)){margin-bottom:1.25em}.prose>:where(ol>li>:first-child):not(:where([class~=not-prose] *)){margin-top:1.25em}.prose>:where(ol>li>:last-child):not(:where([class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(hr+*):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose] *)){padding-right:0}.prose :where(tbody td:first-child):not(:where([class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child):not(:where([class~=not-prose] *)){padding-right:0}.prose>:where(:first-child):not(:where([class~=not-prose] *)){margin-top:0}.prose>:where(:last-child):not(:where([class~=not-prose] *)){margin-bottom:0}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.left-0{left:0}.z-20{z-index:20}.z-30{z-index:30}.m-8{margin:2rem}.m-2{margin:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-8{margin-bottom:2rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.mt-8{margin-top:2rem}.mb-4{margin-bottom:1rem}.block{display:block}.flex{display:flex}.contents{display:contents}.list-item{display:list-item}.hidden{display:none}.h-1{height:.25rem}.h-16{height:4rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.min-h-\[75vh\]{min-height:75vh}.w-16{width:4rem}.w-full{width:100%}.w-screen{width:100vw}.w-64{width:16rem}.w-fit{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.max-w-sm{max-width:24rem}.max-w-3xl{max-width:48rem}.max-w-7xl{max-width:80rem}.max-w-xl{max-width:36rem}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.rounded-lg{border-radius:.5rem}.rounded{border-radius:.25rem}.border-2{border-width:2px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-purple-700{--tw-border-opacity:1;border-color:rgb(126 34 206/var(--tw-border-opacity))}.bg-transparent{background-color:initial}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.bg-cover{background-size:cover}.bg-no-repeat{background-repeat:no-repeat}.p-4{padding:1rem}.p-8{padding:2rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.px-8{padding-left:2rem;padding-right:2rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-20{padding-bottom:5rem}.pt-32{padding-top:8rem}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.font-light{font-weight:300}.font-bold{font-weight:700}.font-black{font-weight:900}.font-normal{font-weight:400}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.leading-normal{line-height:1.5}.leading-7{line-height:1.75rem}.leading-8{line-height:2rem}.leading-10{line-height:2.5rem}.leading-relaxed{line-height:1.625}.tracking-wide{letter-spacing:.025em}.tracking-tight{letter-spacing:-.025em}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity:1;color:rgb(126 34 206/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:bg-purple-700:hover{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity))}.hover\:bg-purple-900:hover{--tw-bg-opacity:1;background-color:rgb(88 28 135/var(--tw-bg-opacity))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:underline:hover{-webkit-text-decoration-line:underline;text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-4:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-purple-900:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(88 28 135/var(--tw-ring-opacity))}.focus\:ring-opacity-75:focus{--tw-ring-opacity:0.75}@media (min-width:640px){.sm\:leading-none{line-height:1}.sm\:shadow-xl{--tw-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}}@media (min-width:768px){.md\:absolute{position:absolute}.md\:left-72{left:18rem}.md\:my-6{margin-top:1.5rem;margin-bottom:1.5rem}.md\:mb-12{margin-bottom:3rem}.md\:mt-0{margin-top:0}.md\:flex{display:flex}.md\:hidden{display:none}.md\:min-h-screen{min-height:100vh}.md\:w-1\/2{width:50%}.md\:bg-left{background-position:0}.md\:pb-0{padding-bottom:0}.md\:text-center{text-align:center}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\:text-7xl{font-size:4.5rem;line-height:1}.md\:text-4xl{font-size:2.25rem}.md\:leading-10,.md\:text-4xl{line-height:2.5rem}.md\:shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}}@media (min-width:1024px){.lg\:mt-8{margin-top:2rem}.lg\:mb-12{margin-bottom:3rem}.lg\:bg-center{background-position:50%}.lg\:pt-44{padding-top:11rem}.lg\:text-5xl{font-size:3rem;line-height:1}}@media (min-width:1280px){.xl\:left-80{left:20rem}.xl\:mb-16{margin-bottom:4rem}} \ No newline at end of file diff --git a/app/Actions/ConvertsArrayToFrontMatter.php b/app/Actions/ConvertsArrayToFrontMatter.php deleted file mode 100644 index 7980436..0000000 --- a/app/Actions/ConvertsArrayToFrontMatter.php +++ /dev/null @@ -1,27 +0,0 @@ - $value) { - $yaml[] = "$key: $value"; - } - - $yaml[] = '---'; - $yaml[] = ''; - return implode("\n", $yaml); - } -} diff --git a/app/Actions/ConvertsFooterMarkdown.php b/app/Actions/ConvertsFooterMarkdown.php deleted file mode 100644 index 31b1718..0000000 --- a/app/Actions/ConvertsFooterMarkdown.php +++ /dev/null @@ -1,20 +0,0 @@ -requiredDirectories as $directory) { - // Does the directory exist? // Otherwise, create it. - realpath("./$directory") || mkdir(realpath('.') . "/$directory"); - } - } - - #[Pure] public static function getRequiredDirectories(): array - { - return (new CreatesDefaultDirectories)->requiredDirectories; - } -} diff --git a/app/Actions/CreatesNewMarkdownPostFile.php b/app/Actions/CreatesNewMarkdownPostFile.php deleted file mode 100644 index 1bbea20..0000000 --- a/app/Actions/CreatesNewMarkdownPostFile.php +++ /dev/null @@ -1,72 +0,0 @@ -title = $title ?? 'My Awesome Blog Post'; - $this->description = $description ?? 'A short description used in previews and SEO'; - $this->category = $category ?? 'blog'; - $this->author = $author ?? 'Mr. Hyde'; - if ($date === null) { - $this->date = date('Y-m-d H:i'); - } - if ($slug === null) { - $this->slug = Str::slug($title) ; - } - } - - /** - * Save the class object to a Markdown file. - * - * @todo Remove the slug key from the generated front matter as it is not parsed - * - * @param bool $force Should the file be created even if a file with the same path already exists? - * @return string|false Returns the path to the file if successful, or false if the file could not be saved. - * @throws Exception if a file with the same slug already exists and the force flag is not set. - */ - public function save(bool $force = false): string|false - { - $path = realpath('./_posts') . DIRECTORY_SEPARATOR . "$this->slug.md"; - - if ($force !== true && file_exists($path)) { - throw new Exception("File at $path already exists! ", 409); - } - - $arrayWithoutSlug = ((array) $this); - - unset($arrayWithoutSlug['slug']); - - $contents = (new ConvertsArrayToFrontMatter)->execute($arrayWithoutSlug) . "\n## Write something awesome.\n\n"; - - return file_put_contents($path, $contents) ? $path : false; - } -} diff --git a/app/Actions/GeneratesDocumentationSidebar.php b/app/Actions/GeneratesDocumentationSidebar.php deleted file mode 100644 index aa475f9..0000000 --- a/app/Actions/GeneratesDocumentationSidebar.php +++ /dev/null @@ -1,57 +0,0 @@ - $value) { - $orderArray[$key] = Str::slug($value); - } - - $array = []; - - foreach (CollectionService::getSourceSlugsOfModels(DocumentationPage::class) as $slug) { - if ($slug == 'index') { - continue; - } - - $order = array_search($slug, $orderArray); - - if ($order === false) { - $order = 999; - } - - $array[] = [ - 'slug' => $slug, - 'title' => Str::title(str_replace('-', ' ', $slug)), - 'active' => 'docs/' . $slug == $current, - 'order' => $order, - ]; - } - - krsort($array); - - usort($array, function ($a, $b) { - return $a['order'] <=> $b['order']; - }); - - return $array; - } -} diff --git a/app/Actions/GeneratesNavigationMenu.php b/app/Actions/GeneratesNavigationMenu.php deleted file mode 100644 index a6dfcd4..0000000 --- a/app/Actions/GeneratesNavigationMenu.php +++ /dev/null @@ -1,187 +0,0 @@ -currentPage = $currentPage; - - $this->links = $this->getLinks(); - } - - /** - * Create the link array - * - * @todo Cache the base array and only update the 'current' attribute on each request. - * - * @return array - */ - private function getLinks(): array - { - $links = $this->getLinksFromConfig(); - - // Automatically add top level pages - foreach ($this->getListOfCustomPages() as $slug) { - $title = $this->getTitleFromSlug($slug); - // Only add the automatic link if it is not present in the config array - if (!in_array($title, array_column($links, 'title'))) { - $links[] = [ - 'title' => $title, - 'route' => $this->getRelativeRoutePathForSlug($slug), - 'current' => $this->currentPage == $slug, - 'priority' => $slug == "index" ? 100 : 999, - ]; - } - } - - // Add extra links - - // If the documentation feature is enabled... - if (Features::hasDocumentationPages()) { - // And there is no link to the docs... - if (!in_array('Docs', array_column($links, 'title'))) { - // But a suitable file exists... - if (file_exists('_docs/index.md') || file_exists('_docs/readme.md')) { - // Then we can add a link. - $links[] = [ - 'title' => 'Docs', - 'route' => $this->getRelativeRoutePathForSlug( - file_exists('_docs/index.md') ? 'docs/index' : 'docs/readme' - ), - 'current' => false, - 'priority' => 500, - ]; - } - } - } - - // Remove config defined blacklisted links - foreach ($links as $key => $link) { - if (in_array(Str::slug($link['title']), config('hyde.navigationMenuBlacklist', []))) { - unset($links[$key]); - } - } - - // Sort - - $columns = array_column($links, 'priority'); - array_multisort($columns, SORT_ASC, $links); - - return $links; - } - - /** - * Get the custom navigation links from the config, if there are any - * @return array - */ - private function getLinksFromConfig(): array - { - $configLinks = config('hyde.navigationMenuLinks', []); - - $links = []; - - if (sizeof($configLinks) > 0) { - foreach ($configLinks as $link) { - $links[] = [ - 'title' => $link['title'], - 'route' => $link['destination'] ?? $this->getRelativeRoutePathForSlug($link['slug']), - 'current' => isset($link['slug']) ? $this->currentPage == $link['slug'] : false, - 'priority' => $link['priority'] ?? 999, - ]; - } - } - - return $links; - } - - /** - * Get the page title - * - * @todo fetch this from the front matter - * - * @param string $slug - * @return string - */ - public function getTitleFromSlug(string $slug): string - { - if ($slug == "index") { - return "Home"; - } - return Str::title(str_replace('-', ' ', $slug)); - } - - /** - * Get a list of all the top level pages - * @return array - */ - private function getListOfCustomPages(): array - { - $array = []; - - foreach (glob(base_path('resources/views/pages/*.blade.php')) as $path) { - $array[] = basename($path, '.blade.php'); - } - - return array_unique(array_merge($array, array_keys(MarkdownPage::allAsArray()))); - } - - /** - * Inject the proper number of `../` before the links - * @param string $slug - * @return string - */ - private function getRelativeRoutePathForSlug(string $slug): string - { - $nestCount = substr_count($this->currentPage, '/'); - $route = ""; - if ($nestCount > 0) { - $route .= str_repeat('../', $nestCount); - } - $route .= $slug . '.html'; - return $route; - } - - /** - * Static helper to get the array of navigation links - * @param string $currentPage - * @return array - */ - public static function getNavigationLinks(string $currentPage = 'index'): array - { - $generator = new self($currentPage); - return $generator->links; - } -} diff --git a/app/Commands/.gitkeep b/app/Commands/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/app/Commands/BuildStaticSiteCommand.php b/app/Commands/BuildStaticSiteCommand.php deleted file mode 100644 index cc41321..0000000 --- a/app/Commands/BuildStaticSiteCommand.php +++ /dev/null @@ -1,127 +0,0 @@ -getOutput()->isVeryVerbose()) { - $this->newLine(); - $this->line("Created {$output['createdFileSize']} byte file {$output['createdFilePath']}"); - $this->newLine(); - } - } - - /** - * Execute the console command. - * - * @return int - * @throws Exception - */ - public function handle(): int - { - $time_start = microtime(true); - - $this->title('Building your static site!'); - - if ($this->getOutput()->isVeryVerbose()) { - $this->warn('Running with high verbosity'); - } - - $this->line('Transferring Media Assets...'); - $files = realpath('_media') . DIRECTORY_SEPARATOR . ("*.{png,svg,jpg,jpeg,gif,ico}"); - $this->withProgressBar(glob($files, GLOB_BRACE), function ($filepath) { - if ($this->getOutput()->isVeryVerbose()) { - $this->line(' > Copying media file ' . basename($filepath) . ' to the output media directory'); - } - copy($filepath, realpath('_site/media') . DIRECTORY_SEPARATOR . basename($filepath)); - }); - - if (Features::hasBlogPosts()) { - $this->newLine(2); - $this->line('Creating Markdown Posts...'); - $this->withProgressBar(CollectionService::getSourceSlugsOfModels(MarkdownPost::class), function ($slug) { - $this->debug((new StaticPageBuilder((new MarkdownPostParser($slug))->get(), true))->getDebugOutput()); - }); - } - - if (Features::hasMarkdownPages()) { - $this->newLine(2); - $this->line('Creating Markdown Pages...'); - $this->withProgressBar(CollectionService::getSourceSlugsOfModels(MarkdownPage::class), function ($slug) { - $this->debug((new StaticPageBuilder((new MarkdownPageParser($slug))->get(), true))->getDebugOutput()); - }); - } - - if (Features::hasDocumentationPages()) { - $this->newLine(2); - $this->line('Creating Documentation Pages...'); - $this->withProgressBar(CollectionService::getSourceSlugsOfModels(DocumentationPage::class), function ($slug) { - $this->debug((new StaticPageBuilder((new DocumentationPageParser($slug))->get(), true))->getDebugOutput()); - }); - } - - if (Features::hasBladePages()) { - $this->newLine(2); - $this->line('Creating Blade Pages...'); - $this->withProgressBar(CollectionService::getSourceSlugsOfModels(BladePage::class), function ($slug) { - $this->debug((new StaticPageBuilder((new BladePage($slug)), true))->getDebugOutput()); - }); - } - - $this->newLine(2); - - if ($this->option('pretty')) { - $this->info('Prettifying code! This may take a second.'); - try { - $this->line(shell_exec('npx prettier _site/ --write')); - } catch (Exception) { - $this->warn('Could not prettify code! Is NPM installed?'); - } - } - - $time_end = microtime(true); - $execution_time = ($time_end - $time_start); - $this->info('All done! Finished in ' . number_format( - $execution_time, - 2 - ) .' seconds. (' . number_format(($execution_time * 1000), 2) . 'ms)'); - - $this->info('Congratulations! 🎉 Your static site has been built!'); - $this->info(sprintf( - "Your new homepage is stored here -> %s", - base_path('_site' . DIRECTORY_SEPARATOR . 'index.html') - )); - - return 0; - } -} diff --git a/app/Commands/Debug.php b/app/Commands/Debug.php deleted file mode 100644 index a9695ef..0000000 --- a/app/Commands/Debug.php +++ /dev/null @@ -1,42 +0,0 @@ -info('HydePHP Debug Screen'); - - $this->newLine(); - - $this->line('Enabled features:'); - foreach (config('hyde.features') as $feature) { - $this->line(" - $feature"); - } - - return 0; - } -} diff --git a/app/Commands/InspireCommand.php b/app/Commands/InspireCommand.php deleted file mode 100644 index cb91f57..0000000 --- a/app/Commands/InspireCommand.php +++ /dev/null @@ -1,52 +0,0 @@ - -
Laravel Zero
- - Simplicity is the ultimate sophistication. - - - HTML); - } - - /** - * Define the command's schedule. - * - * @param \Illuminate\Console\Scheduling\Schedule $schedule - * @return void - */ - public function schedule(Schedule $schedule) - { - // $schedule->command(static::class)->everyMinute(); - } -} diff --git a/app/Commands/MakePostCommand.php b/app/Commands/MakePostCommand.php deleted file mode 100644 index 93ca1dc..0000000 --- a/app/Commands/MakePostCommand.php +++ /dev/null @@ -1,81 +0,0 @@ -title('Creating a new post!'); - - $this->line('Please enter the title of the post, it will be used to generate the slug.'); - $title = $this->ask('What is the title of the post?') ?? 'My New Post'; - - $this->line('Tip: You can just hit return to use the defaults.'); - $description = $this->ask('Write a short post excerpt/description'); - $author = $this->ask('What is your (the author\'s) name?'); - $category = $this->ask('What is the primary category of the post?'); - - $this->info('Creating a post with the following details:'); - $creator = new CreatesNewMarkdownPostFile( - title: $title, - description: $description, - category: $category, - author: $author - ); - - $this->line("Title: $creator->title"); - $this->line("Description: $creator->description"); - $this->line("Author: $creator->author"); - $this->line("Category: $creator->category"); - $this->line("Date: $creator->date"); - $this->line("Slug: $creator->slug"); - - if (!$this->confirm('Do you wish to continue?', true)) { - $this->info('Aborting.'); - return 0; - } - - try { - if ($path = $creator->save($this->option('force'))) { - $this->info("Post created! File is saved to $path"); - return 0; - } else { - $this->error('Something went wrong when trying to save the file!'); - return 1; - } - } catch (Exception $exception) { - $this->error('Something went wrong when trying to save the file!'); - $this->warn($exception->getMessage()); - if ($exception->getCode() === 409) { - $this->comment('If you want to overwrite the file supply the --force flag.'); - return 409; - } - return 1; - } - } -} diff --git a/app/Commands/MakeValidatorCommand.php b/app/Commands/MakeValidatorCommand.php deleted file mode 100644 index a1c3cdb..0000000 --- a/app/Commands/MakeValidatorCommand.php +++ /dev/null @@ -1,58 +0,0 @@ -info('Creating new Validation Test!'); - $name = $this->option('name') ?? $this->ask('What does the validator do?'); - $testName = strtolower($name); - $slug = str_replace(' ', '', Str::title($name)) . 'Test.php'; - - $content = - "group('validators'); -"; - - $path = realpath('tests/Validators') . DIRECTORY_SEPARATOR . $slug; - - if (file_exists($path) && !$this->option('force')) { - $this->error('Validator already exists!'); - return 409; - } - - - file_put_contents($path, $content); - - $this->line("Created file $path"); - - return 0; - } -} diff --git a/app/Commands/Publish404PageCommand.php b/app/Commands/Publish404PageCommand.php deleted file mode 100644 index 56f1b75..0000000 --- a/app/Commands/Publish404PageCommand.php +++ /dev/null @@ -1,64 +0,0 @@ -option('type') ?? $this->choice( - 'Which type of view would you like to publish?', - ['Blade', 'Markdown'], - 0 - ); - - $type = strtolower($type); - - if (!in_array($type, ['blade', 'markdown'])) { - $this->error('Type `'.$type.'` is not valid. It must be either `blade` or `markdown`'); - return 400; - } - - if ($type === 'blade') { - $source = realpath('src/resources/stubs') . DIRECTORY_SEPARATOR . '404.blade.php'; - $path = realpath('resources/views/pages') . DIRECTORY_SEPARATOR . '404.blade.php'; - } - - if ($type === 'markdown') { - $source = realpath('src/resources/stubs') . DIRECTORY_SEPARATOR . '404.md'; - $path = realpath('_pages') . DIRECTORY_SEPARATOR . '404.md'; - } - - if (file_exists($path) && !$this->option('force')) { - $this->error("File $path already exists!"); - return 409; - } - - copy($source, $path); - - $this->info("Created file $path!"); - return 0; - } - -} diff --git a/app/Commands/Validate.php b/app/Commands/Validate.php deleted file mode 100644 index dd411bf..0000000 --- a/app/Commands/Validate.php +++ /dev/null @@ -1,37 +0,0 @@ -info('Running validation tests!'); - - $this->line(shell_exec(realpath('./vendor/bin/pest') . ' --group=validators')); - - $this->info('All done!'); - } -} diff --git a/app/Hyde/Actions/GetMarkdownPostList.php b/app/Hyde/Actions/GetMarkdownPostList.php deleted file mode 100644 index 8996bb3..0000000 --- a/app/Hyde/Actions/GetMarkdownPostList.php +++ /dev/null @@ -1,24 +0,0 @@ -getEnvironment()->addExtension(new GithubFlavoredMarkdownExtension()); - - if (Hyde::hasTorchlight()) { - $converter->getEnvironment()->addExtension(new TorchlightExtension()); - } - - $html = $converter->convert($markdown); - - if (Hyde::hasTorchlight() - && config('torchlight.attribution', true) - && str_contains($html, 'Syntax highlighted by torchlight.dev')) { - $html .= file_get_contents(realpath('src/resources/stubs') . DIRECTORY_SEPARATOR . 'torchlight-badge.html'); - } - - return $html; - } -} diff --git a/app/Hyde/Docgen/HydeDocgen.php b/app/Hyde/Docgen/HydeDocgen.php deleted file mode 100644 index 98e80e2..0000000 --- a/app/Hyde/Docgen/HydeDocgen.php +++ /dev/null @@ -1,13 +0,0 @@ -filepath = realpath('./_docs') . "/$slug.md"; - if (!file_exists($this->filepath)) { - throw new Exception("File _docs/$slug.md not found.", 404); - } - - $this->execute(); - } - - /** - * Handle the parsing job. - * @return void - */ - #[NoReturn] - public function execute(): void - { - // Get the text stream from the markdown file - $stream = file_get_contents($this->filepath); - - $this->title = $this->findTitleTag($stream) ?? Str::title(str_replace('-', ' ', $this->slug)); - - $this->body = $stream; - } - - /** - * Attempt to find the title based on the first H1 tag - */ - public function findTitleTag(string $stream): string|false - { - $lines = explode("\n", $stream); - - foreach ($lines as $line) { - if (str_starts_with($line, '# ')) { - return substr($line, 2); - } - } - - return false; - } - - /** - * Get the Documentation Page Object. - * @return DocumentationPage - */ - #[Pure] - public function get(): DocumentationPage - { - return new DocumentationPage($this->slug, $this->title, $this->body); - } -} diff --git a/app/Hyde/Features.php b/app/Hyde/Features.php deleted file mode 100644 index 1ddae8c..0000000 --- a/app/Hyde/Features.php +++ /dev/null @@ -1,106 +0,0 @@ -filepath = realpath('./_pages') . "/$slug.md"; - if (!file_exists($this->filepath)) { - throw new Exception("File _pages/$slug.md not found.", 404); - } - - $this->execute(); - } - - /** - * Handle the parsing job. - * @return void - */ - #[NoReturn] - public function execute(): void - { - // Get the text stream from the markdown file - $stream = file_get_contents($this->filepath); - - // Split out the front matter and markdown - $split = $this->split($stream); - - $this->matter = array_merge($this->parseFrontMatter($split['matter']), [ - 'slug' => $this->slug // Make sure to use the filename as the slug and not any potential override - ]); - - // Implode the line array back into a markdown string - $this->body = implode("\n", $split['markdown']); - } - - /** - * Split the front matter from the markdown. - * @param string $stream - * @return array - */ - #[ArrayShape(['matter' => "array", 'markdown' => "array"])] - public function split(string $stream): array - { - $lines = explode("\n", $stream); - - // Find the start and end position of the YAML block. - // Note that unless something is wrong with the file the start index should always be 0. - $matterSectionIndex = []; - foreach ($lines as $lineNumber => $lineContents) { - if (str_starts_with($lineContents, '---')) { - if (sizeof($matterSectionIndex) === 0) { - $matterSectionIndex['start'] = $lineNumber; - } elseif (sizeof($matterSectionIndex) === 1) { - $matterSectionIndex['end'] = $lineNumber; - break; - } - } - } - - // If the start and end tags don't exist, the file probably does not have any front matter. - if (!isset($matterSectionIndex['start']) && !isset($matterSectionIndex['end'])) { - throw new Exception("File _pages/$this->slug.md is missing front matter.", 400); - } - - // Construct the new line arrays - $matter = []; - $markdown = []; - foreach ($lines as $lineNumber => $lineContents) { - if ($lineNumber <= $matterSectionIndex['end']) { - $matter[] = $lineContents; - } else { - $markdown[] = $lineContents; - } - } - - // Remove the dashes - unset($matter[$matterSectionIndex['start']]); - unset($matter[$matterSectionIndex['end']]); - - return [ - 'matter' => $matter, - 'markdown' => $markdown, - ]; - } - - /** - * Parse lines of Front Matter YAML into an associative array. - * @param array $lines - * @return array - */ - public function parseFrontMatter(array $lines): array - { - $matter = []; - foreach ($lines as $line) { - $array = (explode(': ', $line, 2)); - $matter[$array[0]] = $array[1]; - } - return $matter; - } - - /** - * Get the Markdown Page Object. - * @return MarkdownPage - */ - #[Pure] - public function get(): MarkdownPage - { - return new MarkdownPage($this->slug, $this->matter['title'], $this->body); - } -} diff --git a/app/Hyde/MarkdownPostParser.php b/app/Hyde/MarkdownPostParser.php deleted file mode 100644 index db27d21..0000000 --- a/app/Hyde/MarkdownPostParser.php +++ /dev/null @@ -1,161 +0,0 @@ -filepath = realpath('./_posts') . "/$slug.md"; - if (!file_exists($this->filepath)) { - throw new Exception("File _posts/$slug.md not found.", 404); - } - - $this->execute(); - } - - /** - * Handle the parsing job. - * @return void - */ - #[NoReturn] - public function execute(): void - { - // Get the text stream from the markdown file - $stream = file_get_contents($this->filepath); - - // Split out the front matter and markdown - $split = $this->split($stream); - - $this->matter = array_merge($this->parseFrontMatter($split['matter']), [ - 'slug' => $this->slug // Make sure to use the filename as the slug and not any potential override - ]); - - // Implode the line array back into a markdown string - $this->body = implode("\n", $split['markdown']); - } - - /** - * Split the front matter from the markdown. - * @param string $stream - * @return array - */ - #[ArrayShape(['matter' => "array", 'markdown' => "array"])] - public function split(string $stream): array - { - $lines = explode("\n", $stream); - - // Find the start and end position of the YAML block. - // Note that unless something is wrong with the file the start index should always be 0. - $matterSectionIndex = []; - foreach ($lines as $lineNumber => $lineContents) { - if (str_starts_with($lineContents, '---')) { - if (sizeof($matterSectionIndex) === 0) { - $matterSectionIndex['start'] = $lineNumber; - } elseif (sizeof($matterSectionIndex) === 1) { - $matterSectionIndex['end'] = $lineNumber; - break; - } - } - } - - // Construct the new line arrays - $matter = []; - $markdown = []; - foreach ($lines as $lineNumber => $lineContents) { - if ($lineNumber <= $matterSectionIndex['end']) { - $matter[] = $lineContents; - } else { - $markdown[] = $lineContents; - } - } - - // Remove the dashes - unset($matter[$matterSectionIndex['start']]); - unset($matter[$matterSectionIndex['end']]); - - return [ - 'matter' => $matter, - 'markdown' => $markdown, - ]; - } - - /** - * Parse lines of Front Matter YAML into an associative array. - * @param array $lines - * @return array - */ - public function parseFrontMatter(array $lines): array - { - $matter = []; - foreach ($lines as $line) { - if (!str_contains($line, ':')) { - continue; // The front matter is invalid, so we skip the line. - } - - // Separate the key from the value - $array = (explode(': ', $line, 2)); - - // Assign the split values into variables so it's easier to keep track of them. - $key = $array[0]; - $value = $array[1]; - - // Filter the value to ensure a predictable state - - // Remove quotes while allowing quotes within the actual text - if (str_starts_with($value, '"') && str_ends_with($value, '"')) { - $value = substr($value, 1); - $value = substr($value, 0, -1); - } - - // Trim trailing whitespace - $value = trim($value, ' '); - - $matter[$key] = $value; - } - return $matter; - } - - /** - * Get the Markdown Post Object. - * @return MarkdownPost - */ - #[Pure] - public function get(): MarkdownPost - { - return new MarkdownPost($this->matter, $this->body, $this->slug); - } -} diff --git a/app/Hyde/Models/BladePage.php b/app/Hyde/Models/BladePage.php deleted file mode 100644 index ca2501d..0000000 --- a/app/Hyde/Models/BladePage.php +++ /dev/null @@ -1,27 +0,0 @@ -view = $view; - } -} diff --git a/app/Hyde/Models/DocumentationPage.php b/app/Hyde/Models/DocumentationPage.php deleted file mode 100644 index 2a1a287..0000000 --- a/app/Hyde/Models/DocumentationPage.php +++ /dev/null @@ -1,56 +0,0 @@ -slug = $slug; - $this->title = $title; - $this->content = $content; - } - - /** - * Get an array of all the available Markdown Pages - * @return array - */ - public static function allAsArray(): array - { - $array = []; - - foreach (glob(base_path('_docs/*.md')) as $filepath) { - $array[basename($filepath, '.md')] = $filepath; - } - - return $array; - } -} diff --git a/app/Hyde/Models/MarkdownPage.php b/app/Hyde/Models/MarkdownPage.php deleted file mode 100644 index 7c38187..0000000 --- a/app/Hyde/Models/MarkdownPage.php +++ /dev/null @@ -1,57 +0,0 @@ -slug = $slug; - $this->title = $title; - $this->content = $content; - } - - - /** - * Get an array of all the available Markdown Pages - * @return array - */ - public static function allAsArray(): array - { - $array = []; - - foreach (glob(base_path('_pages/*.md')) as $filepath) { - $array[basename($filepath, '.md')] = $filepath; - } - - return $array; - } -} diff --git a/app/Hyde/Models/MarkdownPost.php b/app/Hyde/Models/MarkdownPost.php deleted file mode 100644 index 7f653e6..0000000 --- a/app/Hyde/Models/MarkdownPost.php +++ /dev/null @@ -1,59 +0,0 @@ -matter = $matter; - $this->body = $body; - $this->slug = $slug; - } - - /** - * Get a Laravel Collection of all Posts as MarkdownPost objects. - * @return Collection - */ - public static function getCollection(): Collection - { - $collection = new Collection(); - - foreach (glob(base_path('_posts/*.md')) as $filepath) { - $collection->push((new MarkdownPostParser(basename($filepath, '.md')))->get()); - } - - return $collection->sortByDesc('matter.date'); - } -} diff --git a/app/Hyde/Services/CollectionService.php b/app/Hyde/Services/CollectionService.php deleted file mode 100644 index eb27221..0000000 --- a/app/Hyde/Services/CollectionService.php +++ /dev/null @@ -1,102 +0,0 @@ - 'path.md'] - * @param string $model - * @return array|false array on success, false if the class was not found - */ - public static function getSourceSlugsOfModels(string $model): array|false - { - if ($model == BladePage::class) { - return self::getBladePageList(); - } - - if ($model == MarkdownPage::class) { - return self::getMarkdownPageList(); - } - - if ($model == MarkdownPost::class) { - return self::getMarkdownPostList(); - } - - if ($model == DocumentationPage::class) { - return self::getDocumentationPageList(); - } - - return false; - } - - /** - * Get all the Blade files in the resources/views/pages directory. - * @return array - */ - public static function getBladePageList(): array - { - $array = []; - - foreach (glob(base_path('resources/views/pages/*.blade.php')) as $filepath) { - $array[] = basename($filepath, '.blade.php'); - } - - return $array; - } - - /** - * Get all the Markdown files in the _pages directory. - * @return array - */ - public static function getMarkdownPageList(): array - { - $array = []; - - foreach (glob(base_path('_pages/*.md')) as $filepath) { - $array[] = basename($filepath, '.md'); - } - - return $array; - } - - /** - * Get all the Markdown files in the _posts directory. - * @return array - */ - public static function getMarkdownPostList(): array - { - $array = []; - - foreach (glob(base_path('_posts/*.md')) as $filepath) { - $array[] = basename($filepath, '.md'); - } - - return $array; - } - - - /** - * Get all the Markdown files in the _docs directory. - * @return array - */ - public static function getDocumentationPageList(): array - { - $array = []; - - foreach (glob(base_path('_docs/*.md')) as $filepath) { - $array[] = basename($filepath, '.md'); - } - - return $array; - } -} diff --git a/app/Hyde/StaticPageBuilder.php b/app/Hyde/StaticPageBuilder.php deleted file mode 100644 index 72ab765..0000000 --- a/app/Hyde/StaticPageBuilder.php +++ /dev/null @@ -1,145 +0,0 @@ -createdFileSize = $this->__invoke(); - } - } - - /** - * Run the page builder. - * @return bool|int|void - */ - public function __invoke() - { - if ($this->page instanceof MarkdownPost) { - return $this->save('posts/' . $this->page->slug, $this->compilePost()); - } - - if ($this->page instanceof MarkdownPage) { - return $this->save($this->page->slug, $this->compilePage()); - } - - if ($this->page instanceof BladePage) { - return $this->save($this->page->view, $this->compileView()); - } - - if ($this->page instanceof DocumentationPage) { - return $this->save('docs/' . $this->page->slug, $this->compileDocs()); - } - } - - /** - * Get the debug data. - * @param bool $relativeFilePath should the returned filepath be relative instead of absolute? - * @return array - */ - #[ArrayShape(['createdFileSize' => "mixed", 'createdFilePath' => "mixed"])] - public function getDebugOutput(bool $relativeFilePath = true): array - { - return [ - 'createdFileSize' => $this->createdFileSize, - 'createdFilePath' => $relativeFilePath - ? str_replace(base_path(), '', $this->createdFilePath) - : $this->createdFilePath , - ]; - } - - /** - * Save the compiled HTML to file. - * @param string $location of the output file relative to _site/ - * @param string $contents to save to the file - */ - private function save(string $location, string $contents): bool|int - { - $path = base_path('./_site') . '/' . $location . '.html'; - $this->createdFilePath = $path; - return file_put_contents($path, $contents); - } - - /** - * Compile a Post into HTML using the Blade View. - * @return string - */ - private function compilePost(): string - { - return view('post')->with([ - 'post' => $this->page, - 'title' => $this->page->matter['title'], - 'markdown' => MarkdownConverter::parse($this->page->body), - 'currentPage' => 'posts/' . $this->page->slug - ])->render(); - } - - /** - * Compile a Documentation page into HTML using the Blade View. - * @return string - */ - private function compileDocs(): string - { - return view('docs')->with([ - 'docs' => $this->page, - 'title' => $this->page->title, - 'markdown' => MarkdownConverter::parse($this->page->content), - 'currentPage' => 'docs/' . $this->page->slug - ])->render(); - } - - /** - * Compile a Markdown Page into HTML using the Blade View. - * @return string - */ - private function compilePage(): string - { - return view('page')->with([ - 'title' => $this->page->title, - 'markdown' => MarkdownConverter::parse($this->page->content), - 'currentPage' => $this->page->slug - ])->render(); - } - - - /** - * Compile a custom Blade View into HTML. - * @return string - */ - private function compileView(): string - { - return view('pages/' . $this->page->view, [ - 'currentPage' => $this->page->view - ])->render(); - } -} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index c871f84..ee8ca5b 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -3,7 +3,6 @@ namespace App\Providers; use Illuminate\Support\ServiceProvider; -use App\Actions\CreatesDefaultDirectories; class AppServiceProvider extends ServiceProvider { @@ -24,6 +23,6 @@ public function register() */ public function boot() { - (new CreatesDefaultDirectories)->__invoke(); + // } } diff --git a/app/helpers.php b/app/helpers.php deleted file mode 100644 index 9243a37..0000000 --- a/app/helpers.php +++ /dev/null @@ -1,21 +0,0 @@ - 0) { - $route .= str_repeat('../', $nestCount); - } - $route .= $destination ; - return $route; - } -} diff --git a/composer.json b/composer.json index defec5e..bbe1c8b 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ ], "require": { "php": "^8.0", + "hyde/framework": "v0.4.0-alpha", "illuminate/view": "^9.0", "laminas/laminas-text": "*", "laravel-zero/framework": "^9.0", @@ -32,10 +33,7 @@ "App\\": "app/", "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/" - }, - "files": [ - "app/helpers.php" - ] + } }, "autoload-dev": { "psr-4": { diff --git a/composer.lock b/composer.lock index b6cf7c8..8ae8edb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8c7759320d92abca52b59560b410bf3a", + "content-hash": "cd91e80ec3131f867669a3099489f5a5", "packages": [ { "name": "brick/math", @@ -909,6 +909,49 @@ ], "time": "2022-03-20T21:55:58+00:00" }, + { + "name": "hyde/framework", + "version": "v0.4.0-alpha", + "source": { + "type": "git", + "url": "https://github.com/hydephp/framework.git", + "reference": "445fc758751acd1906bf7692e5c27723e6117495" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hydephp/framework/zipball/445fc758751acd1906bf7692e5c27723e6117495", + "reference": "445fc758751acd1906bf7692e5c27723e6117495", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "suggest": { + "hyde/hyde": "The Framework package contains the Hyde Core. To create your site you should use the Hyde/Hyde project." + }, + "type": "library", + "autoload": { + "psr-4": { + "Hyde\\Framework\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Caen De Silva", + "email": "caen@desilva.se" + } + ], + "description": "The HydePHP Framework", + "support": { + "issues": "https://github.com/hydephp/framework/issues", + "source": "https://github.com/hydephp/framework/tree/v0.4.0-alpha" + }, + "time": "2022-03-22T18:47:45+00:00" + }, { "name": "illuminate/bus", "version": "v9.5.1", diff --git a/config/app.php b/config/app.php index 6414390..8aec1cc 100644 --- a/config/app.php +++ b/config/app.php @@ -70,6 +70,11 @@ 'providers' => [ App\Providers\AppServiceProvider::class, + Hyde\Framework\HydeServiceProvider::class, + ], + + 'aliases' => [ + 'Hyde' => Hyde\Framework\Hyde::class, ], ]; diff --git a/config/commands.php b/config/commands.php index 74860e0..0b2542c 100644 --- a/config/commands.php +++ b/config/commands.php @@ -40,7 +40,14 @@ */ 'add' => [ - // .. + Hyde\Framework\Commands\BuildStaticSiteCommand::class, + Hyde\Framework\Commands\Debug::class, + Hyde\Framework\Commands\InspireCommand::class, + Hyde\Framework\Commands\MakePostCommand::class, + Hyde\Framework\Commands\MakeValidatorCommand::class, + Hyde\Framework\Commands\HydePublishViewsCommand::class, + Hyde\Framework\Commands\HydePublishConfigsCommand::class, + Hyde\Framework\Commands\Validate::class, ], /* @@ -62,8 +69,8 @@ Illuminate\Console\Scheduling\ScheduleListCommand::class, Illuminate\Console\Scheduling\ScheduleFinishCommand::class, LaravelZero\Framework\Commands\StubPublishCommand::class, - App\Commands\MakeValidatorCommand::class, - App\Commands\Debug::class, + Hyde\Framework\Commands\MakeValidatorCommand::class, + Hyde\Framework\Commands\Debug::class, ], /* diff --git a/config/hyde.php b/config/hyde.php index 23b8c76..2fc9776 100644 --- a/config/hyde.php +++ b/config/hyde.php @@ -2,11 +2,11 @@ /* |-------------------------------------------------------------------------- -| __ __ __ ___ __ _____ +| __ __ __ ___ __ _____ | / // /_ _____/ /__ / _ \/ // / _ \ | / _ / // / _ / -_) ___/ _ / ___/ -| /_//_/\_, /\_,_/\__/_/ /_//_/_/ -| /___/ +| /_//_/\_, /\_,_/\__/_/ /_//_/_/ +| /___/ |-------------------------------------------------------------------------- | | Welcome to HydePHP! In this file, you can customize your new Static Site! @@ -17,7 +17,7 @@ | */ -use App\Hyde\Features; +use Hyde\Framework\Features; return [ @@ -60,13 +60,13 @@ | | Most websites have a footer with copyright details and contact information. | You probably want to change the Markdown to include your information, - | though you are of course welcome to keep the attribution link! + | though you are of course welcome to keep the attribution link! | | You can also customize the blade view if you want a more complex footer. | You can disable it completely by setting `enabled` to `false`. | */ - + 'footer' => [ 'enabled' => true, 'markdown' => 'Site built with [HydePHP](https://github.com/hydephp/hyde). @@ -109,7 +109,7 @@ |-------------------------------------------------------------------------- | There may be pages you want to exclude from the automatic navigation menu, | such as error pages. Add their slugs here and they will not be included. - | + | */ 'navigationMenuBlacklist' => [ @@ -127,7 +127,7 @@ | can reorder the page slugs in the list and the links will be sorted | in that order. Link items without an entry here will have fall | back to the default priority of 999, putting them last. - | + | */ 'documentationPageOrder' => [ diff --git a/config/logo.php b/config/logo.php index 75e8840..13bb28a 100644 --- a/config/logo.php +++ b/config/logo.php @@ -39,7 +39,7 @@ */ // 'font' => \LaravelZero\Framework\Components\Logo\FigletString::DEFAULT_FONT, - 'font' => base_path('/src/resources/fonts/smslant.flf'), + 'font' => base_path('vendor/hyde/framework/resources/fonts/smslant.flf'), /* |-------------------------------------------------------------------------- diff --git a/config/torchlight.php b/config/torchlight.php index 5d5e4f6..00e07d2 100644 --- a/config/torchlight.php +++ b/config/torchlight.php @@ -15,8 +15,17 @@ | */ return [ - // Should an attribution badge be automatically injected? - 'attribution' => true, // Default: true + // Should an attribution badge be automatically injected, + // and if so, what (Markdown) text should be used? + 'attribution' => [ + 'enabled' => true, + 'markdown' => ' +

+ + Syntax highlighting by Torchlight.dev + +

' + ], // The Torchlight client caches highlighted code blocks. Here // you can define which cache driver you'd like to use. If diff --git a/config/view.php b/config/view.php index d41f749..1e7310c 100644 --- a/config/view.php +++ b/config/view.php @@ -2,7 +2,7 @@ return [ 'paths' => [ - resource_path('views'), + Hyde\Framework\Hyde::viewPath(), ], 'compiled' => env( diff --git a/package.json b/package.json index 1f27530..e05c58d 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,10 @@ "watch": "concurrently \"npm:watch-livereload\" \"npm:watch-build\" \"npm:watch-sass\" \"npm:watch-tailwind\"", "watch-livereload": "npx browser-sync _site -w", "watch-build": "chokidar ./_posts/*.md ./_docs/*.md ./resources/views/**/*.blade.php -c \"npm run build\"", - "watch-sass": "sass src/resources/sass/app.scss _site/media/app.css -w", - "watch-tailwind": "npx tailwindcss -i ./src/resources/sass/tailwind.scss -o ./_site/media/tailwind.css --watch", - "prod": "sass src/resources/sass/app.scss _site/media/app.css --style=compressed && npx tailwindcss -i ./src/resources/sass/tailwind.scss -o ./_site/media/tailwind.css --minify", - "dev": " sass src/resources/sass/app.scss _site/media/app.css && npx tailwindcss -i ./src/resources/sass/tailwind.scss -o ./_site/media/tailwind.css" + "watch-sass": "sass resources/sass/app.scss _site/media/app.css -w", + "watch-tailwind": "npx tailwindcss -i ./resources/sass/tailwind.scss -o ./_site/media/tailwind.css --watch", + "prod": "sass resources/sass/app.scss _site/media/app.css --style=compressed && npx tailwindcss -i ./resources/sass/tailwind.scss -o ./_site/media/tailwind.css --minify", + "dev": " sass resources/sass/app.scss _site/media/app.css && npx tailwindcss -i ./resources/sass/tailwind.scss -o ./_site/media/tailwind.css" }, "repository": { "type": "git", diff --git a/src/resources/sass/_torchlight.scss b/resources/sass/_torchlight.scss similarity index 100% rename from src/resources/sass/_torchlight.scss rename to resources/sass/_torchlight.scss diff --git a/src/resources/sass/app.scss b/resources/sass/app.scss similarity index 100% rename from src/resources/sass/app.scss rename to resources/sass/app.scss diff --git a/src/resources/sass/tailwind.scss b/resources/sass/tailwind.scss similarity index 100% rename from src/resources/sass/tailwind.scss rename to resources/sass/tailwind.scss diff --git a/resources/views/components/article-excerpt.blade.php b/resources/views/components/article-excerpt.blade.php deleted file mode 100644 index b0c3860..0000000 --- a/resources/views/components/article-excerpt.blade.php +++ /dev/null @@ -1,26 +0,0 @@ -
-
- @isset($post->matter['date']) - - {{ date('M jS, Y', strtotime($post->matter['date'])) }}, - - @endisset - @isset($post->matter['author']) - by - {{ $post->matter['author'] }} - @endisset -
-
- -

{{ $post->matter['title'] }}

-
-
-
-

- @isset($post->matter['description']) - {{ $post->matter['description'] }} - @endisset -

- Read more -
-
\ No newline at end of file diff --git a/resources/views/components/docs/content.blade.php b/resources/views/components/docs/content.blade.php deleted file mode 100644 index ed26c05..0000000 --- a/resources/views/components/docs/content.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -
App\Hyde\Hyde::hasTorchlight()])> -
- {!! $markdown !!} -
-
diff --git a/resources/views/components/docs/navigation.blade.php b/resources/views/components/docs/navigation.blade.php deleted file mode 100644 index eb2e510..0000000 --- a/resources/views/components/docs/navigation.blade.php +++ /dev/null @@ -1,7 +0,0 @@ -
- - {{ config('hyde.name') }} Docs - - - @include('components.docs.sidebar-toggle') -
\ No newline at end of file diff --git a/resources/views/components/docs/sidebar-footer.blade.php b/resources/views/components/docs/sidebar-footer.blade.php deleted file mode 100644 index 9806266..0000000 --- a/resources/views/components/docs/sidebar-footer.blade.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/resources/views/components/docs/sidebar-header.blade.php b/resources/views/components/docs/sidebar-header.blade.php deleted file mode 100644 index 38b086d..0000000 --- a/resources/views/components/docs/sidebar-header.blade.php +++ /dev/null @@ -1,7 +0,0 @@ -
-

- - {{ config('hyde.name') }} Docs - -

-
diff --git a/resources/views/components/docs/sidebar-toggle.blade.php b/resources/views/components/docs/sidebar-toggle.blade.php deleted file mode 100644 index 996e1a0..0000000 --- a/resources/views/components/docs/sidebar-toggle.blade.php +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/resources/views/components/docs/sidebar.blade.php b/resources/views/components/docs/sidebar.blade.php deleted file mode 100644 index f1466e6..0000000 --- a/resources/views/components/docs/sidebar.blade.php +++ /dev/null @@ -1,19 +0,0 @@ -@include('components.docs.sidebar-header') - -@include('components.docs.sidebar-footer') diff --git a/resources/views/components/post/article.blade.php b/resources/views/components/post/article.blade.php deleted file mode 100644 index f4f5f97..0000000 --- a/resources/views/components/post/article.blade.php +++ /dev/null @@ -1,14 +0,0 @@ -
App\Hyde\Hyde::hasTorchlight()])> -
-

{{ $post->matter['title'] ?? 'Blog Post' }}

-
- @includeWhen(isset($post->matter['date']), 'components.post.datePublished') - @includeWhen(isset($post->matter['author']), 'components.post.author') - @includeWhen(isset($post->matter['category']), 'components.post.category') -
-
-
- {!! $markdown !!} -
-
diff --git a/resources/views/components/post/author.blade.php b/resources/views/components/post/author.blade.php deleted file mode 100644 index 916ca11..0000000 --- a/resources/views/components/post/author.blade.php +++ /dev/null @@ -1,5 +0,0 @@ -by author -
- {{ $post->matter['author'] }} - {{-- @todo Add more properties such as social media links --}} -
diff --git a/resources/views/components/post/category.blade.php b/resources/views/components/post/category.blade.php deleted file mode 100644 index f557084..0000000 --- a/resources/views/components/post/category.blade.php +++ /dev/null @@ -1 +0,0 @@ -in the category "{{ $post->matter['category'] }}" diff --git a/resources/views/components/post/datePublished.blade.php b/resources/views/components/post/datePublished.blade.php deleted file mode 100644 index 5f8d8b2..0000000 --- a/resources/views/components/post/datePublished.blade.php +++ /dev/null @@ -1 +0,0 @@ -Posted diff --git a/resources/views/components/post/description.blade.php b/resources/views/components/post/description.blade.php deleted file mode 100644 index 74cb1bc..0000000 --- a/resources/views/components/post/description.blade.php +++ /dev/null @@ -1,3 +0,0 @@ -

- {{ $post->matter['description'] }} -

\ No newline at end of file diff --git a/resources/views/docs.blade.php b/resources/views/docs.blade.php deleted file mode 100644 index 0d96ef8..0000000 --- a/resources/views/docs.blade.php +++ /dev/null @@ -1,62 +0,0 @@ -{{-- The Documentation Page Layout based on Laradocgen --}} -@extends('layouts.app') -@section('content') -@php($withoutNavigation = true) - - -
- @include('components.docs.content') -
- - - -@endsection diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php deleted file mode 100644 index 2fe1bc2..0000000 --- a/resources/views/layouts/app.blade.php +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - @if (isset($title)) - {{ config('hyde.name', 'HydePHP') }} - {{ $title }} - @else - {{ config('hyde.name', 'HydePHP') }} - @endif - - - - - - - - - @include('layouts.meta') - - - @includeUnless($withoutNavigation ?? false, 'layouts.navigation') - -
- @yield('content') -
- - @includeUnless(config('hyde.footer.enabled', true) && ($withoutNavigation ?? false), 'layouts.footer') - - diff --git a/resources/views/layouts/footer.blade.php b/resources/views/layouts/footer.blade.php deleted file mode 100644 index 9f91b9d..0000000 --- a/resources/views/layouts/footer.blade.php +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/resources/views/layouts/meta.blade.php b/resources/views/layouts/meta.blade.php deleted file mode 100644 index 7d25a32..0000000 --- a/resources/views/layouts/meta.blade.php +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/resources/views/layouts/navigation.blade.php b/resources/views/layouts/navigation.blade.php deleted file mode 100644 index 458f0e2..0000000 --- a/resources/views/layouts/navigation.blade.php +++ /dev/null @@ -1,88 +0,0 @@ -@php - $links = App\Actions\GeneratesNavigationMenu::getNavigationLinks($currentPage); - $homeRoute = ($links[array_search('Home', array_column($links, 'title'))])['route'] ?? 'index.html'; -@endphp - - - - - - - diff --git a/resources/views/page.blade.php b/resources/views/page.blade.php deleted file mode 100644 index f7cebfc..0000000 --- a/resources/views/page.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -{{-- The Markdown Page Layout --}} -@extends('layouts.app') -@section('content') - -
-
App\Hyde\Hyde::hasTorchlight()])> - {!! $markdown !!} -
-
- -@endsection diff --git a/src/resources/stubs/404.blade.php b/resources/views/pages/404.blade.php similarity index 100% rename from src/resources/stubs/404.blade.php rename to resources/views/pages/404.blade.php diff --git a/resources/views/pages/index.blade.php b/resources/views/pages/index.blade.php index 21b0a67..70e2010 100644 --- a/resources/views/pages/index.blade.php +++ b/resources/views/pages/index.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app') +@extends('hyde::layouts.app') @section('content')
@@ -25,8 +25,8 @@ class="text-3xl text-left opacity-75 leading-10 tracking-tight font-extrabold sm
- @foreach(\App\Hyde\Models\MarkdownPost::getCollection() as $post) - @include('components.article-excerpt') + @foreach(\Hyde\Framework\Models\MarkdownPost::getCollection() as $post) + @include('hyde::components.article-excerpt') @endforeach
diff --git a/resources/views/post.blade.php b/resources/views/post.blade.php deleted file mode 100644 index ece829b..0000000 --- a/resources/views/post.blade.php +++ /dev/null @@ -1,9 +0,0 @@ -{{-- The Post Page Layout --}} -@extends('layouts.app') -@section('content') - -
- @include('components.post.article') -
- -@endsection diff --git a/src/resources/fonts/smslant.flf b/src/resources/fonts/smslant.flf deleted file mode 100644 index 9d19838..0000000 --- a/src/resources/fonts/smslant.flf +++ /dev/null @@ -1,1097 +0,0 @@ -flf2a$ 5 4 14 15 10 0 22415 -SmSlant by Glenn Chappell 6/93 - based on Small & Slant -Includes ISO Latin-1 -figlet release 2.1 -- 12 Aug 1994 -Permission is hereby given to modify this font, as long as the -modifier's name is placed on a comment line. - -Modified by Paul Burton 12/96 to include new parameter -supported by FIGlet and FIGWin. May also be slightly modified for better use -of new full-width/kern/smush alternatives, but default output is NOT changed. - - $@ - $ @ - $ @ - $ @ -$ @@ - __@ - / /@ - /_/ @ -(_) @ - @@ - _ _ @ -( | )@ -|/|/ @ -$ @ - @@ - ____ @ - __/ / /_@ - /_ . __/@ -/_ __/ @ - /_/_/ @@ - @ - _//@ - (_-<@ -/ __/@ -// @@ - _ __@ -(_)_/_/@ - _/_/_ @ -/_/ (_)@ - @@ - ____ @ - / __/___@ - > _/_ _/@ -|_____/ @ - @@ - _ @ -( )@ -|/ @ -$ @ - @@ - __@ - _/_/@ - / / @ -/ / @ -|_| @@ - _ @ - | |@ - / /@ - _/_/ @ -/_/ @@ - @ - _/|@ -> _<@ -|/ @ - @@ - __ @ - __/ /_@ -/_ __/@ - /_/ @ - @@ - @ - @ - _ @ -( )@ -|/ @@ - @ - ____@ -/___/@ - $ @ - @@ - @ - @ - _ @ -(_)@ - @@ - __@ - _/_/@ - _/_/ @ -/_/ @ - @@ - ___ @ - / _ \@ -/ // /@ -\___/ @ - @@ - ___@ - < /@ - / / @ -/_/ @ - @@ - ___ @ - |_ |@ - / __/ @ -/____/ @ - @@ - ____@ - |_ /@ - _/_ < @ -/____/ @ - @@ - ____@ - / / /@ -/_ _/@ - /_/ @ - @@ - ____@ - / __/@ - /__ \ @ -/____/ @ - @@ - ____@ - / __/@ -/ _ \ @ -\___/ @ - @@ - ____@ -/_ /@ - / / @ -/_/ @ - @@ - ___ @ - ( _ )@ -/ _ |@ -\___/ @ - @@ - ___ @ - / _ \@ - \_, /@ -/___/ @ - @@ - _ @ - (_)@ - _ @ -(_) @ - @@ - _ @ - (_)@ - _ @ -( ) @ -|/ @@ - __@ - / /@ -< < @ - \_\@ - @@ - @ - ____@ - /___/@ -/___/ @ - @@ -__ @ -\ \ @ - > >@ -/_/ @ - @@ - ___ @ -/__ \@ - /__/@ -(_) @ - @@ - _____ @ - / ___ \@ -/ / _ `/@ -\ \_,_/ @ - \___/ @@ - ___ @ - / _ |@ - / __ |@ -/_/ |_|@ - @@ - ___ @ - / _ )@ - / _ |@ -/____/ @ - @@ - _____@ - / ___/@ -/ /__ @ -\___/ @ - @@ - ___ @ - / _ \@ - / // /@ -/____/ @ - @@ - ____@ - / __/@ - / _/ @ -/___/ @ - @@ - ____@ - / __/@ - / _/ @ -/_/ @ - @@ - _____@ - / ___/@ -/ (_ / @ -\___/ @ - @@ - __ __@ - / // /@ - / _ / @ -/_//_/ @ - @@ - ____@ - / _/@ - _/ / @ -/___/ @ - @@ - __@ - __ / /@ -/ // / @ -\___/ @ - @@ - __ __@ - / //_/@ - / ,< @ -/_/|_| @ - @@ - __ @ - / / @ - / /__@ -/____/@ - @@ - __ ___@ - / |/ /@ - / /|_/ / @ -/_/ /_/ @ - @@ - _ __@ - / |/ /@ - / / @ -/_/|_/ @ - @@ - ____ @ - / __ \@ -/ /_/ /@ -\____/ @ - @@ - ___ @ - / _ \@ - / ___/@ -/_/ @ - @@ - ____ @ - / __ \@ -/ /_/ /@ -\___\_\@ - @@ - ___ @ - / _ \@ - / , _/@ -/_/|_| @ - @@ - ____@ - / __/@ - _\ \ @ -/___/ @ - @@ - ______@ -/_ __/@ - / / @ -/_/ @ - @@ - __ __@ - / / / /@ -/ /_/ / @ -\____/ @ - @@ - _ __@ - | | / /@ - | |/ / @ - |___/ @ - @@ - _ __@ - | | /| / /@ - | |/ |/ / @ - |__/|__/ @ - @@ - _ __@ - | |/_/@ - _> < @ -/_/|_| @ - @@ - __ __@ - \ \/ /@ - \ / @ - /_/ @ - @@ - ____@ - /_ /@ - / /_@ - /___/@ - @@ - ___@ - / _/@ - / / @ - / / @ -/__/ @@ -__ @ -\ \ @ - \ \ @ - \_\@ - @@ - ___@ - / /@ - / / @ - _/ / @ -/__/ @@ - //|@ -|/||@ - $ @ -$ @ - @@ - @ - @ - @ - ____@ -/___/@@ - _ @ -( )@ - V @ -$ @ - @@ - @ - ___ _@ -/ _ `/@ -\_,_/ @ - @@ - __ @ - / / @ - / _ \@ -/_.__/@ - @@ - @ - ____@ -/ __/@ -\__/ @ - @@ - __@ - ___/ /@ -/ _ / @ -\_,_/ @ - @@ - @ - ___ @ -/ -_)@ -\__/ @ - @@ - ___@ - / _/@ - / _/ @ -/_/ @ - @@ - @ - ___ _@ - / _ `/@ - \_, / @ -/___/ @@ - __ @ - / / @ - / _ \@ -/_//_/@ - @@ - _ @ - (_)@ - / / @ -/_/ @ - @@ - _ @ - (_)@ - / / @ - __/ / @ -|___/ @@ - __ @ - / /__@ - / '_/@ -/_/\_\ @ - @@ - __@ - / /@ - / / @ -/_/ @ - @@ - @ - __ _ @ - / ' \@ -/_/_/_/@ - @@ - @ - ___ @ - / _ \@ -/_//_/@ - @@ - @ - ___ @ -/ _ \@ -\___/@ - @@ - @ - ___ @ - / _ \@ - / .__/@ -/_/ @@ - @ - ___ _@ -/ _ `/@ -\_, / @ - /_/ @@ - @ - ____@ - / __/@ -/_/ @ - @@ - @ - ___@ - (_-<@ -/___/@ - @@ - __ @ - / /_@ -/ __/@ -\__/ @ - @@ - @ - __ __@ -/ // /@ -\_,_/ @ - @@ - @ - _ __@ -| |/ /@ -|___/ @ - @@ - @ - _ __@ -| |/|/ /@ -|__,__/ @ - @@ - @ - __ __@ - \ \ /@ -/_\_\ @ - @@ - @ - __ __@ - / // /@ - \_, / @ -/___/ @@ - @ - ___@ -/_ /@ -/__/@ - @@ - __@ - _/_/@ -_/ / @ -/ / @ -\_\ @@ - __@ - / /@ - / / @ - / / @ -/_/ @@ - __ @ - \ \ @ - / /_@ - _/_/ @ -/_/ @@ - /\//@ -//\/ @ - $ @ -$ @ - @@ - _ _ @ - (_)(_)@ - / - | @ -/_/|_| @ - @@ - _ _ @ - (_)_(_)@ -/ __ \ @ -\____/ @ - @@ - _ _ @ - (_) (_)@ -/ /_/ / @ -\____/ @ - @@ - _ _ @ - (_)(_)@ -/ _ `/ @ -\_,_/ @ - @@ - _ _ @ - (_)(_)@ -/ _ \ @ -\___/ @ - @@ - _ _ @ - (_)(_)@ -/ // / @ -\_,_/ @ - @@ - ____ @ - / _ )@ - / /< < @ - / //__/ @ -/_/ @@ -160 NO-BREAK SPACE - $@ - $ @ - $ @ - $ @ -$ @@ -161 INVERTED EXCLAMATION MARK - _ @ - (_)@ - / / @ -/_/ @ - @@ -162 CENT SIGN - @ - __//@ -/ __/@ -\ _/ @ -// @@ -163 POUND SIGN - __ @ - __/__|@ - /_ _/_ @ -(_,___/ @ - @@ -164 CURRENCY SIGN - /|_/|@ - | . / @ - /_ | @ -|/ |/ @ - @@ -165 YEN SIGN - ____@ - _| / /@ - /_ __/@ -/_ __/ @ - /_/ @@ -166 BROKEN BAR - __@ - / /@ - /_/ @ - / / @ -/_/ @@ -167 SECTION SIGN - __ @ - _/ _)@ - / | | @ - | |_/ @ -(__/ @@ -168 DIAERESIS - _ _ @ -(_) (_)@ - $ $ @ -$ $ @ - @@ -169 COPYRIGHT SIGN - ____ @ - / ___\ @ - / / _/ |@ -| |__/ / @ - \____/ @@ -170 FEMININE ORDINAL INDICATOR - ___ _@ - / _ `/@ - _\_,_/ @ -/____/ @ - @@ -171 LEFT-POINTING DOUBLE ANGLE QUOTATION MARK - ____@ - / / /@ -< < < @ - \_\_\@ - @@ -172 NOT SIGN - @ - ____@ -/_ /@ - /_/ @ - @@ -173 SOFT HYPHEN - @ - ___@ -/__/@ - $ @ - @@ -174 REGISTERED SIGN - ____ @ - / __ \ @ - / / -) |@ -| //\\ / @ - \____/ @@ -175 MACRON - ____@ -/___/@ - $ @ -$ @ - @@ -176 DEGREE SIGN - __ @ - /. |@ -|__/ @ - $ @ - @@ -177 PLUS-MINUS SIGN - __ @ - __/ /_@ - /_ __/@ - __/_/_ @ -/_____/ @@ -178 SUPERSCRIPT TWO - __ @ - |_ )@ -/__| @ - $ @ - @@ -179 SUPERSCRIPT THREE - ___@ - |_ /@ -/__) @ - $ @ - @@ -180 ACUTE ACCENT - __@ -/_/@ - $ @ -$ @ - @@ -181 MICRO SIGN - @ - __ __@ - / // /@ - / .,_/ @ -/_/ @@ -182 PILCROW SIGN - _____@ - / /@ -|_ / / @ -/_/_/ @ - @@ -183 MIDDLE DOT - @ - _ @ -(_)@ -$ @ - @@ -184 CEDILLA - @ - @ - @ - _ @ -/_)@@ -185 SUPERSCRIPT ONE - __@ - < /@ -/_/ @ -$ @ - @@ -186 MASCULINE ORDINAL INDICATOR - ___ @ - / _ \@ - _\___/@ -/____/ @ - @@ -187 RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -____ @ -\ \ \ @ - > > >@ -/_/_/ @ - @@ -188 VULGAR FRACTION ONE QUARTER - __ __ @ - < /_/_/___@ -/_//_//_' /@ - /_/ /_/ @ - @@ -189 VULGAR FRACTION ONE HALF - __ __ @ - < /_/_/_ @ -/_//_/|_ )@ - /_/ /__| @ - @@ -190 VULGAR FRACTION THREE QUARTERS - ___ __ @ - |_ /_/_/___@ -/__)/_//_' /@ - /_/ /_/ @ - @@ -191 INVERTED QUESTION MARK - _ @ - _(_)@ -/ _/_@ -\___/@ - @@ -192 LATIN CAPITAL LETTER A WITH GRAVE - __ @ - _\_\@ - / - |@ -/_/|_|@ - @@ -193 LATIN CAPITAL LETTER A WITH ACUTE - __@ - _/_/@ - / - |@ -/_/|_|@ - @@ -194 LATIN CAPITAL LETTER A WITH CIRCUMFLEX - //|@ - _|/||@ - / - | @ -/_/|_| @ - @@ -195 LATIN CAPITAL LETTER A WITH TILDE - /\//@ - _//\/ @ - / - | @ -/_/|_| @ - @@ -196 LATIN CAPITAL LETTER A WITH DIAERESIS - _ _ @ - (_)(_)@ - / - | @ -/_/|_| @ - @@ -197 LATIN CAPITAL LETTER A WITH RING ABOVE - (())@ - / _ |@ - / __ |@ -/_/ |_|@ - @@ -198 LATIN CAPITAL LETTER AE - _______@ - / _ __/@ - / _ _/ @ -/_//___/ @ - @@ -199 LATIN CAPITAL LETTER C WITH CEDILLA - _____@ - / ___/@ -/ /__ @ -\___/ @ -/_) @@ -200 LATIN CAPITAL LETTER E WITH GRAVE - __ @ - \_\@ - / -<@ -/__< @ - @@ -201 LATIN CAPITAL LETTER E WITH ACUTE - __@ - _/_/@ - / -< @ -/__< @ - @@ -202 LATIN CAPITAL LETTER E WITH CIRCUMFLEX - //|@ - |/||@ - / -< @ -/__< @ - @@ -203 LATIN CAPITAL LETTER E WITH DIAERESIS - _ _ @ - (_)(_)@ - / -< @ -/__< @ - @@ -204 LATIN CAPITAL LETTER I WITH GRAVE - __ @ - _\_\ @ - /_ __/@ -/____/ @ - @@ -205 LATIN CAPITAL LETTER I WITH ACUTE - __@ - __/_/@ - /_ __/@ -/____/ @ - @@ -206 LATIN CAPITAL LETTER I WITH CIRCUMFLEX - //|@ - _|/||@ - /_ __/@ -/____/ @ - @@ -207 LATIN CAPITAL LETTER I WITH DIAERESIS - _ _ @ - (_)(_)@ - /_ __/ @ -/____/ @ - @@ -208 LATIN CAPITAL LETTER ETH - ____ @ - _/ __ \@ -/_ _// /@ -/_____/ @ - @@ -209 LATIN CAPITAL LETTER N WITH TILDE - /\//@ - __//\/ @ - / |/ / @ -/_/|__/ @ - @@ -210 LATIN CAPITAL LETTER O WITH GRAVE - __ @ - _\_\ @ -/ __ \@ -\____/@ - @@ -211 LATIN CAPITAL LETTER O WITH ACUTE - __@ - __/_/@ -/ __ \@ -\____/@ - @@ -212 LATIN CAPITAL LETTER O WITH CIRCUMFLEX - //|@ - _|/||@ -/ __ \@ -\____/@ - @@ -213 LATIN CAPITAL LETTER O WITH TILDE - /\//@ - _//\/ @ -/ __ \ @ -\____/ @ - @@ -214 LATIN CAPITAL LETTER O WITH DIAERESIS - _ _ @ - (_)_(_)@ -/ __ \ @ -\____/ @ - @@ -215 MULTIPLICATION SIGN - @ - /|/|@ - > < @ -|/|/ @ - @@ -216 LATIN CAPITAL LETTER O WITH STROKE - _____ @ - / _// \@ -/ //// /@ -\_//__/ @ - @@ -217 LATIN CAPITAL LETTER U WITH GRAVE - __ @ - __\_\ @ -/ /_/ /@ -\____/ @ - @@ -218 LATIN CAPITAL LETTER U WITH ACUTE - __@ - __ /_/@ -/ /_/ /@ -\____/ @ - @@ -219 LATIN CAPITAL LETTER U WITH CIRCUMFLEX - //|@ - __|/||@ -/ /_/ /@ -\____/ @ - @@ -220 LATIN CAPITAL LETTER U WITH DIAERESIS - _ _ @ - (_) (_)@ -/ /_/ / @ -\____/ @ - @@ -221 LATIN CAPITAL LETTER Y WITH ACUTE - __@ -__/_/@ -\ V /@ - /_/ @ - @@ -222 LATIN CAPITAL LETTER THORN - __ @ - / / @ - / -_)@ -/_/ @ - @@ -223 LATIN SMALL LETTER SHARP S - ____ @ - / _ )@ - / /< < @ - / //__/ @ -/_/ @@ -224 LATIN SMALL LETTER A WITH GRAVE - __ @ - _\_\_@ -/ _ `/@ -\_,_/ @ - @@ -225 LATIN SMALL LETTER A WITH ACUTE - __@ - __/_/@ -/ _ `/@ -\_,_/ @ - @@ -226 LATIN SMALL LETTER A WITH CIRCUMFLEX - //|@ - _|/||@ -/ _ `/@ -\_,_/ @ - @@ -227 LATIN SMALL LETTER A WITH TILDE - /\//@ - _//\/ @ -/ _ `/ @ -\_,_/ @ - @@ -228 LATIN SMALL LETTER A WITH DIAERESIS - _ _ @ - (_)(_)@ -/ _ `/ @ -\_,_/ @ - @@ -229 LATIN SMALL LETTER A WITH RING ABOVE - __ @ - _(())@ -/ _ `/@ -\_,_/ @ - @@ -230 LATIN SMALL LETTER AE - @ - ___ ___ @ -/ _ ` -_)@ -\_,____/ @ - @@ -231 LATIN SMALL LETTER C WITH CEDILLA - @ - ____@ -/ __/@ -\__/ @ -/_) @@ -232 LATIN SMALL LETTER E WITH GRAVE - __ @ - _\_\@ -/ -_)@ -\__/ @ - @@ -233 LATIN SMALL LETTER E WITH ACUTE - __@ - _/_/@ -/ -_)@ -\__/ @ - @@ -234 LATIN SMALL LETTER E WITH CIRCUMFLEX - //|@ - |/||@ -/ -_)@ -\__/ @ - @@ -235 LATIN SMALL LETTER E WITH DIAERESIS - _ _ @ -(_)(_)@ -/ -_) @ -\__/ @ - @@ -236 LATIN SMALL LETTER I WITH GRAVE - __ @ - \_\@ - / / @ -/_/ @ - @@ -237 LATIN SMALL LETTER I WITH ACUTE - __@ - /_/@ - / / @ -/_/ @ - @@ -238 LATIN SMALL LETTER I WITH CIRCUMFLEX - //|@ - |/||@ - / / @ -/_/ @ - @@ -239 LATIN SMALL LETTER I WITH DIAERESIS - _ _ @ -(_)_(_)@ - / / @ -/_/ @ - @@ -240 LATIN SMALL LETTER ETH - _||_@ - __ || @ -/ _` | @ -\___/ @ - @@ -241 LATIN SMALL LETTER N WITH TILDE - /\//@ - _//\/ @ - / _ \ @ -/_//_/ @ - @@ -242 LATIN SMALL LETTER O WITH GRAVE - __ @ - _\_\@ -/ _ \@ -\___/@ - @@ -243 LATIN SMALL LETTER O WITH ACUTE - __@ - _/_/@ -/ _ \@ -\___/@ - @@ -244 LATIN SMALL LETTER O WITH CIRCUMFLEX - //|@ - _|/||@ -/ _ \ @ -\___/ @ - @@ -245 LATIN SMALL LETTER O WITH TILDE - /\//@ - _//\/ @ -/ _ \ @ -\___/ @ - @@ -246 LATIN SMALL LETTER O WITH DIAERESIS - _ _ @ - (_)(_)@ -/ _ \ @ -\___/ @ - @@ -247 DIVISION SIGN - _ @ - _(_)@ -/___/@ -(_) @ - @@ -248 LATIN SMALL LETTER O WITH STROKE - @ - ___ @ -/ //\@ -\//_/@ - @@ -249 LATIN SMALL LETTER U WITH GRAVE - __ @ - __\_\@ -/ // /@ -\_,_/ @ - @@ -250 LATIN SMALL LETTER U WITH ACUTE - __@ - __/_/@ -/ // /@ -\_,_/ @ - @@ -251 LATIN SMALL LETTER U WITH CIRCUMFLEX - //|@ - _|/||@ -/ // /@ -\_,_/ @ - @@ -252 LATIN SMALL LETTER U WITH DIAERESIS - _ _ @ - (_)(_)@ -/ // / @ -\_,_/ @ - @@ -253 LATIN SMALL LETTER Y WITH ACUTE - __@ - __/_/@ - / // /@ - \_, / @ -/___/ @@ -254 LATIN SMALL LETTER THORN - __ @ - / / @ - / _ \@ - / .__/@ -/_/ @@ -255 LATIN SMALL LETTER Y WITH DIAERESIS - _ _ @ - (_)(_)@ - / // / @ - \_, / @ -/___/ @@ diff --git a/src/resources/stubs/404.md b/src/resources/stubs/404.md deleted file mode 100644 index 0e01a70..0000000 --- a/src/resources/stubs/404.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: 404 - Page not found ---- - -# 404 - Page not found - -[Go Home](index.html) \ No newline at end of file diff --git a/src/resources/stubs/torchlight-badge.html b/src/resources/stubs/torchlight-badge.html deleted file mode 100644 index 4a9aad4..0000000 --- a/src/resources/stubs/torchlight-badge.html +++ /dev/null @@ -1,5 +0,0 @@ -

- - Syntax highlighting by Torchlight.dev - -

\ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index 39c62fb..6c70c65 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -3,7 +3,7 @@ const defaultTheme = require('tailwindcss/defaultTheme'); module.exports = { darkMode: 'class', content: [ - './resources/views/**/*.blade.php', + './_site/**/*.html', ], theme: { diff --git a/tests/Feature/Commands/MakePostCommandTest.php b/tests/Feature/Commands/MakePostCommandTest.php index f8550de..da06541 100644 --- a/tests/Feature/Commands/MakePostCommandTest.php +++ b/tests/Feature/Commands/MakePostCommandTest.php @@ -2,18 +2,19 @@ namespace Tests\Feature\Commands; +use Hyde\Framework\Hyde; use Tests\TestCase; class MakePostCommandTest extends TestCase { /** * Get the path of the test Markdown file. - * + * * @return string */ public function getPath(): string { - return realpath('./_posts') . '/test-post.md'; + return Hyde::path('_posts/test-post.md'); } /** @@ -39,7 +40,7 @@ public function test_command_has_expected_output_and_creates_valid_file() ->expectsQuestion('What is the primary category of the post?', 'general') ->expectsOutput('Creating a post with the following details:') ->expectsConfirmation('Do you wish to continue?', 'yes') - + ->assertExitCode(0); $this->assertFileExists($this->getPath()); @@ -56,7 +57,7 @@ public function test_that_files_are_not_overwritten_when_force_flag_is_not_set() ->expectsQuestion('What is your (the author\'s) name?', 'PHPUnit') ->expectsQuestion('What is the primary category of the post?', 'general') ->expectsOutput('Creating a post with the following details:') - + ->expectsConfirmation('Do you wish to continue?', 'yes') ->expectsOutput('If you want to overwrite the file supply the --force flag.') @@ -65,7 +66,7 @@ public function test_that_files_are_not_overwritten_when_force_flag_is_not_set() $this->assertStringContainsString('This should not be overwritten', file_get_contents($this->getPath())); } - + public function test_that_files_are_overwritten_when_force_flag_is_set() { file_put_contents($this->getPath(), 'This should be overwritten'); diff --git a/tests/Feature/Commands/Publish404PageCommandTest.php b/tests/Feature/Commands/Publish404PageCommandTest.php deleted file mode 100644 index 4faa058..0000000 --- a/tests/Feature/Commands/Publish404PageCommandTest.php +++ /dev/null @@ -1,144 +0,0 @@ -unlink(); - - parent::setUp(); - } - - /** - * Clean up after tests by removing the created files. - * @return void - */ - protected function tearDown(): void - { - $this->unlink(); - - parent::tearDown(); - } - - private function unlink(): void - { - if (file_exists($this->getBladePath())) { - unlink($this->getBladePath()); - } - if (file_exists($this->getMarkdownPath())) { - unlink($this->getMarkdownPath()); - } - } - - private function getBladePath(): string - { - return realpath('resources/views/pages') . DIRECTORY_SEPARATOR . '404.blade.php'; - } - - private function getMarkdownPath(): string - { - return realpath('_pages') . DIRECTORY_SEPARATOR . '404.md'; - } - - public function test_command_exists() - { - $this->artisan('publish:404 --help')->assertExitCode(0); - $this->assertCommandCalled('publish:404 --help'); - } - - public function test_command_creates_blade_file() - { - $path = $this->getBladePath(); - - // Assert that no old file exists which would cause issues - $this->assertFileDoesNotExist($path); - - $this->artisan('publish:404 --type="blade" --no-interaction') - ->expectsOutput("Created file $path!") - ->assertExitCode(0); - - $this->assertFileExists($path); - } - - public function test_command_creates_markdown_file() - { - $path = $this->getMarkdownPath(); - - // Assert that no old file exists which would cause issues - $this->assertFileDoesNotExist($path); - - $this->artisan('publish:404 --type="markdown" --no-interaction') - ->expectsOutput("Created file $path!") - ->assertExitCode(0); - - $this->assertFileExists($path); - } - - public function test_command_does_not_accept_invalid_type() - { - $this->artisan('publish:404 --type="invalid-type"') - ->expectsOutput('Type `invalid-type` is not valid. It must be either `blade` or `markdown`') - ->assertExitCode(400); - - $this->artisan('publish:404') - ->expectsQuestion('Which type of view would you like to publish?', 'invalid-type') - ->expectsOutput('Type `invalid-type` is not valid. It must be either `blade` or `markdown`') - ->assertExitCode(400); - } - - public function test_command_does_not_overwrite_existing_files() - { - $path = $this->getMarkdownPath(); - - file_put_contents($path, "Test File"); - - // Assert that the created file exists - $this->assertFileExists($path); - - $this->artisan('publish:404 --type="markdown" --no-interaction') - ->expectsOutput("File $path already exists!") - ->assertExitCode(409); - - // Assert the file contents were not overwritten - $this->assertStringContainsString('Test File', - file_get_contents($path)); - } - - public function test_command_does_overwrite_existing_files_when_force_flag_is_set() - { - $path = $this->getMarkdownPath(); - - file_put_contents($path, "Test File"); - - // Assert that the created file exists - $this->assertFileExists($path); - - $this->artisan('publish:404 --type="markdown" --force --no-interaction') - ->expectsOutput("Created file $path!") - ->assertExitCode(0); - - // Assert the file contents were overwritten - $this->assertStringNotContainsString('Test File', - file_get_contents($path)); - } - - public function test_command_is_interactive_and_uses_the_supplied_answer() - { - $markdownPath = $this->getMarkdownPath(); - $bladePath = $this->getBladePath(); - - $this->artisan('publish:404') - ->expectsQuestion('Which type of view would you like to publish?', 'Markdown') - ->expectsOutput("Created file $markdownPath!") - ->doesntExpectOutput("Created file $bladePath!") - ->assertExitCode(0); - } -} \ No newline at end of file diff --git a/tests/Feature/InspireCommandTest.php b/tests/Feature/InspireCommandTest.php deleted file mode 100644 index 58c71a1..0000000 --- a/tests/Feature/InspireCommandTest.php +++ /dev/null @@ -1,5 +0,0 @@ -artisan('inspire')->assertExitCode(0); -}); diff --git a/tests/Unit/CreatesDefaultDirectoriesTest.php b/tests/Unit/CreatesDefaultDirectoriesTest.php index 40daa35..97343cc 100644 --- a/tests/Unit/CreatesDefaultDirectoriesTest.php +++ b/tests/Unit/CreatesDefaultDirectoriesTest.php @@ -2,17 +2,18 @@ namespace Tests\Unit; +use Hyde\Framework\Actions\CreatesDefaultDirectories; +use Hyde\Framework\Hyde; use PHPUnit\Framework\TestCase; -use App\Actions\CreatesDefaultDirectories; class CreatesDefaultDirectoriesTest extends TestCase { /** * Test if the directories are created. - * + * * Note that the action is called by the Service Provider * when booting, so we don't call the action directly. - * + * * To properly test that it works, you should first * remove the directories manually as the action * will not have anything to do otherwise. @@ -22,7 +23,7 @@ class CreatesDefaultDirectoriesTest extends TestCase public function testDefaultDirectoriesAreCreated() { foreach (CreatesDefaultDirectories::getRequiredDirectories() as $directory) { - $this->assertTrue(is_dir(realpath("./$directory"))); + $this->assertTrue(is_dir(Hyde::path($directory))); } } } diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php deleted file mode 100644 index 61cd84c..0000000 --- a/tests/Unit/ExampleTest.php +++ /dev/null @@ -1,5 +0,0 @@ -toBeTrue(); -}); diff --git a/tests/Unit/HydePathHelperTest.php b/tests/Unit/HydePathHelperTest.php new file mode 100644 index 0000000..41385bb --- /dev/null +++ b/tests/Unit/HydePathHelperTest.php @@ -0,0 +1,46 @@ +toBeTrue(); +}); + +test('string is returned', function () { + expect(Hyde::path())->toBeString(); +}); + +test('returned directory contains content expected to be in the project directory', + function () { + expect( + file_exists(Hyde::path() . DIRECTORY_SEPARATOR . 'hyde') && + file_exists(Hyde::path() . DIRECTORY_SEPARATOR . '_pages') && + file_exists(Hyde::path() . DIRECTORY_SEPARATOR . '_posts') && + file_exists(Hyde::path() . DIRECTORY_SEPARATOR . '_site') + )->toBeTrue(); + } +); + +test('method returns qualified file path when supplied with argument', function () { + expect(Hyde::path('file.php'))->toEqual(Hyde::path() . DIRECTORY_SEPARATOR . 'file.php'); +}); + +test('method strips trailing directory separators from argument', function () { + expect(Hyde::path('\\/file.php/'))->toEqual(Hyde::path() . DIRECTORY_SEPARATOR . 'file.php'); +}); + +test('method returns expected value for nested path arguments', function () { + expect(Hyde::path('directory/file.php')) + ->toEqual(Hyde::path() . DIRECTORY_SEPARATOR . 'directory/file.php'); +}); + +test('method returns expected value regardless of trailing directory separators in argument', function () { + expect(Hyde::path('directory/file.php/')) + ->toEqual(Hyde::path() . DIRECTORY_SEPARATOR . 'directory/file.php'); + expect(Hyde::path('/directory/file.php/')) + ->toEqual(Hyde::path() . DIRECTORY_SEPARATOR . 'directory/file.php'); + expect(Hyde::path('\\/directory/file.php/')) + ->toEqual(Hyde::path() . DIRECTORY_SEPARATOR . 'directory/file.php'); +}); diff --git a/tests/Unit/MarkdownPostParserTest.php b/tests/Unit/MarkdownPostParserTest.php index 3276934..b479090 100644 --- a/tests/Unit/MarkdownPostParserTest.php +++ b/tests/Unit/MarkdownPostParserTest.php @@ -2,8 +2,9 @@ namespace Tests\Unit; -use App\Hyde\MarkdownPostParser; -use App\Hyde\Models\MarkdownPost; +use Hyde\Framework\Hyde; +use Hyde\Framework\MarkdownPostParser; +use Hyde\Framework\Models\MarkdownPost; use PHPUnit\Framework\TestCase; class MarkdownPostParserTest extends TestCase @@ -17,7 +18,7 @@ protected function setUp(): void parent::setUp(); // Create a Markdown file to work with - copy(realpath('./tests') . '/_stubs/_posts/test-parser-post.md', $this->getPath()); + copy(Hyde::path('tests/_stubs/_posts/test-parser-post.md'), $this->getPath()); } /** @@ -39,7 +40,7 @@ protected function tearDown(): void */ public function getPath(): string { - return realpath('./_posts') . '/test-parser-post.md'; + return Hyde::path('_posts/test-parser-post.md'); } public function testCanParseMarkdownFile() @@ -47,9 +48,19 @@ public function testCanParseMarkdownFile() $post = (new MarkdownPostParser('test-parser-post'))->get(); $this->assertInstanceOf(MarkdownPost::class, $post); $this->assertCount(4, ($post->matter)); + $this->assertIsArray($post->matter); $this->assertIsString($post->body); $this->assertIsString($post->slug); $this->assertTrue(strlen($post->body) > 32); $this->assertTrue(strlen($post->slug) > 8); } + + public function testParsedMarkdownPostContainsValidFrontMatter() + { + $post = (new MarkdownPostParser('test-parser-post'))->get(); + $this->assertEquals('My New Post', $post->matter['title']); + $this->assertEquals('Mr. Hyde', $post->matter['author']); + $this->assertEquals('blog', $post->matter['category']); + $this->assertEquals('test-parser-post', $post->matter['slug']); + } } diff --git a/tests/Validators/CheckForPageConflictsTest.php b/tests/Validators/CheckForPageConflictsTest.php index b0fe09b..2c2c535 100644 --- a/tests/Validators/CheckForPageConflictsTest.php +++ b/tests/Validators/CheckForPageConflictsTest.php @@ -1,23 +1,25 @@ addWarning('Found conflicts: ' . implode(', ', $conflicts)); + } else { + expect($conflicts)->toBeEmpty(); + } - if (count($conflicts)) { - $this->addWarning('Found conflicts: ' . implode(', ', $conflicts)); - } else { - expect($conflicts)->toBeEmpty(); - } - -})->group('validators'); + })->group('validators'); +} diff --git a/tests/Validators/CheckIfA404PageExistsTest.php b/tests/Validators/CheckIfA404PageExistsTest.php index e7b6cfa..71eb2d6 100644 --- a/tests/Validators/CheckIfA404PageExistsTest.php +++ b/tests/Validators/CheckIfA404PageExistsTest.php @@ -1,11 +1,13 @@ addWarning('Could not find an 404.md or 404.blade.php file! You can scaffold one using `php hyde publish:404`'); + $this->addWarning('Could not find an 404.md or 404.blade.php file! You can publish the default one using `php hyde publish:views`'); } else { $this->assertTrue($assertion); } diff --git a/tests/Validators/CheckIfAnIndexPageExistsTest.php b/tests/Validators/CheckIfAnIndexPageExistsTest.php new file mode 100644 index 0000000..16ae263 --- /dev/null +++ b/tests/Validators/CheckIfAnIndexPageExistsTest.php @@ -0,0 +1,14 @@ +addWarning('Could not find an index.md or index.blade.php file! You can publish the default one using `php hyde publish:views`'); + } else { + $this->assertTrue($assertion); + } +})->group('validators'); diff --git a/tests/Validators/CheckThatAnIndexFileExistsTest.php b/tests/Validators/CheckThatAnIndexFileExistsTest.php deleted file mode 100644 index d0c2e13..0000000 --- a/tests/Validators/CheckThatAnIndexFileExistsTest.php +++ /dev/null @@ -1,12 +0,0 @@ -addWarning('Could not find an index.md or index.blade.php file!'); - } else { - $this->assertTrue($assertion); - } -})->group('validators'); diff --git a/tests/Validators/CheckThatDocumentationPagesHaveAnIndexPageTest.php b/tests/Validators/CheckThatDocumentationPagesHaveAnIndexPageTest.php index fc870fa..0a033eb 100644 --- a/tests/Validators/CheckThatDocumentationPagesHaveAnIndexPageTest.php +++ b/tests/Validators/CheckThatDocumentationPagesHaveAnIndexPageTest.php @@ -1,6 +1,6 @@ addWarning($message); + $this->addWarning($message); } else { $this->assertTrue($indexFileExists); }