@@ -21,6 +21,27 @@ import fs from "fs";
2121import path from "path";
2222import Meta from "../components/Meta";
2323
24+const postReq = (path, params, method='post') => {
25+ const form = document.createElement('form');
26+ form.method = method;
27+ form.action = path;
28+
29+ for (const key in params) {
30+ if (params.hasOwnProperty(key)) {
31+ const hiddenField = document.createElement('input');
32+ hiddenField.type = 'hidden';
33+ hiddenField.name = key;
34+ hiddenField.value = params[key];
35+
36+ form.appendChild(hiddenField);
37+ }
38+ }
39+
40+ document.body.appendChild(form);
41+ form.submit();
42+}
43+
44+
2445export default function Home({
2546 posts,
2647 ecosystem,
@@ -52,6 +73,23 @@ export default function Home({
5273 {
5374 // Hero
5475 }
76+ <div className="layout px-4 md:px-8">
77+ <a className="p-8 button-lg bg-green-400 text-white"
78+ onClick={(e) => {
79+ e.stopPropagation();
80+ fetch('https://api.shore.arvo.network/enter', {
81+ method: 'GET',
82+ headers: {'Content-Type': 'application/json'}
83+ })
84+ .then(res => res.json())
85+ .then(data => {
86+ postReq(data.url + '/~/login', {password: data.code, redirect: '/'});
87+ });
88+ }}
89+ >
90+ Try now
91+ </a>
92+ </div>
5593 <Section>
5694 <div className="bg-yellow-100 dark:bg-[#5C5037] w-full p-8 md:p-12 rounded-3xl flex flex-col md:flex-row">
5795 <div className="md:w-10/12 w-full md:mr-6">