Move non-form content to Layout

This commit is contained in:
Nikita Karamov 2023-09-02 17:58:13 +02:00
parent 6fdeee1269
commit 12aa0823d9
No known key found for this signature in database
GPG key ID: 41D6F71EE78E77CD
2 changed files with 69 additions and 67 deletions

View file

@ -8,6 +8,10 @@
*/ */
import "@styles/main.scss"; import "@styles/main.scss";
import LanguageSelect from "@components/language-select.astro";
import Licence from "@components/licence.html";
import Privacy from "@components/privacy.html";
const { title } = Astro.props; const { title } = Astro.props;
--- ---
@ -55,7 +59,67 @@ const { title } = Astro.props;
content={Astro.generator} content={Astro.generator}
/> />
</head> </head>
<header>
<img
src="/logo.svg"
alt="Share2Fedi"
width="195"
height="60"
/>
<LanguageSelect />
</header>
<body> <body>
<slot /> <main>
<slot />
</main>
<aside>
<p data-translate="description">
Share₂Fedi is an instance-agnostic share page for
<a
href="https://en.wikipedia.org/wiki/Fediverse"
data-translate="fediverse"
>the Fediverse</a
>. With it, you can post to various federated platforms from a single
page.
</p>
<p><b data-translate="supportedProjects">Supported projects:</b></p>
<ul>
<li>
Mastodon (<span data-translate="incl">incl.</span> Hometown, Fedibird,
GlitchCafé)
</li>
<li>
Misskey (<span data-translate="incl">incl.</span> Firefish/Calckey,
FoundKey, Meisskey)
</li>
<li>Friendica</li>
<li>Hubzilla</li>
<li>GNU Social</li>
</ul>
<p data-translate="credits">
Share₂Fedi is developed and maintained by
<a
href="https://www.kytta.dev/"
data-translate="nikita"
>Nikita Karamov</a
>. Source code is
<a
href="https://github.com/kytta/share2fedi"
data-translate="onGitHub"
>on GitHub</a
>. Hosted with
<a href="https://vercel.com">Vercel</a>.
<a
href="https://stats.uptimerobot.com/QOXj3uXPDX"
data-translate="statusPage"
>Status page</a
>.
</p>
<Licence />
<Privacy />
</aside>
</body> </body>
</html> </html>

View file

@ -8,10 +8,6 @@
*/ */
import Layout from "@layouts/layout.astro"; import Layout from "@layouts/layout.astro";
import Form from "@components/form.astro"; import Form from "@components/form.astro";
import Licence from "@components/licence.html";
import Privacy from "@components/privacy.html";
import LanguageSelect from "@components/language-select.astro";
const searchParameters = new URL(Astro.request.url).searchParams; const searchParameters = new URL(Astro.request.url).searchParams;
const prefilledText = searchParameters.get("text"); const prefilledText = searchParameters.get("text");
@ -19,66 +15,8 @@ const prefilledInstance = searchParameters.get("instance");
--- ---
<Layout title="Share₂Fedi — an instance-agnostic share page for the Fediverse"> <Layout title="Share₂Fedi — an instance-agnostic share page for the Fediverse">
<header> <Form
<img {prefilledText}
src="/logo.svg" {prefilledInstance}
alt="Share2Fedi" />
width="195"
height="60"
/>
<LanguageSelect />
</header>
<main>
<Form
{prefilledText}
{prefilledInstance}
/>
</main>
<aside>
<p data-translate="description">
Share₂Fedi is an instance-agnostic share page for
<a
href="https://en.wikipedia.org/wiki/Fediverse"
data-translate="fediverse"
>the Fediverse</a
>. With it, you can post to various federated platforms from a single
page.
</p>
<p><b data-translate="supportedProjects">Supported projects:</b></p>
<ul>
<li>
Mastodon (<span data-translate="incl">incl.</span> Hometown, Fedibird,
GlitchCafé)
</li>
<li>
Misskey (<span data-translate="incl">incl.</span> Firefish/Calckey,
FoundKey, Meisskey)
</li>
<li>Friendica</li>
<li>Hubzilla</li>
<li>GNU Social</li>
</ul>
<p data-translate="credits">
Share₂Fedi is developed and maintained by
<a
href="https://www.kytta.dev/"
data-translate="nikita"
>Nikita Karamov</a
>. Source code is
<a
href="https://github.com/kytta/share2fedi"
data-translate="onGitHub"
>on GitHub</a
>. Hosted with
<a href="https://vercel.com">Vercel</a>.
<a
href="https://stats.uptimerobot.com/QOXj3uXPDX"
data-translate="statusPage"
>Status page</a
>.
</p>
<Licence />
<Privacy />
</aside>
</Layout> </Layout>