mirror of
https://github.com/Lissy93/web-check.git
synced 2025-07-14 19:25:00 +02:00
Astro pages build up
This commit is contained in:
src/pages
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
import BaseLayout from '@layouts/Base.astro';
|
import BaseLayout from '@layouts/Base.astro';
|
||||||
import Nav from '@components/Nav.astro';
|
import Nav from '@/components/scafold/Nav.astro';
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -16,7 +16,6 @@ import Nav from '@components/Nav.astro';
|
|||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
background: rgb(20,29,43);
|
background: rgb(20,29,43);
|
||||||
background: radial-gradient(circle,#141d2b 0%,#0d1521 75%,#141d2b 100%);
|
background: radial-gradient(circle,#141d2b 0%,#0d1521 75%,#141d2b 100%);
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ if (searchUrl) {
|
|||||||
// And if form has been submitted with ?url=, redirect to the results page
|
// And if form has been submitted with ?url=, redirect to the results page
|
||||||
const searchParams = new URL(window.location.href).searchParams;
|
const searchParams = new URL(window.location.href).searchParams;
|
||||||
if (searchParams.has('url')) {
|
if (searchParams.has('url')) {
|
||||||
window.location.href = `/check/${searchParams.get('url')}`;
|
window.location.href = `/check/${encodeURIComponent(searchParams.get('url') || '')}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// And add a manual no-react form submit handler
|
// And add a manual no-react form submit handler
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
---
|
---
|
||||||
import BaseLayout from '@layouts/Base.astro';
|
import BaseLayout from '@layouts/Base.astro';
|
||||||
|
import NavBar from '@components/scafold/Nav.astro';
|
||||||
|
// import Footer from '@components/scafold/Footer.astro';
|
||||||
|
// import config from '../site-config';
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout
|
<BaseLayout
|
||||||
@ -11,6 +15,7 @@ import BaseLayout from '@layouts/Base.astro';
|
|||||||
<link rel="stylesheet" href="https://rawcdn.githack.com/Amoenus/SwaggerDark/2064ccd45b571865a64c731fa6bfddfbf2a01fe1/SwaggerDark.css">
|
<link rel="stylesheet" href="https://rawcdn.githack.com/Amoenus/SwaggerDark/2064ccd45b571865a64c731fa6bfddfbf2a01fe1/SwaggerDark.css">
|
||||||
</Fragment>
|
</Fragment>
|
||||||
<main>
|
<main>
|
||||||
|
<NavBar />
|
||||||
<div id="swagger-ui"></div>
|
<div id="swagger-ui"></div>
|
||||||
</main>
|
</main>
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
@ -33,7 +38,7 @@ import BaseLayout from '@layouts/Base.astro';
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '@styles/global.scss';
|
@import '@styles/global.scss';
|
||||||
main {
|
main {
|
||||||
padding: 0 2rem;
|
padding: 2rem;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
---
|
---
|
||||||
import BaseLayout from '@layouts/Base.astro';
|
import BaseLayout from '@layouts/Base.astro';
|
||||||
import Nav from '@components/Nav.astro';
|
import HeroForm from '@components/homepage/HeroForm.astro';
|
||||||
import HomeBackground from '@/components/HomeBackground';
|
import HomeBackground from '@/components/homepage/HomeBackground';
|
||||||
|
|
||||||
const isBossServer = import.meta.env.BOSS_SERVER === true;
|
const isBossServer = import.meta.env.BOSS_SERVER === true;
|
||||||
|
|
||||||
const searchUrl = new URLSearchParams(new URL(Astro.request.url).search).get('url');
|
// Redirect strait to /check or /check/:url if running as self-hosted instance
|
||||||
|
if (!isBossServer) {
|
||||||
if (!isBossServer && searchUrl) {
|
const searchUrl = new URLSearchParams(new URL(Astro.request.url).search).get('url');
|
||||||
Astro.redirect(`/check/${encodeURIComponent(searchUrl)}`);
|
const redirectUrl = searchUrl ? `/check/${encodeURIComponent(searchUrl)}` : '/check';
|
||||||
|
Astro.redirect(redirectUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -17,26 +18,23 @@ if (!isBossServer && searchUrl) {
|
|||||||
<Fragment slot="head">
|
<Fragment slot="head">
|
||||||
{!isBossServer && (<meta http-equiv="refresh" content="0; url=/check" />)}
|
{!isBossServer && (<meta http-equiv="refresh" content="0; url=/check" />)}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
<main class="fancy-background">
|
<main>
|
||||||
<HomeBackground client:only="react" />
|
<HeroForm />
|
||||||
<Nav />
|
|
||||||
<!-- <div class="left"></div>
|
|
||||||
<div class="right"></div>
|
|
||||||
<h1>Web Check</h1>
|
|
||||||
<h2>X-Ray vision for your website's security</h2>
|
|
||||||
<img width="600" class="screenshot" src="https://i.ibb.co/r0jXN6s/web-check.png" alt="Web Check Screenshot" /> -->
|
|
||||||
</main>
|
</main>
|
||||||
|
<HomeBackground client:only="react" />
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@import '@styles/global.scss';
|
||||||
main {
|
main {
|
||||||
height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 1rem 0;
|
padding: 2rem;
|
||||||
background: rgb(20,29,43);
|
width: 80vw;
|
||||||
background: radial-gradient(circle,#141d2b 0%,#0d1521 75%,#141d2b 100%);
|
margin: 0 auto;
|
||||||
|
z-index: 3;
|
||||||
h2 {
|
background: var(--background);
|
||||||
font-weight: 300;
|
@include tablet-landscape-down {
|
||||||
|
width: 96vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.screenshot {
|
.screenshot {
|
||||||
|
Reference in New Issue
Block a user