Skip to content

Commit

Permalink
Verify is clientVersion is not for prerelease (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpprian authored Sep 3, 2024
1 parent 558cbfb commit f46137f
Show file tree
Hide file tree
Showing 9 changed files with 5,298 additions and 2,566 deletions.
7,734 changes: 5,221 additions & 2,513 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

21 changes: 13 additions & 8 deletions src/components/download/DownloadInfo/DownloadInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,20 @@ const DownloadInfo = function ({ owner, repo }: GithubProps) {
.then((res) =>
res.json().then((val) => {
if (val.length) {
const data = val[0];
clientVersion.set(data.name ? data.name.slice(1) : "");
for (let data of val) {
if (!data.prerelease) {
const data = val[0];
clientVersion.set(data.name ? data.name.slice(1) : "");

// 2024-07-08T12:58:59Z -> 08.07.2024
setPublished(
data.published_at
? data.published_at.split("T")[0].split("-").reverse().join(".")
: "",
);
// 2024-07-08T12:58:59Z -> 08.07.2024
setPublished(
data.published_at
? data.published_at.split("T")[0].split("-").reverse().join(".")
: "",
);
break;
}
}
}
setIsLoading(false);
}),
Expand Down
13 changes: 10 additions & 3 deletions src/pages/client.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import ProductImage from "../components/product/ProductImage.astro";
import ProductLayout from "../layouts/ProductLayout.astro";
import ProductSection from "../layouts/ProductSection.astro";
import MatrixSection from "../components/MatrixSection.astro";
import { Image } from 'astro:assets';
import { Image } from "astro:assets";
import ClientImage from "/public/images/product/client/main-screen.png";
import OverviewImage from "/public/images/product/client/overview.png";
const clientFeatures = (await getCollection("client-features")).sort(
(f1, f2) => f1.data.order - f2.data.order,
);
const title = "defguard enterprise open-source SSO&VPN with 2FA/MFA: Best Desktop WireGuard Client";
const title =
"defguard enterprise open-source SSO&VPN with 2FA/MFA: Best Desktop WireGuard Client";
const featuredImage =
"github.com/DefGuard/defguard.github.io/raw/main/public/images/product/client/main-screen.png";
const imageWidth = "1920";
Expand Down Expand Up @@ -62,7 +63,13 @@ const tags = [
</header>
</ProductSection>
<ProductImage>
<Image src={ClientImage} alt="product image" densities={[0.5, 0.75, 1]} width={imageWidth} height={imageHeight} />
<Image
src={ClientImage}
alt="product image"
densities={[0.5, 0.75, 1]}
width={imageWidth}
height={imageHeight}
/>
</ProductImage>
<ProductSection padding="large">
<div class="product-features">
Expand Down
3 changes: 2 additions & 1 deletion src/pages/compare.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { featuresTableData } from "../data/compare-table";
import { Button } from "../components/buttons/Button/Button";
import OrganizationJSONLD from "../scripts/OrganizationJSONLD.astro";
const title = "defguard enterprise open-source SSO&VPN with 2FA/MFA: Comparison of WireGuard VPN solutions";
const title =
"defguard enterprise open-source SSO&VPN with 2FA/MFA: Comparison of WireGuard VPN solutions";
const featuredImage =
"github.com/DefGuard/defguard.github.io/raw/main/public/images/png/defguard.png";
const imageWidth = "1080";
Expand Down
10 changes: 7 additions & 3 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import ProductImage from "../components/product/ProductImage.astro";
import ProductLayout from "../layouts/ProductLayout.astro";
import ProductSection from "../layouts/ProductSection.astro";
import MatrixSection from "../components/MatrixSection.astro";
import { Image } from 'astro:assets';
import CoreImage from '/public/images/product/core/hero-image.png';
import { Image } from "astro:assets";
import CoreImage from "/public/images/product/core/hero-image.png";
const coreFeatures = (await getCollection("core-features")).sort(
(f1, f2) => f1.data.order - f2.data.order,
Expand Down Expand Up @@ -83,7 +83,11 @@ const tags = [
</header>
</ProductSection>
<ProductImage>
<Image src={CoreImage} alt="defguard vpn overview image" densities={[0.5, 0.75, 1]} />
<Image
src={CoreImage}
alt="defguard vpn overview image"
densities={[0.5, 0.75, 1]}
/>
</ProductImage>
<ProductSection padding="large">
<div class="product-features">
Expand Down
5 changes: 3 additions & 2 deletions src/pages/openvpn.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import MigrateIllustration from "/public/svg/migrate-illustration.svg?raw";
const openvpnFeatures = (await getCollection("openvpn-features")).sort(
(f1, f2) => f1.data.order - f2.data.order,
);
const title = "defguard enterprise open-source SSO&VPN with 2FA/MFA: Migrate from OpenVPN to WireGuard";
const title =
"defguard enterprise open-source SSO&VPN with 2FA/MFA: Migrate from OpenVPN to WireGuard";
const featuredImage =
"github.com/DefGuard/defguard.github.io/raw/main/public/images/png/defguard.png";
const imageWidth = "1080";
Expand Down Expand Up @@ -94,4 +95,4 @@ const form_title = "Book a demo";
<ProductBuiltBy />
<MatrixSection />
</main>
</ProductLayout>
</ProductLayout>
9 changes: 7 additions & 2 deletions src/pages/pricing.astro
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ const tags = [
];
const form_title = "Book a demo";
const form_description = "We provide consulting or custome deployment and security services. You can order custome features for the server and/or the client. Just fill out the form below:";
const form_description =
"We provide consulting or custome deployment and security services. You can order custome features for the server and/or the client. Just fill out the form below:";
---

<BaseLayout
Expand Down Expand Up @@ -97,7 +98,11 @@ const form_description = "We provide consulting or custome deployment and securi
</a>
</div>
<div class="product-features">
<BookDemoForm client:only="preact" title={form_title} description={form_description} />
<BookDemoForm
client:only="preact"
title={form_title}
description={form_description}
/>
</div>
</ProductSection>
</main>
Expand Down
54 changes: 27 additions & 27 deletions src/scripts/OrganizationJSONLD.astro
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
---
interface Props {
title: string;
description: string;
url: string;
tags: string[];
title: string;
description: string;
url: string;
tags: string[];
}
const { title, description, url, tags} = Astro.props;
const { title, description, url, tags } = Astro.props;
const schema = {
"@context": "https://schema.org",
"@type": "Organization",
"headline": title,
"description": description,
"url": url,
"keywords": tags,
"author": {
"@type": "Person",
"name": "Robert Olejnik",
},
"address": {
"@type": "PostalAddress",
"streetAddress": "Cyfrowa 6",
"city": "Szczecin",
"postalCode": "71-441",
"country": "Poland"
},
"contantPoint": {
"@type": "ContactPoint",
"email": "[email protected]",
},
"operatingSystem": "Windows, macOS, Linux",
"@context": "https://schema.org",
"@type": "Organization",
headline: title,
description: description,
url: url,
keywords: tags,
author: {
"@type": "Person",
name: "Robert Olejnik",
},
address: {
"@type": "PostalAddress",
streetAddress: "Cyfrowa 6",
city: "Szczecin",
postalCode: "71-441",
country: "Poland",
},
contantPoint: {
"@type": "ContactPoint",
email: "[email protected]",
},
operatingSystem: "Windows, macOS, Linux",
};
---

Expand Down
15 changes: 8 additions & 7 deletions src/styles/fonts/_font.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
@font-face {
font-family: "Poppins";
font-style: normal;
font-weight: 400;
src: local('Poppins'),
url("/fonts/poppins/Poppins-Regular.woff2") format("woff2");
font-display: swap;
}
font-family: "Poppins";
font-style: normal;
font-weight: 400;
src:
local("Poppins"),
url("/fonts/poppins/Poppins-Regular.woff2") format("woff2");
font-display: swap;
}

0 comments on commit f46137f

Please sign in to comment.